/* Support & Tickets Pages */

/* ===== Support Form ===== */
.support-page__subtitle {
    color: #6b7280;
    margin-bottom: 32px;
}

.support-form {
    max-width: 640px;
}

.support-form .form-group {
    margin-bottom: 20px;
}

.support-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #374151;
}

.support-form .required {
    color: #ef4444;
}

.support-form input,
.support-form select,
.support-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.support-form textarea {
    resize: vertical;
    min-height: 120px;
}

.char-count {
    display: block;
    text-align: right;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 4px;
}

.form-actions {
    margin-top: 24px;
}

/* ===== Success State ===== */
.support-success {
    text-align: center;
    padding: 48px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.support-success__icon {
    width: 64px;
    height: 64px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 16px;
}

.support-success h2 {
    margin-bottom: 8px;
}

.support-success p {
    color: #6b7280;
    margin-bottom: 8px;
}

.support-success__actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* ===== Tickets List ===== */
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tickets-header h1 {
    margin-bottom: 0;
}

.tickets-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.filter-btn.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ticket-card {
    display: block;
    padding: 16px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ticket-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.ticket-card__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ticket-card__no {
    font-size: 12px;
    color: #9ca3af;
    font-family: monospace;
}

.ticket-card__subject {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 8px;
}

.ticket-card__meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.ticket-card__time {
    font-size: 12px;
    color: #9ca3af;
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.badge--submitted { background: #fef3c7; color: #92400e; }
.badge--in_progress { background: #dbeafe; color: #1e40af; }
.badge--resolved { background: #dcfce7; color: #15803d; }
.badge--closed { background: #f3f4f6; color: #6b7280; }

.badge--low { background: #f3f4f6; color: #6b7280; }
.badge--normal { background: #dbeafe; color: #1e40af; }
.badge--high { background: #fef3c7; color: #92400e; }
.badge--urgent { background: #fee2e2; color: #991b1b; }

.badge--support { background: #dbeafe; color: #1e40af; }
.badge--refund { background: #fef3c7; color: #92400e; }
.badge--billing { background: #fce7f3; color: #9d174d; }
.badge--credits { background: #e0e7ff; color: #3730a3; }
.badge--bug { background: #fee2e2; color: #991b1b; }
.badge--feature { background: #dcfce7; color: #15803d; }

/* ===== Ticket Detail ===== */
.ticket-detail-back {
    margin-bottom: 24px;
}

.ticket-detail-back a {
    color: #6b7280;
    text-decoration: none;
    font-size: 14px;
}

.ticket-detail-back a:hover {
    color: #3b82f6;
}

.ticket-detail-header {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.ticket-detail__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.ticket-detail__info {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.ticket-detail__info-item {
    font-size: 13px;
    color: #6b7280;
}

.ticket-detail__info-item strong {
    color: #374151;
}

/* ===== Messages ===== */
.ticket-messages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message-item {
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
}

.message-item--user {
    background: #f9fafb;
}

.message-item--admin {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.message-item__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.message-item__sender {
    font-size: 13px;
    font-weight: 600;
}

.message-item__time {
    font-size: 12px;
    color: #9ca3af;
}

.message-item__body {
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Empty State ===== */
.tickets-empty {
    text-align: center;
    padding: 48px 24px;
}

.tickets-empty__icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.tickets-empty h3 {
    margin-bottom: 8px;
    color: #374151;
}

.tickets-empty p {
    color: #6b7280;
    margin-bottom: 16px;
}

.tickets-loading {
    text-align: center;
    padding: 32px;
    color: #9ca3af;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .support-success__actions {
        flex-direction: column;
    }

    .tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ticket-card__meta {
        flex-direction: column;
        gap: 4px;
    }

    .ticket-detail__info {
        flex-direction: column;
        gap: 8px;
    }
}
