/* ==============================================
   XN Assistant Widget — Frontend CSS (Interactive Panel)
   Modo Claro / Blanco Premium
   ============================================== */

   @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

   #xnas-widget {
    position: fixed;
    z-index: 9991; /* Prioridad por encima de sidebars */
    pointer-events: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#xnas-widget.xnas-right { right: 115px; bottom: 24px; }
#xnas-widget.xnas-left  { left:  24px; bottom: 24px; }

/* ── Burbuja / Botón Flotante Principal ────────────*/
#xnas-bubble {
    pointer-events: auto;
    position: absolute;
    bottom: 0;
    right: 0; /* o left dependiente, lo maneja el widget padre */
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.2s ease, transform 0.15s ease, background-color 0.3s;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
    z-index: 2;
}

#xnas-widget.xnas-left #xnas-bubble {
    right: auto;
    left: 0;
}

#xnas-bubble:hover {
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    transform: scale(1.06);
}

#xnas-bubble:active {
    transform: scale(0.93);
}

#xnas-widget.xnas-panel-open #xnas-bubble {
    transform: scale(0) rotate(-90deg);
    opacity: 0;
    pointer-events: none;
}

/* ── Panel de Chat Voice UI ────────────*/
#xnas-panel {
    pointer-events: auto;
    position: absolute;
    bottom: 54px; /* Flota encima de la burbuja que mide 42px */
    right: 0;     /* Alineado al borde derecho del contenedor */
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 10px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom right;
    visibility: hidden;
    z-index: 1;
}

#xnas-widget.xnas-left #xnas-panel {
    transform-origin: bottom left;
}

#xnas-widget.xnas-panel-open #xnas-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Cabecera del Panel */
.xnas-panel-header {
    padding: 20px 20px 15px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.xnas-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    margin-right: 12px;
    box-shadow: 0 4px 10px rgba(99,102,241,0.3);
}

.xnas-info {
    flex: 1;
}

.xnas-name {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.xnas-status-text {
    font-size: 12px;
    font-weight: 500;
    color: #64748b;
    margin: 4px 0 0 0;
}

#xnas-live-subtitles {
    margin-top: 10px;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 10px;
    padding: 8px 10px;
}

.xnas-subtitle-row {
    font-size: 12px;
    color: #334155;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xnas-subtitle-row + .xnas-subtitle-row {
    margin-top: 4px;
    border-top: 1px dashed #e2e8f0;
    padding-top: 4px;
}

.xnas-subtitle-row strong {
    color: #0f172a;
    font-weight: 700;
}

.xnas-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.xnas-close-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Centro Visualizador */
.xnas-visualizer-container {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    background: #fafafa;
}

.xnas-waves {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 60px;
}

.xnas-wave {
    width: 6px;
    height: 15px;
    border-radius: 3px;
    background: #e2e8f0;
    transition: background 0.3s, height 0.2s;
}

/* Controles Base */
.xnas-panel-footer {
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}

.xnas-mic-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    transition: all 0.2s;
}

.xnas-mic-btn:hover {
    transform: scale(1.05);
    background: #dc2626;
}


/* ── Estados Dinamicos del Visualizador ────────────*/

/* Estado: Conectando / Cargando */
#xnas-widget.xnas-connecting .xnas-status-text { color: #d97706; }
#xnas-widget.xnas-connecting .xnas-wave { background: #fcd34d; animation: wavePulse 1s infinite alternate ease-in-out; }
#xnas-widget.xnas-connecting .xnas-wave:nth-child(1) { animation-delay: 0.1s; }
#xnas-widget.xnas-connecting .xnas-wave:nth-child(2) { animation-delay: 0.2s; }
#xnas-widget.xnas-connecting .xnas-wave:nth-child(3) { animation-delay: 0.3s; }
#xnas-widget.xnas-connecting .xnas-wave:nth-child(4) { animation-delay: 0.4s; }
#xnas-widget.xnas-connecting .xnas-wave:nth-child(5) { animation-delay: 0.5s; }

/* Estado: Escuchando (Verde, tu audífono) */
#xnas-widget.xnas-listening .xnas-status-text { color: #10b981; }
#xnas-widget.xnas-listening .xnas-wave { background: #34d399; animation: waveListen 1.5s infinite ease-in-out; }
#xnas-widget.xnas-listening .xnas-wave:nth-child(1) { animation-delay: 0.0s; height: 20px;}
#xnas-widget.xnas-listening .xnas-wave:nth-child(2) { animation-delay: 0.2s; height: 35px;}
#xnas-widget.xnas-listening .xnas-wave:nth-child(3) { animation-delay: 0.4s; height: 50px;}
#xnas-widget.xnas-listening .xnas-wave:nth-child(4) { animation-delay: 0.6s; height: 35px;}
#xnas-widget.xnas-listening .xnas-wave:nth-child(5) { animation-delay: 0.8s; height: 20px;}

/* Estado: Hablando (La IA, Azul/Indigo) */
#xnas-widget.xnas-speaking .xnas-status-text { color: #6366f1; }
#xnas-widget.xnas-speaking .xnas-wave { background: #6366f1; animation: waveTalk 0.4s infinite alternate ease-in-out; }
#xnas-widget.xnas-speaking .xnas-wave:nth-child(1) { animation-duration: 0.5s; animation-delay: 0.1s; }
#xnas-widget.xnas-speaking .xnas-wave:nth-child(2) { animation-duration: 0.4s; animation-delay: 0.2s; }
#xnas-widget.xnas-speaking .xnas-wave:nth-child(3) { animation-duration: 0.3s; animation-delay: 0.0s; }
#xnas-widget.xnas-speaking .xnas-wave:nth-child(4) { animation-duration: 0.5s; animation-delay: 0.3s; }
#xnas-widget.xnas-speaking .xnas-wave:nth-child(5) { animation-duration: 0.4s; animation-delay: 0.1s; }


/* Keyframes */
@keyframes wavePulse {
    0% { height: 10px; opacity: 0.5; }
    100% { height: 35px; opacity: 1; }
}

@keyframes waveListen {
    0%, 100% { transform: scaleY(0.8); opacity: 0.7; }
    50% { transform: scaleY(1.2); opacity: 1; }
}

@keyframes waveTalk {
    0% { height: 10px; }
    100% { height: 55px; }
}

/* ── Disclaimer Modal ──────────────────────────────────────────*/
#xnas-disclaimer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#xnas-disclaimer-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 28px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    text-align: center;
    animation: xnasSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#xnas-disclaimer-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.35);
}

#xnas-disclaimer-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 12px 0;
}

#xnas-disclaimer-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 24px 0;
}

#xnas-disclaimer-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#xnas-btn-cancel {
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

#xnas-btn-cancel:hover {
    background: #e2e8f0;
    color: #334155;
}

#xnas-btn-accept {
    padding: 10px 22px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transition: all 0.2s;
    font-family: inherit;
}

#xnas-btn-accept:hover {
    background: linear-gradient(135deg, #4f46e5, #3730a3);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.45);
}

@keyframes xnasSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* ── Visitor Name Modal ──────────────────────────────────────────*/
#xnas-name-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

#xnas-name-box {
    background: #fff;
    border-radius: 20px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
    text-align: center;
    animation: xnasSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#xnas-name-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.32);
}

#xnas-name-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
}

#xnas-name-text {
    font-size: 14px;
    color: #475569;
    margin: 0 0 14px 0;
}

#xnas-name-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    background: #fff;
    margin-bottom: 14px;
}

#xnas-name-input:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

#xnas-name-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

#xnas-name-cancel {
    padding: 10px 18px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

#xnas-name-cancel:hover {
    background: #e2e8f0;
    color: #334155;
}

#xnas-name-ok {
    padding: 10px 20px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
    transition: all 0.2s;
    font-family: inherit;
}

#xnas-name-ok:hover {
    background: linear-gradient(135deg, #0284c7, #075985);
    transform: translateY(-1px);
}

/* ── Transcript Modal Styles ──────────────────────────────────────────*/

#xnas-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

#xnas-modal-container {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    max-width: 700px;
    width: 100%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: slideInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.xnas-modal-header {
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xnas-modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.xnas-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.xnas-modal-close:hover {
    background: #f1f5f9;
    color: #475569;
}

.xnas-modal-content {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.xnas-sessions-list {
    padding: 24px;
}

.xnas-sessions-scroll {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.xnas-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 14px;
}

.xnas-loading i {
    font-size: 24px;
    margin-right: 8px;
}

.xnas-no-sessions {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    font-size: 16px;
}

.xnas-session-item {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
}

.xnas-session-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.xnas-session-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.xnas-session-info {
    flex: 1;
}

.xnas-session-date {
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    margin-bottom: 4px;
}

.xnas-session-msgs {
    font-size: 12px;
    color: #94a3b8;
}

.xnas-training-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.xnas-session-detail {
    padding: 24px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.xnas-detail-header {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.xnas-btn-back {
    background: #f1f5f9;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    font-family: inherit;
}

.xnas-btn-back:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.xnas-detail-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 16px;
    flex: 1;
}

.xnas-messages-view {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 8px;
}

.xnas-message {
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 10px;
    animation: slideInMessage 0.3s ease-out;
}

.xnas-msg-user {
    background: #f0f9ff;
    border-left: 3px solid #0ea5e9;
}

.xnas-msg-assistant {
    background: #f0fdf4;
    border-left: 3px solid #22c55e;
}

.xnas-msg-header {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.xnas-msg-header i {
    font-size: 14px;
}

.xnas-msg-body {
    font-size: 13px;
    color: #1e293b;
    line-height: 1.5;
    word-break: break-word;
}

.xnas-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.xnas-btn-action {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
}

.xnas-btn-export {
    background: #dbeafe;
    color: #0369a1;
}

.xnas-btn-export:hover {
    background: #bfdbfe;
}

.xnas-btn-email {
    background: #fce7f3;
    color: #be185d;
}

.xnas-btn-email:hover {
    background: #fbcfe8;
}

.xnas-btn-training {
    background: #fef3c7;
    color: #b45309;
}

.xnas-btn-training:hover {
    background: #fde68a;
}

.xnas-btn-delete {
    background: #fee2e2;
    color: #991b1b;
    grid-column: 1 / -1;
}

.xnas-btn-delete:hover {
    background: #fecaca;
}

/* ── Transcript Panel Footer ──────────────────────────────────────────*/

.xnas-panel-footer {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    align-items: center;
}

.xnas-call-btn {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    font-size: 16px;
}

.xnas-mute-toggle-btn {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.xnas-mute-toggle-btn:hover {
    background: #cbd5e1;
    color: #0f172a;
}

.xnas-mute-toggle-btn.is-muted {
    background: #f59e0b;
    color: #ffffff;
    border-color: #d97706;
}

.xnas-hangup-btn {
    background: #ef4444;
    color: #ffffff;
    border-color: #dc2626;
}

.xnas-hangup-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.xnas-transcripts-btn {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.xnas-transcripts-btn:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.xnas-transcripts-btn i {
    font-size: 14px;
}

.xnas-transcripts-btn span {
    display: inline;
}

/* ── Mobile Responsiveness ──────────────────────────────────────────*/

@media (max-width: 600px) {
    #xnas-modal-container {
        max-width: 90vw;
        max-height: 85vh;
    }

    .xnas-detail-actions {
        grid-template-columns: 1fr;
    }

    .xnas-btn-delete {
        grid-column: auto;
    }

    .xnas-transcripts-btn span {
        display: none;
    }

    .xnas-modal-header {
        padding: 16px;
    }

    .xnas-sessions-list {
        padding: 16px;
    }
}

/* ── Animations ──────────────────────────────────────────*/

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes slideInScale {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes slideInMessage {
    from { opacity: 0; transform: translateX(-10px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ── Ticket Module Styles ──────────────────────────────────────────*/

.xnas-ticket-prompt-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.xnas-ticket-prompt-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    max-width: 450px;
    width: 100%;
    padding: 32px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: slideInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.xnas-ticket-prompt-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.xnas-ticket-prompt-header i {
    font-size: 24px;
    color: #f59e0b;
}

.xnas-ticket-prompt-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.xnas-ticket-prompt-text {
    font-size: 14px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.xnas-ticket-prompt-preview {
    background: #f8fafc;
    border-left: 3px solid #f59e0b;
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #1e293b;
    margin-bottom: 20px;
}

.xnas-ticket-prompt-preview strong {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
}

.xnas-ticket-prompt-preview span {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.xnas-ticket-prompt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.xnas-ticket-btn-cancel,
.xnas-ticket-btn-create {
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.xnas-ticket-btn-cancel {
    background: #f1f5f9;
    color: #475569;
}

.xnas-ticket-btn-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.xnas-ticket-btn-create {
    background: #fbbf24;
    color: #78350f;
}

.xnas-ticket-btn-create:hover {
    background: #f59e0b;
    color: #451a03;
}

.xnas-ticket-btn-create:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Ticket Success Modal ──────────────────────────────────────────*/

.xnas-ticket-success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 100001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}

.xnas-ticket-success-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    width: 100%;
    padding: 40px;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: slideInScale 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.xnas-ticket-success-icon {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 16px;
}

.xnas-ticket-success-box h3 {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.xnas-ticket-success-box p {
    margin: 8px 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.6;
}

.xnas-ticket-success-info {
    background: #f0fdf4;
    border-left: 3px solid #10b981;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 0;
    font-size: 13px;
    color: #15803d;
    text-align: left;
}

.xnas-ticket-success-info strong {
    color: #166534;
    display: block;
    margin-top: 12px;
}

.xnas-ticket-success-info strong:first-child {
    margin-top: 0;
}

.xnas-ticket-btn-ok {
    padding: 12px 24px;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-top: 16px;
}

.xnas-ticket-btn-ok:hover {
    background: #059669;
}

/* ── Ticket Loading Modal ──────────────────────────────────────────*/
.xnas-ticket-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 100002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease-out;
}

.xnas-ticket-loading-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 360px;
    padding: 28px 24px;
    text-align: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    animation: slideInScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.xnas-ticket-loading-spinner {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 4px solid #e2e8f0;
    border-top-color: #0ea5e9;
    margin: 0 auto 14px;
    animation: xnasSpin 0.9s linear infinite;
}

.xnas-ticket-loading-box h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.xnas-ticket-loading-box p {
    margin: 0;
    font-size: 14px;
    color: #475569;
}

.xnas-ticket-loading-progress {
    margin-top: 14px;
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.xnas-ticket-loading-progress-bar {
    height: 100%;
    width: 0;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #2563eb);
    transition: width 280ms ease;
}

@keyframes xnasSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
