/* ==========================================================================
   HavenCraft — 24/7 Support Desk Stylesheet (/support/)
   Unslop + UI/UX Pro Max: 2-Column Support Desk & Single-Screen Composer
   ========================================================================== */

/* --- 1. Compact Support Page Header & SLA Strip --- */
.page-header.support-page-header {
    padding-top: calc(var(--nav-height) + 22px);
    padding-bottom: 18px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    background: rgba(17, 20, 28, 0.45);
    margin-bottom: 22px;
}

.support-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.support-header-copy {
    max-width: 540px;
}

.page-header.support-page-header h1 {
    font-size: clamp(1.65rem, 2.8vw, 2.15rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--text);
    margin: 0 0 6px 0;
    background: none;
    -webkit-text-fill-color: currentColor;
    animation: none;
}

.page-header.support-page-header .subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.support-sla-bar {
    display: grid;
    grid-template-columns: repeat(3, auto);
    gap: 12px;
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.sla-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}

.sla-item > i {
    color: var(--primary);
    font-size: 0.95rem;
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}

.sla-item > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.2;
}

.sla-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sla-val {
    font-size: 0.84rem;
    color: var(--text);
    font-weight: 700;
}

.sla-dot.online {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
}

@media (max-width: 960px) {
    .support-header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .support-sla-bar {
        width: 100%;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .page-header.support-page-header {
        padding-top: calc(var(--nav-height) + 20px);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }

    .support-sla-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* --- 2. Two-Column Support Desk Layout --- */
.support-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 64px;
}

.support-desk-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 960px) {
    .support-desk-grid {
        grid-template-columns: 1fr;
    }
}

.support-main-col {
    min-width: 0;
    align-self: start;
}

body.support-chat-active .support-main-col {
    align-self: start;
    height: auto;
}

.support-side-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
}

@media (max-width: 960px) {
    .support-side-col {
        position: static;
    }
}

/* --- 3. Left Workspace Card & Top Mode Switcher --- */
.support-container-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (max-width: 640px) {
    .support-container-card {
        padding: 16px;
    }
}

.support-desk-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
}

.support-desk-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.support-desk-heading i {
    color: var(--primary);
    font-size: 1rem;
    flex-shrink: 0;
}

.support-desk-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.support-switch-mode-btn {
    min-height: 38px;
    padding: 6px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.support-switch-mode-btn i {
    font-size: 0.80rem;
    color: var(--primary);
    flex-shrink: 0;
}

.support-switch-mode-btn:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: rgba(0, 200, 150, 0.35);
}

.support-switch-mode-btn.is-lookup-active {
    background: rgba(0, 200, 150, 0.08);
    color: var(--primary);
    border-color: rgba(0, 200, 150, 0.35);
}

.support-desk-topbar .lang-toggle-bar {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 4px;
    gap: 4px;
    box-shadow: none;
    flex-shrink: 0;
}

.support-desk-topbar .lang-toggle-btn {
    min-height: 30px;
    border-radius: 6px;
    padding: 5px 11px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    box-shadow: none;
    white-space: nowrap;
}

.support-desk-topbar .lang-toggle-btn.active {
    background: var(--primary);
    color: #04120e;
    font-weight: 700;
    box-shadow: none;
}

@media (max-width: 600px) {
    .support-desk-topbar {
        gap: 6px;
        padding-bottom: 12px;
        margin-bottom: 16px;
    }

    .support-desk-heading {
        font-size: 0.84rem;
        gap: 6px;
    }

    .support-desk-heading i {
        font-size: 0.82rem;
    }

    .support-desk-actions {
        gap: 6px;
    }

    .support-switch-mode-btn {
        min-height: 34px;
        padding: 5px 9px;
        font-size: 0.72rem;
        gap: 5px;
    }

    .support-switch-mode-btn i {
        font-size: 0.72rem;
    }

    .support-desk-topbar .lang-toggle-bar {
        padding: 3px;
        gap: 2px;
    }

    .support-desk-topbar .lang-toggle-btn {
        min-height: 28px;
        padding: 4px 7px;
        font-size: 0.71rem;
    }
}

/* --- 4. Single-Screen Smart Ticket Composer --- */
.composer-category-section {
    margin-bottom: 16px;
}

.composer-section-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-align: left;
}

.composer-cat-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}

@media (max-width: 720px) {
    .composer-cat-bar {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .composer-cat-bar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.composer-cat-pill {
    min-height: 44px;
    padding: 10px 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    line-height: 1.25;
    transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-cat-pill i {
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.composer-cat-pill:hover {
    background: var(--surface-2);
    border-color: rgba(255, 255, 255, 0.16);
    color: var(--text);
}

.composer-cat-pill:hover i {
    color: var(--primary);
}

.composer-cat-pill.active {
    background: rgba(0, 200, 150, 0.1);
    border-color: var(--primary);
    color: var(--text);
}

.composer-cat-pill.active i {
    color: var(--primary);
}

.deflection-notice {
    background: rgba(0, 200, 150, 0.06);
    border: 1px solid rgba(0, 200, 150, 0.22);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.deflection-notice i {
    color: var(--primary);
    font-size: 0.95rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.deflection-notice-text {
    font-size: 0.84rem;
    color: var(--text-secondary);
    line-height: 1.5;
    text-align: left;
}

.deflection-notice-text strong {
    color: var(--text);
}

/* --- 5. Form Grid, Controls, Inline Validation & Buttons --- */
.support-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin-bottom: 16px;
}

@media (max-width: 640px) {
    .support-form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.form-group {
    margin-bottom: 0;
    text-align: left;
    min-width: 0;
}

.form-group.form-group-full {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
                background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea,
[data-theme="light"] .form-group select {
    background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.14);
    background: var(--surface-2);
}

.form-group input.is-invalid,
.form-group textarea.is-invalid,
.form-group select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.14);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-group textarea {
    min-height: 104px;
    resize: vertical;
    line-height: 1.55;
}

.form-group select {
    cursor: pointer;
    color-scheme: dark;
}

.form-group select option {
    background-color: #11141c;
    color: #f3f5f8;
}

/* Custom Theme Dropdown Component (.hvn-custom-select) */
.hvn-custom-select {
    position: relative;
    width: 100%;
}

.hvn-select-trigger {
    width: 100%;
    min-height: 44px;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    text-align: left;
    outline: none;
    transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1),
                background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hvn-select-trigger:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: var(--surface-2);
}

.hvn-select-trigger:focus-visible,
.hvn-custom-select.open .hvn-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 200, 150, 0.14);
    background: var(--surface-2);
}

.hvn-select-value {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.hvn-select-value i {
    color: var(--primary);
    font-size: 0.88rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.hvn-select-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hvn-select-arrow {
    color: var(--text-muted);
    font-size: 0.76rem;
    flex-shrink: 0;
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
                color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.hvn-custom-select.open .hvn-select-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

.hvn-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 80;
    background: #141824;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-sm);
    padding: 6px;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 260px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 150ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 150ms cubic-bezier(0.22, 1, 0.36, 1),
                visibility 150ms;
}

.hvn-custom-select.open .hvn-select-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.hvn-select-option {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.hvn-select-option:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.hvn-select-option.selected {
    background: rgba(0, 200, 150, 0.12);
    border-color: rgba(0, 200, 150, 0.28);
    color: var(--text);
    font-weight: 600;
}

.hvn-select-opt-main {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}

.hvn-select-opt-main i {
    color: var(--primary);
    font-size: 0.84rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.hvn-select-opt-txt {
    line-height: 1.35;
}

.hvn-select-check {
    color: var(--primary);
    font-size: 0.76rem;
    opacity: 0;
    transform: scale(0.8);
    flex-shrink: 0;
    transition: opacity 140ms ease, transform 140ms ease;
}

.hvn-select-option.selected .hvn-select-check {
    opacity: 1;
    transform: scale(1);
}

.support-inline-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    margin-bottom: 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: var(--radius-sm);
    color: #fca5a5;
    font-size: 0.86rem;
    font-weight: 500;
    line-height: 1.45;
    outline: none;
}

.support-inline-alert i {
    color: #ef4444;
    font-size: 1rem;
    flex-shrink: 0;
}

.composer-submit-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}

.turnstile-container {
    display: flex;
    justify-content: center;
    min-height: 65px;
}

.form-submit-btn {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 12px 24px;
    background: var(--primary);
    color: #04120e;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.form-submit-btn:hover {
    background: #14d8a4;
    color: #04120e;
}

.form-submit-btn:active {
    transform: scale(0.99);
}

.form-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Lookup View Styles */
.lookup-view-header {
    text-align: left;
    margin-bottom: 18px;
}

.lookup-view-header h2 {
    font-size: 1.2rem;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text);
}

.lookup-view-header h2 i {
    color: var(--primary);
}

.lookup-view-header p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.lookup-footer-action {
    text-align: center;
    margin-top: 16px;
}

.lookup-toggle-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
    min-height: 40px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                color 180ms cubic-bezier(0.22, 1, 0.36, 1);
    font-family: var(--font-body);
    text-decoration: none;
}

.lookup-toggle-btn:hover {
    background: var(--surface-2);
    border-color: var(--primary);
    color: var(--text);
}

/* --- 5b. Right Sidebar: Quick Server Info & FAQ Accordions --- */
.support-side-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
}

.support-side-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.support-side-header i {
    color: var(--primary);
    font-size: 0.95rem;
}

.support-side-header h3 {
    margin: 0;
    font-size: 0.96rem;
    font-weight: 700;
    color: var(--text);
}

.support-quick-ip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-bottom: 10px;
    font-variant-numeric: tabular-nums;
    transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.support-quick-ip:hover {
    border-color: var(--primary);
    background: var(--surface-2);
}

.quick-ip-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.quick-ip-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-weight: 500;
}

.quick-ip-val {
    font-size: 0.92rem;
    color: var(--primary);
    font-weight: 700;
}

.quick-ip-port {
    font-size: 0.78rem;
    color: var(--text-secondary);
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 4px 8px;
    border-radius: 6px;
}

.quick-ip-port strong {
    color: var(--text);
}

.support-discord-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 42px;
    padding: 10px 14px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(88, 101, 242, 0.28);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                border-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.support-discord-link:hover {
    background: rgba(88, 101, 242, 0.18);
    border-color: rgba(88, 101, 242, 0.5);
    color: #ffffff;
}

.support-discord-link .fa-discord {
    color: #5865F2;
    font-size: 1rem;
}

.support-discord-link .fa-arrow-up-right-from-square {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Compact Self-Service FAQ Accordion List */
.support-deflection-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.support-faq-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0;
    text-align: left;
    overflow: hidden;
    transition: border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
                background-color 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.support-faq-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.support-faq-card[open] {
    border-color: rgba(0, 200, 150, 0.32);
    background: rgba(17, 20, 28, 0.9);
}

.support-faq-card summary {
    min-height: 44px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    list-style: none;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text);
    user-select: none;
}

.support-faq-card summary::-webkit-details-marker {
    display: none;
}

.support-faq-card summary > i:first-child {
    color: var(--primary);
    font-size: 0.88rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.support-faq-card summary .faq-q {
    flex: 1;
}

.support-faq-card summary .faq-chevron {
    font-size: 0.72rem;
    color: var(--text-muted);
    transition: transform 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.support-faq-card[open] summary .faq-chevron {
    transform: rotate(180deg);
    color: var(--primary);
}

.support-faq-card .faq-a {
    margin: 0;
    padding: 0 14px 12px 40px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.55;
    font-variant-numeric: tabular-nums;
}

.support-faq-card .faq-a code {
    background: var(--surface-2);
    border: 1px solid var(--border);
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--primary);
    font-size: 0.78rem;
}

/* --- 6. Live Ticket Chat Room & Messenger UI --- */
/* --- Support Chat Mode (Unified Single-Border Architecture) --- */
.support-container-card.chat-mode {
    padding: 0 !important;
    padding-bottom: 0 !important;
    max-width: 960px;
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    transition: all 0.3s ease;
    height: auto;
}

/* --- Active Chat Mode Layout --- */
.support-container-card.chat-mode .ticket-chat-card {
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 16px 20px 8px 20px !important;
    padding-bottom: 8px !important;
    display: flex;
    flex-direction: column;
}

@media (max-width: 768px) {
    /* Mobile Chat Screen Optimization: Hide bulky SLA bar & compact hero when chat is active */
    body.support-chat-active .support-hero {
        padding: 8px 0 2px 0;
        margin-bottom: 0;
    }

    body.support-chat-active .support-hero-main {
        display: none !important;
    }

    body.support-chat-active .support-sla-bar {
        display: none !important;
    }

    body.support-chat-active .support-wrapper {
        padding-top: 6px;
        padding-bottom: 12px;
    }

    body.support-chat-active .support-side-col {
        display: none !important;
    }

    .support-container-card.chat-mode {
        padding: 8px 8px 4px 8px !important;
        border-radius: var(--radius-md);
    }

    .support-container-card.chat-mode .ticket-chat-card {
        padding: 4px 2px 2px 2px !important;
    }
}

.ticket-chat-card {
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    text-align: left;
    animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.ticket-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
    padding-bottom: 8px;
    border-bottom: none;
    margin-bottom: 8px;
}

.ticket-agent-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.ticket-agent-avatar-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.ticket-agent-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
    box-shadow: 0 0 12px rgba(0, 200, 150, 0.35);
}

.ticket-agent-status-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #00e676;
    border: 2px solid var(--bg);
    box-shadow: 0 0 8px #00e676;
}

.ticket-title-area {
    min-width: 0;
    flex: 1;
}

.ticket-title-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.ticket-title-top h3 {
    font-size: 1.15rem;
    margin: 0;
    font-family: var(--font-heading);
    white-space: nowrap;
    color: var(--text);
}

.ticket-meta-subtitle {
    font-size: 0.80rem;
    color: var(--text-secondary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta-subject {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
    display: inline-block;
}

.ticket-meta-user {
    color: var(--text-muted);
    flex-shrink: 0;
}

.ticket-badge {
    background: rgba(0, 200, 150, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 200, 150, 0.3);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ticket-badge.closed {
    background: rgba(255, 75, 75, 0.15);
    color: #ff5252;
    border-color: rgba(255, 75, 75, 0.3);
}

.ticket-chat-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.chat-header-btn {
    min-height: 34px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.80rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-header-btn:hover {
    background: var(--surface-2);
    color: var(--text);
    border-color: rgba(0, 200, 150, 0.35);
}

.chat-header-btn i {
    font-size: 0.78rem;
    color: var(--primary);
}

.chat-header-btn.btn-danger {
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.25);
}

.chat-header-btn.btn-danger i {
    color: #ef4444;
}

.chat-header-btn.btn-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.45);
    color: #ff8585;
}

@media (max-width: 640px) {
    .ticket-chat-header {
        gap: 8px;
        padding-bottom: 6px;
        margin-bottom: 8px;
    }

    .ticket-agent-avatar-wrap {
        width: 34px;
        height: 34px;
    }

    .ticket-title-top h3 {
        font-size: 0.95rem;
    }

    .ticket-meta-subtitle {
        font-size: 0.74rem;
    }

    .ticket-meta-subject {
        max-width: 140px;
    }

    .chat-header-btn {
        min-height: 30px;
        padding: 5px 8px;
        font-size: 0.74rem;
        gap: 4px;
    }

    .chat-header-btn .btn-text {
        display: none; /* Icon-only on small mobile screens */
    }
}

/* --- Messages Box & Viewport --- */
.ticket-messages-box {
    height: 520px;
    min-height: 440px;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 10px 4px;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 0;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .ticket-messages-box {
        height: calc(100dvh - 220px);
        min-height: 380px;
        max-height: calc(100dvh - 180px);
        padding: 8px 2px;
        gap: 8px;
        margin-bottom: 4px;
    }
}

.ticket-messages-box::-webkit-scrollbar {
    width: 6px;
}

.ticket-messages-box::-webkit-scrollbar-track {
    background: transparent;
}

.ticket-messages-box::-webkit-scrollbar-thumb {
    background: rgba(0, 200, 150, 0.25);
    border-radius: 99px;
}

.ticket-messages-box::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ==========================================================================
   Admin-Website Messenger Architecture (Rows, Bubbles, Tags & Avatars)
   ========================================================================== */
.msg-row,
.msg-row.chat-msg,
.msg-row.chat-msg.player,
.msg-row.chat-msg.staff {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.msg-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    width: 100%;
    position: relative;
    transition: opacity 0.2s ease, transform 0.2s ease;
    animation: fadeInUp 0.22s ease;
}

.msg-row.msg-row-grouped {
    margin-top: -6px;
}

.msg-row-player {
    justify-content: flex-end;
}

.msg-row-staff {
    justify-content: flex-start;
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #0b1118;
    flex-shrink: 0;
    margin-bottom: 2px;
    object-fit: cover;
}

.msg-avatar-ai {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 200, 150, 0.14);
    border-color: rgba(0, 200, 150, 0.35);
    color: #00c896;
    font-size: 0.85rem;
}

.msg-avatar-spacer {
    width: 28px;
    height: 1px;
    flex-shrink: 0;
}

.msg-content-wrapper {
    display: flex;
    flex-direction: column;
    max-width: 80%;
    position: relative;
}

@media (max-width: 640px) {
    .msg-content-wrapper {
        max-width: 88%;
    }
}

.msg-row-player .msg-content-wrapper {
    align-items: flex-end;
}

.msg-row-staff .msg-content-wrapper {
    align-items: flex-start;
}

.msg-author-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.msg-row-staff .msg-author-tag {
    color: var(--primary);
}

.msg-row-player .msg-author-tag {
    color: var(--text-secondary);
}

.msg-time {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 400;
}

.msg-ai-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.64rem;
    font-weight: 700;
    background: rgba(0, 200, 150, 0.15);
    color: #00e676;
    border: 1px solid rgba(0, 200, 150, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.msg-bubble-wrap {
    display: flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
}

.msg-row-player .msg-bubble-wrap {
    flex-direction: row;
}

.msg-row-staff .msg-bubble-wrap {
    flex-direction: row;
}

.msg-hover-actions {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    flex-shrink: 0;
}

.msg-row:hover .msg-hover-actions,
.msg-row:focus-within .msg-hover-actions {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .msg-hover-actions {
        opacity: 0.75;
        pointer-events: auto;
    }
}

.msg-action-icon-btn {
    width: 22px;
    height: 22px;
    border-radius: 5px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.msg-action-icon-btn:hover {
    background: var(--surface-2);
    color: var(--text);
}

.msg-bubble {
    padding: 8px 14px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
    position: relative;
}

.msg-bubble-player {
    background: #141b27;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text);
    border-radius: 16px 16px 4px 16px;
}

.msg-row-grouped .msg-bubble-player {
    border-radius: 16px 6px 6px 16px;
}

.msg-bubble-staff {
    background: linear-gradient(135deg, rgba(0, 200, 150, 0.16) 0%, rgba(0, 168, 125, 0.26) 100%);
    border: 1px solid rgba(0, 200, 150, 0.25);
    color: #ffffff;
    border-radius: 16px 16px 16px 4px;
}

.msg-row-grouped .msg-bubble-staff {
    border-radius: 6px 16px 16px 6px;
}

.msg-bubble-staff.msg-bubble-ai {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.12) 0%, rgba(0, 180, 120, 0.22) 100%);
    border-color: rgba(0, 230, 118, 0.32);
}

.msg-bubble-initial {
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.9) 100%);
}

.initial-badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 700;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
    padding: 1px 7px;
    border-radius: 4px;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* System Notice Bubble */
.msg-system-pill,
.chat-msg.system {
    align-self: center !important;
    margin: 12px auto !important;
    padding: 6px 18px !important;
    border-radius: 20px !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.3) !important;
    color: #f87171 !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    text-align: center !important;
    max-width: 90% !important;
    width: fit-content !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    line-height: 1.45 !important;
    word-break: break-word !important;
    animation: fadeIn 0.25s ease !important;
}

.msg-system-pill i,
.chat-msg.system i {
    font-size: 0.85rem !important;
    color: #f87171 !important;
    opacity: 0.9 !important;
}

/* Media Attachment Message Bubble (Tight, compact padding matching modern messengers) */
.msg-bubble-media {
    padding: 4px !important;
    background: #0b1118 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 12px !important;
    width: fit-content !important;
    max-width: 420px !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    overflow: hidden;
}

.msg-bubble-staff.msg-bubble-media {
    border-color: rgba(0, 200, 150, 0.35) !important;
    background: rgba(8, 24, 18, 0.9) !important;
}

.ticket-input-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: transparent !important;
    border: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
    border-radius: 0 !important;
    padding: 10px 2px 2px 2px !important;
    margin-top: auto;
    margin-bottom: 0 !important;
    flex-shrink: 0;
    transition: border-color var(--transition);
}

.ticket-input-area:focus-within {
    border-top-color: rgba(0, 200, 150, 0.3) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.ticket-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.ticket-input-area textarea {
    flex: 1;
    padding: 8px 10px;
    border: none;
    background: transparent;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.96rem;
    line-height: 1.5;
    resize: none;
    height: 42px;
    min-height: 42px;
    max-height: 180px;
    outline: none;
    overflow-y: hidden;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 200, 150, 0.4) transparent;
}

.ticket-input-area textarea::-webkit-scrollbar {
    width: 5px;
}

.ticket-input-area textarea::-webkit-scrollbar-track {
    background: transparent;
}

.ticket-input-area textarea::-webkit-scrollbar-thumb {
    background: rgba(0, 200, 150, 0.35);
    border-radius: 99px;
}

.ticket-input-area textarea::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.ticket-attach-btn {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--primary);
    cursor: pointer;
    transition: all var(--transition);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    margin-bottom: 2px;
}

.ticket-attach-btn:hover {
    color: #ffffff;
    background: rgba(0, 200, 150, 0.16);
    border-color: rgba(0, 200, 150, 0.35);
}

.ticket-send-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    max-width: 40px;
    padding: 0;
    background: var(--primary);
    color: #04120e;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 180ms cubic-bezier(0.22, 1, 0.36, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: 0 4px 14px rgba(0, 200, 150, 0.3);
    flex-shrink: 0;
    margin-bottom: 2px;
    overflow: hidden;
}

.ticket-send-btn:hover {
    background: #14d8a4;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 200, 150, 0.45);
}

.ticket-send-btn:active {
    transform: scale(0.96);
}

.ticket-mic-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    max-width: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    margin-bottom: 2px;
    font-size: 1rem;
}

.ticket-mic-btn:hover {
    color: #f87171;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.35);
}

/* Voice Recording Active Bar (Docked in Input Area) */
.composer-voice-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 6px 12px;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.28);
    border-radius: 12px;
    box-sizing: border-box;
    animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    gap: 10px;
}

.voice-bar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.voice-record-pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 10px #ef4444;
    display: inline-block;
    flex-shrink: 0;
    animation: recordBlink 0.9s infinite alternate;
}

@keyframes recordBlink {
    0% { opacity: 0.3; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1.2); }
}

.voice-timer {
    font-size: 0.84rem;
    font-weight: 700;
    font-family: monospace;
    color: #f87171;
    white-space: nowrap;
}

.voice-bar-visualizer {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 16px;
}

.v-wave {
    width: 3px;
    height: 10px;
    border-radius: 2px;
    background: #f87171;
    animation: wavePulse 0.5s infinite alternate;
}

.v-wave:nth-child(2) { animation-delay: 0.1s; height: 16px; }
.v-wave:nth-child(3) { animation-delay: 0.2s; height: 8px; }
.v-wave:nth-child(4) { animation-delay: 0.3s; height: 14px; }
.v-wave:nth-child(5) { animation-delay: 0.4s; height: 6px; }

@keyframes wavePulse {
    0% { height: 4px; }
    100% { height: 16px; }
}

.voice-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-voice-cancel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-muted);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.18s ease;
}

.btn-voice-cancel:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.btn-voice-send {
    background: var(--primary);
    border: none;
    color: #051310;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.18s ease;
    box-shadow: 0 2px 10px rgba(0, 200, 150, 0.35);
}

.btn-voice-send:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

/* --- Attachment Staging & Upload UI --- */
.ticket-attachment-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: rgba(0, 200, 150, 0.08);
    border: 1px solid rgba(0, 200, 150, 0.25);
    border-radius: 12px;
    animation: fadeIn 0.2s ease;
}

.attach-thumb-wrap {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.attach-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.attach-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.75);
    color: #ff5252;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    transition: background 0.15s, transform 0.15s;
}

.attach-remove-btn:hover {
    background: #ff5252;
    color: #fff;
    transform: scale(1.1);
}

.attach-meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.attach-filename {
    font-size: 0.82rem;
    color: var(--text);
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.attach-filesize {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.ticket-attach-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.06);
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.ticket-attach-btn:hover,
.ticket-attach-btn:active {
    background: rgba(0, 200, 150, 0.15);
    border-color: rgba(0, 200, 150, 0.35);
    color: #ffffff;
    transform: scale(1.04);
}

.ticket-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.chat-custom-emoji {
    width: 24px;
    height: 24px;
    vertical-align: -5px;
    display: inline-block;
    object-fit: contain;
    margin: 0 2px;
}

.chat-media-attachment {
    display: block;
    max-width: 100%;
    max-height: 240px;
    border-radius: 12px;
    margin-top: 8px;
    object-fit: cover;
    border: none !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease;
}

.chat-media-attachment:hover {
    transform: scale(1.02);
}

/* --- 7. CSAT Star Rating Box --- */
.csat-rating-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    margin-top: 14px;
}

.csat-stars {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 1.6rem;
    cursor: pointer;
}

.csat-star {
    color: var(--text-muted);
    transition: transform 0.15s, color 0.15s;
}

.csat-star:hover,
.csat-star.active {
    color: #ffd600;
    transform: scale(1.15);
}

/* ==========================================================================
   Voice Message Player & Interactive Waveform
   ========================================================================== */
.msg-row.has-voice,
.chat-msg.has-voice {
    min-width: 250px;
}

/* Media Message Container */
.msg-row.has-media,
.chat-msg.has-media {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.voice-message-player {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
    min-width: 220px;
    max-width: 320px;
    user-select: none;
}

.voice-player-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: #051310;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 4px 14px rgba(0, 200, 150, 0.4);
}

.chat-msg.player .voice-player-btn {
    background: #ffffff;
    color: #008761;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.voice-player-btn:hover {
    transform: scale(1.06);
    filter: brightness(1.1);
}

.voice-player-btn:active {
    transform: scale(0.96);
}

.voice-player-waveform {
    display: flex;
    align-items: center;
    gap: 2.5px;
    flex: 1;
    height: 28px;
    padding: 0 4px;
}

.wp-bar {
    width: 3px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.35);
    transition: height 0.15s ease, background-color 0.2s ease;
}

.chat-msg.staff .wp-bar {
    background: rgba(0, 200, 150, 0.45);
}

.chat-msg.player .wp-bar {
    background: rgba(255, 255, 255, 0.65);
}

.voice-message-player.is-playing .wp-bar {
    background: var(--primary);
    animation: voiceBarPulse 0.75s ease-in-out infinite alternate;
}

.chat-msg.player .voice-message-player.is-playing .wp-bar {
    background: #ffffff;
    animation: voiceBarPulse 0.75s ease-in-out infinite alternate;
}

@keyframes voiceBarPulse {
    0% { transform: scaleY(0.4); opacity: 0.6; }
    100% { transform: scaleY(1.15); opacity: 1; }
}

.voice-player-time {
    font-size: 0.76rem;
    font-family: monospace;
    font-weight: 600;
    color: var(--text-muted);
    flex-shrink: 0;
    letter-spacing: -0.01em;
}

.chat-msg.player .voice-player-time {
    color: rgba(255, 255, 255, 0.9);
}

.chat-msg.staff .voice-player-time {
    color: var(--primary);
}

/* ==========================================================================
   Chat Media Card (Attached Screenshots / Images — Completely Borderless)
   ========================================================================== */
.chat-media-card {
    display: block;
    position: relative;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    max-width: 100%;
    cursor: pointer;
    border: none !important;
    line-height: 0;
    transition: all 0.2s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45);
}

.chat-media-card:hover {
    transform: scale(1.015);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.65);
}

.chat-media-img {
    max-width: 100%;
    max-height: 340px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 12px;
    border: none !important;
}

.chat-media-hover-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
    color: #ffffff;
    font-size: 1.4rem;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.chat-media-card:hover .chat-media-hover-overlay {
    opacity: 1;
}

.chat-img-caption {
    padding: 6px 4px 2px 4px;
    font-size: 0.88rem;
    line-height: 1.45;
    word-break: break-word;
}

/* ==========================================================================
   Fullscreen Lightbox Modal for Screenshots
   ========================================================================== */
.chat-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.25s ease;
}

.chat-lightbox-modal.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.chat-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transform: scale(0.95);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-lightbox-modal.show .chat-lightbox-img {
    transform: scale(1);
}

.chat-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.chat-lightbox-close:hover {
    background: #ef4444;
    border-color: #ef4444;
    transform: rotate(90deg) scale(1.05);
}

/* ==========================================================================
   Discord-Grade Chat Markdown & Rich Content Styling
   ========================================================================== */
.chat-msg strong,
.msg-bubble strong {
    font-weight: 700;
    color: #ffffff;
}

.chat-msg em,
.msg-bubble em {
    font-style: italic;
    color: #e2e8f0;
}

.chat-msg del,
.msg-bubble del {
    text-decoration: line-through;
    opacity: 0.7;
}

/* Inline Code Pill (like Discord) */
.chat-inline-code {
    background: rgba(0, 0, 0, 0.35) !important;
    color: #34d399 !important;
    padding: 2px 7px !important;
    border-radius: 5px !important;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-size: 0.88em !important;
    border: 1px solid rgba(16, 185, 129, 0.25) !important;
    white-space: pre-wrap !important;
    word-break: break-word !important;
    display: inline-block;
    line-height: 1.35;
}

.chat-msg.player .chat-inline-code {
    background: rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* Multi-line Code Block */
.chat-code-block {
    background: #090d16 !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    margin: 8px 0 !important;
    overflow-x: auto !important;
    font-family: 'Consolas', 'Courier New', monospace !important;
    font-size: 0.85em !important;
    color: #f1f5f9 !important;
    line-height: 1.45 !important;
}

/* Chat Hyperlinks */
.chat-link {
    color: #10b981 !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    font-weight: 600 !important;
    word-break: break-all !important;
    transition: color 0.15s ease, opacity 0.15s ease !important;
    cursor: pointer !important;
}

.chat-link:hover {
    color: #34d399 !important;
    opacity: 0.9 !important;
}

.chat-msg.player .chat-link {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* Bullet & Numbered List Items */
.chat-list-item {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 3px 0;
    line-height: 1.5;
}

.chat-list-item.chat-num-item {
    margin-top: 10px;
    margin-bottom: 4px;
    font-weight: 600;
}

.chat-list-bullet {
    color: #10b981;
    font-size: 1.1em;
    font-weight: bold;
    user-select: none;
    line-height: 1;
    min-width: 12px;
}

.chat-msg.player .chat-list-bullet {
    color: #ffffff;
}

.chat-list-num {
    color: #34d399;
    font-weight: 700;
    user-select: none;
    min-width: 18px;
}

.chat-msg.player .chat-list-num {
    color: #ffffff;
}

.chat-list-text {
    flex: 1;
}

/* Blockquote */
.chat-quote {
    border-left: 3px solid #10b981;
    margin: 8px 0;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.08);
    border-radius: 0 6px 6px 0;
    color: #cbd5e1;
    font-style: italic;
}



