/**
 * Support Ticketing System Styles
 * Includes: Tickets List, Ticket Detail, Create Ticket
 */

/* ===================================
   SUPPORT LIST PAGE
   =================================== */

.account-main-content {
    padding: 0px;
    background: transparent;
}
.section-header h2 {
    font-size: 28px;
    color: #000;
    font-weight: 600;
    border-bottom: 1px solid #E6E6E8;
    padding-bottom: 25px;
    margin-bottom: 25px;
    line-height: 30px;
}
.tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.tickets-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin: 0;
}

.btn-create-ticket,
.btn-create-ticket-small {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #F7B32B;
    color: #3A393B;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-create-ticket:hover,
.btn-create-ticket-small:hover {
    background: #E5A526;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 179, 43, 0.3);
}

.btn-create-ticket svg,
.btn-create-ticket-small svg {
    width: 20px;
    height: 20px;
}

.tickets-table-container {
    background: white;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    overflow: hidden;
}

.tickets-table {
    width: 100%;
    border-collapse: collapse;
}

.tickets-table thead {
    background: rgb(196 196 196 / 16%);
}

.tickets-table thead th {
    padding: 16px;
    text-align: left;
    font-size: 16px;
    font-weight: 600;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tickets-table tbody tr {
    border-bottom: 1px solid #E9ECEF;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tickets-table tbody tr:hover {
    background: rgb(196 196 196 / 16%);
}

.tickets-table tbody td {
    padding: 16px;
    font-size: 16px;
    font-weight: 500;
    color: #000;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-new {
    background: #FFF3CD;
    color: #856404;
}

.status-progress {
    background: #D1ECF1;
    color: #0C5460;
}

.status-resolved {
    background: #D4EDDA;
    color: #155724;
}

.status-closed {
    background: #E9ECEF;
    color: #495057;
}

.status-default {
    background: #E9ECEF;
    color: #495057;
}

.btn-secondary {
    border-radius: 200px;
    border: 1px solid #AAAAAA;
    color: #212121;
    font-size: 16px;
    text-align: center;
    background: transparent;
    padding: 10px 20px;
    font-weight: 600;
    /*box-shadow: var(--shadow-soft);*/
}

/* ===================================
   TICKET DETAIL PAGE
   =================================== */

.ticket-actions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.ticket-actions-header .d-flex {
    gap: 10px;
}
.ticket-actions-header .d-flex .btn-back {
    padding-top: 0px;
}

/* Post to Ticket Section */
.post-ticket-section {
    background: #FAFAFA;
    border-radius: 12px;
    padding: 30px 40px;
    margin-bottom: 24px;
}

.post-ticket-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin: 0 0 20px 0;
    line-height: 24px;
}

.post-ticket-form textarea {
    width: 100%;
    padding: 16px;
    border: 1px solid #C8C8C8;
    border-radius: 6px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 16px;
    min-height: 120px;
    resize: none;
}

.post-ticket-form textarea::placeholder {
    color: #5B5B5B;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Success Message */
.success-message {
    background: #D4EDDA;
    border: 1px solid #C3E6CB;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.success-message svg {
    color: #155724;
    flex-shrink: 0;
    margin-top: 2px;
}

.success-message span {
    color: #155724;
    font-weight: 600;
    font-size: 14px;
    flex: 1;
}

.success-message .posted-time {
    color: #6C757D;
    font-size: 13px;
    font-weight: normal;
    margin-top: 4px;
}

/* Ticket Info Section */
.ticket-info-section {
    background: white;
    padding: 24px 0px;
    margin-bottom: 24px;
}

.ticket-info-section h3,
.ticket-messages-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #000;
    margin: 0 0 24px 0;
    border-bottom: 1px solid #E6E6E8;
}

.ticket-info-grid {
    display: grid;
    gap: 16px;
}

.info-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #E6E6E8;
}

.info-row .label {
    font-size: 16px;
    font-weight: 600;
    color: #000;
}

.info-row .value {
    font-size: 16px;
    color: #000;
    font-weight: 500;
    line-height: 1.6;
}

.info-row.customer-info .value {
    color: #495057;
}

/* Ticket Messages */
.ticket-message {
    background: rgba(59, 178, 114, 0.1);
    border-radius: 8px;
    padding: 16px 0px;
    margin-bottom: 16px;
}

.message-header {
    font-size: 12px;
    color: #000;
    font-weight: 500;
    margin-bottom: 12px;
    padding-left: 20px;
    border-bottom: 1px solid #D8DFDC;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 5px;
}

.message-text {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding-left: 20px;
}

.message-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.message-text {
    font-size: 16px;
    font-weight: 500;
    color: #000;
    line-height: 1.6;
}

/* ===================================
   CREATE TICKET PAGE
   =================================== */

.create-ticket-form {
    max-width: 100%;
}
select.form-control {
    border-color: #C8C8C8;
}

textarea.form-control {
    resize: vertical;
    min-height: 200px;
    resize: none;
    border-color: #C8C8C8;
}

textarea.form-control::placeholder {
    color: #5B5B5B;
}

.form-actions-right {
    display: flex;
    justify-content: flex-end;
    margin-top: 32px;
}


/* ===================================
   SHARED COMPONENTS
   =================================== */


/* Loading State */
.loading-state {
    text-align: center;
    padding: 60px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #E9ECEF;
    border-top-color: #F7B32B;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-state p {
    font-size: 14px;
    color: #6C757D;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    color: #CED4DA;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #3A393B;
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: #6C757D;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 1024px) {
    .ticket-actions-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .btn-create-ticket-small {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .btn-create-ticket {
        width: 100%;
        justify-content: center;
    }
    
    .tickets-table-container {
        overflow-x: auto;
    }
    
    .tickets-table {
        min-width: 600px;
    }
    
    .info-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .create-ticket-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .post-ticket-section {
        padding: 16px;
    }
    
    .ticket-info-section {
        padding: 16px;
    }
}