* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sora','Segoe UI',Arial,sans-serif;
    background: #f4f6fa;
    min-height: 100vh;
}



/* ── HERO ── */
.hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: flex-start;
    padding: 40px 32px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    display: none;
    background: none;
    border-radius: 18px 0 0 18px;
}

    .hero-bg::after {
        content: '';
        position: absolute;
        inset: 0;
        background: none;
    }

/* ── SEARCH CARD ── */
.search-card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    width: auto;
    max-width: 100%;
    position: relative;
    z-index: 2;
    transition: padding-top .35s ease;
}

.ai-mode-entry {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    padding-top: 12px;
}

.ai-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
}

    /* Expanded layout when AI mode helper chips (booking / cancellation / voucher)
   are used: occupy ~100% of available width and ~45% of viewport height. */
    .search-card.ai-wide {
        width: 100%;
        max-width: 100%;
        min-height: 45vh;
    }

    .search-card.chips-gone {
        padding-top: 14px;
    }

/* ── PANEL ── */
.panel {
    display: none;
}

    .panel.active {
        display: block;
    }

/* ── AI MODE OVERLAY ── */
.ai-mode-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: transparent;
    z-index: 1200;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .ai-mode-overlay.open {
        display: flex;
    }

.ai-mode-panel {
    width: 100vw;
    max-width: 100%;
    height: 85vh;
    max-height: 85vh;
    background: #fff;
    border-radius: 0;
    box-shadow: 0 18px 60px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-mode-panel-body {
    padding: 16px 20px 20px;
    overflow: hidden;
}

.ai-mode-panel-header {
    padding: 4px 20px 14px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.ai-mode-panel-title {
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-mode-panel-title .ai-tts-ctrl {
    margin-left: 6px;
}

.ai-mode-panel-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    display: inline-block;
}

.ai-tts-ctrl {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-tts-toggle {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #e0e3ec;
    background: #fff;
    color: #1a1a2e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ai-tts-toggle svg {
    display: block;
}

.ai-tts-toggle:hover {
    border-color: #ff6b2c;
    color: #ff6b2c;
    background: #fff8f5;
}

.ai-tts-toggle.playing {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.ai-tts-toggle.paused {
    background: rgba(255, 255, 255, 0.35);
    border-color: rgba(255, 255, 255, 0.6);
    color: #1a1a2e;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.ai-mode-panel-close {
    width: 22px;
    height: 22px;
}

.ai-mode-panel-clear {
    border: 1px solid #e0e3ec;
    background: #fff;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
}

    .ai-mode-panel-clear:hover {
        border-color: #ff6b2c;
        color: #ff6b2c;
        background: #fff8f5;
    }

.ai-mode-panel-input-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 1.5px solid #e0e3ec;
    border-radius: 12px;
    background: #f8f9fa;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

    .ai-mode-panel-input-wrap:focus-within {
        border-color: #ff6b2c;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(255,107,44,.08);
    }

.ai-mode-panel-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12px;
    color: #1f1f1f;
    resize: none;
    padding: 2px 4px;
    font-family: inherit;
    line-height: 1.55;
    min-height: 24px;
    max-height: 120px;
    overflow-y: auto;
}

.ai-panel-send-btn {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: #e8eaed;
    color: #aaa;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}

    .ai-panel-send-btn:enabled {
        background: #ff6b2c;
        color: #fff;
        cursor: pointer;
        box-shadow: 0 3px 12px rgba(255,107,44,.28);
    }

/* Outer wrap — NO box/border, flat like Gemini */
.ai-chat-wrap {
    border-radius: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Travel place chips ── */
.ai-place-chips {
    padding: 6px 0 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    background: transparent;
    overflow: hidden;
    max-height: 120px;
    opacity: 1;
    transition: max-height .35s ease, opacity .25s ease, padding .35s ease;
}

    .ai-place-chips.hidden {
        max-height: 0 !important;
        opacity: 0 !important;
        padding: 0 !important;
        pointer-events: none;
    }

.ai-place-chip,
.ai-userHelper-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #e8eaf0;
    background: #fff;
    font-size: 12px;
    color: #555;
    font-weight: 500;
    cursor: pointer;
    transition: all .18s;
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.4;
}

    .ai-place-chip:hover,
    .ai-userHelper-chip:hover {
        background: #fff4ee;
        border-color: #ff6b2c;
        color: #ff6b2c;
        transform: translateY(-1px);
        box-shadow: 0 3px 10px rgba(255,107,44,.12);
    }

    .ai-place-chip span {
        font-size: 13px;
        line-height: 1;
    }

/* ── Chat messages area — max height expanded ── */
.ai-chat-body {
    padding: 4px 0 8px;
    min-height: 180px;
    max-height: 360px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
    transition: max-height .35s ease;
}

    .ai-chat-body::-webkit-scrollbar {
        width: 3px;
    }

    .ai-chat-body::-webkit-scrollbar-thumb {
        background: #e0e3ec;
        border-radius: 2px;
    }

/* hotel-suggest / hotel-select removed — auto-proceed on all result counts */

/* ════════════════════════════════════════════════════
       NEARBY BUTTON — shown at bottom-right of bot message
    ════════════════════════════════════════════════════ */
.ai-msg-actions-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 6px;
    gap: 6px;
}

.nearby-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid #e0e3ec;
    background: #fff;
    color: #555;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .18s;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    white-space: nowrap;
}

    .nearby-btn:hover {
        border-color: #ff6b2c;
        color: #ff6b2c;
        background: #fff8f5;
        box-shadow: 0 2px 8px rgba(255,107,44,.12);
    }

    .nearby-btn svg {
        flex-shrink: 0;
    }

    .nearby-btn.loading {
        opacity: .55;
        pointer-events: none;
    }

    .nearby-btn.active {
        border-color: #ff6b2c;
        color: #ff6b2c;
        background: #fff3ee;
    }

/* ════════════════════════════════════════════════════
       NEARBY HOTELS PANEL — with req/res body display
    ════════════════════════════════════════════════════ */
.nearby-panel {
    margin-top: 8px;
    border-radius: 12px;
    border: 1.5px solid #e8eaf0;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,.09);
    animation: nearbyIn .22s ease;
}

@keyframes nearbyIn {
    from {
        opacity: 0;
        transform: translateY(6px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.nearby-panel-header {
    padding: 9px 14px;
    background: #1a1a2e;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.nearby-panel-title {
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nearby-panel-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
}

    .nearby-panel-badge.pending {
        background: rgba(251,188,4,.18);
        color: #fbbc04;
    }

    .nearby-panel-badge.ok {
        background: rgba(52,168,83,.2);
        color: #34a853;
    }

    .nearby-panel-badge.err {
        background: rgba(234,67,53,.2);
        color: #ea4335;
    }

.nearby-panel-close {
    background: rgba(255,255,255,.12);
    border: none;
    color: #ccc;
    cursor: pointer;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
}

    .nearby-panel-close:hover {
        background: rgba(255,255,255,.22);
        color: #fff;
    }

/* req/res two-column pane */
.nearby-io-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #0d0d1a;
}

.nearby-io-col {
    background: #1a1a2e;
    padding: 10px 13px;
}

    .nearby-io-col:last-child {
        background: #12122a;
    }

.nearby-io-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

    .nearby-io-label span {
        font-size: 9.5px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .07em;
    }

    .nearby-io-label .req-lbl {
        color: #8ab4f8;
    }

    .nearby-io-label .res-lbl {
        color: #a8d8b9;
    }

.nearby-io-copy {
    background: rgba(138,180,248,.12);
    border: 1px solid rgba(138,180,248,.25);
    color: #8ab4f8;
    border-radius: 5px;
    padding: 2px 7px;
    font-size: 9.5px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

    .nearby-io-copy.res {
        background: rgba(168,216,185,.1);
        border-color: rgba(168,216,185,.25);
        color: #a8d8b9;
    }

.nearby-io-pre {
    background: #0d0d1a;
    border: 1px solid rgba(255,255,255,.06);
    border-radius: 7px;
    padding: 9px 10px;
    margin: 0;
    font-size: 11.5px;
    line-height: 1.6;
    overflow-y: auto;
    max-height: 140px;
    font-family: 'Courier New',monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

    .nearby-io-pre.req {
        color: #8ab4f8;
    }

    .nearby-io-pre.res {
        color: #a8d8b9;
    }

/* loading row inside panel */
.nearby-loading {
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #888;
    background: #fff;
}

.nearby-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #f0f1f5;
    border-top-color: #ff6b2c;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}

/* divider between req/res and hotel list */
.nearby-divider {
    padding: 7px 14px;
    background: #f8f9fa;
    border-top: 1px solid #f0f1f5;
    border-bottom: 1px solid #f0f1f5;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* hotel result items */
.nearby-hotel-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-bottom: 1px solid #f5f6fa;
    transition: background .14s;
}

    .nearby-hotel-item:last-child {
        border-bottom: none;
    }

    .nearby-hotel-item:hover {
        background: #fafbfc;
    }

.nearby-hotel-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: #fff3ee;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #ff6b2c;
}

.nearby-hotel-info {
    flex: 1;
    min-width: 0;
}

.nearby-hotel-name {
    font-size: 12.5px;
    font-weight: 600;
    color: #1a1a2e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nearby-hotel-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 1px;
}

.nearby-hotel-dist {
    font-size: 11px;
    font-weight: 700;
    color: #ff6b2c;
    flex-shrink: 0;
    white-space: nowrap;
}

.nearby-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: #aaa;
}


/* ── Booking details card (rendered inside AI chat bubble) ── */
.ai-booking-card {
    border-radius: 10px;
    border: 1px solid #dde1ec;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
    font-size: 12.5px;
    min-width: 240px;
    /* Make booking detail box span full width of its chat bubble */
    width: 100%;
}

/* ── OLD header removed — replaced by collapsible strip ── */
.ai-booking-header {
    display: none;
}

/* ── Collapsible summary strip (always visible) ── */
.bk-summary-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px 9px 13px;
    background: #fff;
    cursor: pointer;
    user-select: none;
    gap: 8px;
    transition: background .15s;
}

    .bk-summary-strip:hover {
        background: #f8f9fc;
    }

/* Left side: ref label + value + hotel name (two-line block) */
.bk-ref-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.bk-ref-main {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bk-ref-label {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: .06em;
    flex-shrink: 0;
}

.bk-ref-val {
    font-size: 13px;
    font-weight: 800;
    color: #111827;
    font-family: 'Courier New', monospace;
    letter-spacing: .06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bk-ref-sub {
    font-size: 11px;
    color: #4b5563;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Right side: status badge + chevron */
.bk-strip-right {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-shrink: 0;
}

/* Status badge */
.bk-status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 99px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.bk-status-confirmed {
    background: #d1fae5;
    color: #065f46;
}

.bk-status-expired {
    background: #fef3c7;
    color: #92400e;
}

.bk-status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.bk-status-pending {
    background: #ede9fe;
    color: #5b21b6;
}

.bk-status-default {
    background: #e5e7eb;
    color: #374151;
}

/* Chevron toggle button */
.bk-chevron-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid #e0e3ec;
    background: #f4f6fb;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s, border-color .15s, transform .2s;
}

    .bk-chevron-btn:hover {
        background: #e8eaf4;
        border-color: #c5c9d8;
    }

    .bk-chevron-btn svg {
        transition: transform .25s cubic-bezier(.4,0,.2,1);
        display: block;
    }
/* Rotate chevron when expanded */
.ai-booking-card.bk-expanded .bk-chevron-btn svg {
    transform: rotate(180deg);
}

/* ── Collapsible body — hidden by default ── */
.ai-booking-body {
    padding: 0;
    background: #f9fafb;
    max-height: 0;
    overflow: hidden;
    transition: max-height .28s cubic-bezier(.4,0,.2,1);
    border-top: 0px solid #eef0f6;
}

.ai-booking-card.bk-expanded .ai-booking-body {
    max-height: 600px;
    border-top: 1px solid #eef0f6;
}

/* ── Old bk-top-strip hidden (ref now lives in summary strip) ── */
.bk-top-strip {
    display: none;
}

/* Section divider */
.bk-divider {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px 4px;
    font-size: 10px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
    background: #f3f4f8;
    border-top: 1px solid #eef0f6;
    margin-top: 2px;
}

    .bk-divider:first-child {
        border-top: none;
        margin-top: 0;
    }

/* Key-value rows (table-like: label column + value column) */
.ai-booking-row {
    display: grid;
    grid-template-columns: 160px minmax(0,1fr);
    column-gap: 12px;
    row-gap: 2px;
    align-items: flex-start;
    padding: 4px 13px;
    color: #374151;
    background: #fff;
}

    .ai-booking-row:last-child {
        padding-bottom: 7px;
    }

    .ai-booking-row .k {
        font-weight: 600;
        color: #6b7280;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .ai-booking-row .v {
        font-size: 12px;
        color: #111827;
        font-weight: 500;
        word-break: break-word;
    }

    .ai-booking-row.hint {
        font-size: 11px;
        color: #6b7280;
        padding: 8px 13px;
        justify-content: center;
        grid-template-columns: 1fr;
    }

/* Section grid: arrange rows themselves in multiple columns so
   different fields (hotel, stay, room, etc.) appear in a tabular
   layout across the width when the dropdown is expanded. */
.bk-section,
.bk-section-hotel {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 16px;
    row-gap: 4px;
}

    .bk-section .ai-booking-row,
    .bk-section-hotel .ai-booking-row {
        padding-left: 0;
        padding-right: 0;
    }

.bk-error-row .v {
    color: #b91c1c;
    font-size: 11.5px;
}

/* List header for booking / cancellation / voucher views */
.bk-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 13px 4px;
    background: #f9fafb;
    border-radius: 10px 10px 0 0;
    border: 1px solid #eef0f6;
    border-bottom: none;
}

.bk-list-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.bk-list-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.bk-list-chip {
    border-radius: 999px;
    border: 1px solid #e0e3ec;
    background: #ffffff;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s,border-color .15s,color .15s;
}

    .bk-list-chip:hover {
        background: #fff8f5;
        border-color: #ff6b2c;
        color: #ff6b2c;
    }

/* Legacy pre block */
.ai-booking-pre {
    margin: 6px 0 0;
    padding: 6px 8px;
    border-radius: 6px;
    background: #111827;
    color: #e5e7eb;
    font-family: 'Courier New',monospace;
    font-size: 11px;
    max-height: 160px;
    overflow: auto;
    white-space: pre-wrap;
}

/* Message rows */
.ai-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}

    .ai-row.user-row {
        flex-direction: row-reverse;
    }

/* Avatar dots */
.ai-badge {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
    align-self: flex-end;
}

.ai-badge-b {
    background: linear-gradient(135deg,#4285f4,#ea4335,#fbbc04,#34a853);
    color: #fff;
}

.ai-badge-u {
    background: #ff6b2c;
    color: #fff;
}

/* Bubbles */
.ai-msg {
    /* Default: use about half of the available row width for normal messages */
    max-width: 50%;
    padding: 9px 13px;
    border-radius: 18px 18px 18px 4px;
    font-size: 12.5px;
    line-height: 1.55;
    color: #1f1f1f;
    background: #f1f3f4;
    word-break: break-word;
    position: relative;
}

    /* When a booking-style card is expanded (chevron clicked), let the
   containing bubble grow to full width so details are shown in breadth. */
    .ai-msg:has(.ai-booking-card.bk-expanded) {
        max-width: 100%;
    }

    .ai-msg.user {
        background: #ff6b2c;
        color: #fff;
        border-radius: 18px 18px 4px 18px;
        cursor: pointer;
    }

        .ai-msg.user:hover::after {
            content: '✏️ Edit';
            position: absolute;
            bottom: -22px;
            right: 0;
            font-size: 10px;
            color: #ff6b2c;
            font-weight: 600;
            white-space: nowrap;
            background: #fff;
            padding: 2px 7px;
            border-radius: 10px;
            border: 1px solid #ffe0d0;
            box-shadow: 0 2px 6px rgba(0,0,0,.08);
        }

        .ai-msg.user.editing {
            background: #fff3ee;
            color: #333;
            border: 2px solid #ff6b2c;
            border-radius: 12px;
            padding: 6px 10px;
        }

.ai-edit-textarea {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 12.5px;
    font-family: inherit;
    color: #333;
    resize: none;
    min-height: 28px;
    max-height: 100px;
    line-height: 1.5;
    overflow-y: auto;
}

.ai-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 6px;
}

.ai-edit-btn {
    padding: 4px 12px;
    border-radius: 20px;
    border: none;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.ai-edit-cancel {
    background: #f1f3f4;
    color: #555;
}

    .ai-edit-cancel:hover {
        background: #e8eaed;
    }

.ai-edit-send {
    background: #ff6b2c;
    color: #fff;
}

    .ai-edit-send:hover {
        background: #e55a1e;
    }

/* Typing loader */
.ai-typing-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.ai-msg.typing {
    background: transparent;
    padding: 4px 0;
    box-shadow: none;
    border: none;
}

.ai-loading-ring {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2.5px solid #e0e3ec;
    border-top-color: #ff6b2c;
    display: inline-block;
    animation: spinG .75s linear infinite;
}

.ui-loading-ring {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: #ff6b2c;
    display: inline-block;
    animation: spinG .75s linear infinite;
}

/* ai-confirm-box removed */

/* ── STOP GENERATION BAR ── */
.ai-stop-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 5px 0 2px;
    gap: 8px;
}

    .ai-stop-bar.visible {
        display: flex;
        animation: fadeInBar .2s ease;
    }

@keyframes fadeInBar {
    from {
        opacity: 0;
        transform: translateY(4px)
    }

    to {
        opacity: 1;
        transform: translateY(0)
    }
}

.ai-stop-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    color: #777;
}

.ai-gen-spinner {
    width: 13px;
    height: 13px;
    border: 2px solid #e0e3ec;
    border-top-color: #4285f4;
    border-radius: 50%;
    animation: spinG .7s linear infinite;
    flex-shrink: 0;
}

@keyframes spinG {
    to {
        transform: rotate(360deg)
    }
}

.ai-stop-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1.5px solid rgba(234,67,53,.35);
    background: rgba(234,67,53,.06);
    color: #c5221f;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .18s;
}

    .ai-stop-btn:hover {
        background: rgba(234,67,53,.12);
        border-color: rgba(234,67,53,.6);
    }

/* ── TTS buttons — absolute top-right, no row needed ── */
.ai-tts-row {
    display: none;
}
/* disabled — using absolute positioned ctrl instead */
 .ai-tts-ctrl {
     display: flex;
     align-items: center;
     gap: 4px;
     opacity: 0.7;
     transition: opacity .2s;
 }

     .ai-tts-ctrl:hover {
         opacity: 1;
     }

/* Speaker pill — icon-only, in toggle bar, no text labels */
#aiSpeakBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #dadce0;
    background: #fff;
    color: #5f6368;
    cursor: pointer;
    transition: all .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

    #aiSpeakBtn:hover {
        background: #f1f3f4;
        border-color: #bdc1c6;
        color: #444;
    }

/* Pause — same style as speaker button, static pause icon (no animation) */
#aiPauseBtn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1.5px solid #dadce0;
    background: #fff;
    color: #5f6368;
    cursor: pointer;
    transition: all .15s;
    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

    #aiPauseBtn:hover {
        background: #f1f3f4;
        border-color: #bdc1c6;
        color: #444;
    }

/* ── Gemini FOOTER ── */
.ai-chat-footer {
    padding: 4px 10% 0;
    background: transparent;
}

/* Gemini-style pill input — no separate outer box */
.ai-input-wrap {
    position: relative;
    border: 1.5px solid #e0e3ec;
    border-radius: 20px;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    transition: border-color .2s,box-shadow .2s,background .2s;
    overflow: hidden;
}

    .ai-input-wrap:focus-within {
        border-color: #ff6b2c;
        background: #fff;
        box-shadow: 0 0 0 3px rgba(255,107,44,.08);
    }

    .ai-input-wrap.mic-on {
        border-color: transparent !important;
        background: #fff !important;
        animation: micRingAnim 2s linear infinite;
    }

@keyframes micRingAnim {
    0% {
        outline: 2.5px solid #4285f4;
        box-shadow: 0 0 10px rgba(66,133,244,.2);
    }

    25% {
        outline: 2.5px solid #ea4335;
        box-shadow: 0 0 10px rgba(234,67,53,.2);
    }

    50% {
        outline: 2.5px solid #fbbc04;
        box-shadow: 0 0 10px rgba(251,188,4,.2);
    }

    75% {
        outline: 2.5px solid #34a853;
        box-shadow: 0 0 10px rgba(52,168,83,.2);
    }

    100% {
        outline: 2.5px solid #4285f4;
        box-shadow: 0 0 10px rgba(66,133,244,.2);
    }
}

.mic-interim-label {
    display: none;
    padding: 10px 16px 0;
    font-size: 12.5px;
    color: #aaa;
    font-style: italic;
    pointer-events: none;
    line-height: 1.4;
}

.ai-chat-input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 13.5px;
    color: #1f1f1f;
    resize: none;
    padding: 10px 12px 2px;
    font-family: inherit;
    line-height: 1.55;
    min-height: 38px;
    max-height: 110px;
    overflow-y: auto;
}

    .ai-chat-input::placeholder {
        color: #aaa;
        font-size: 13px;
    }

    .ai-chat-input::-webkit-scrollbar {
        width: 3px;
    }

    .ai-chat-input::-webkit-scrollbar-thumb {
        background: #e0e3ec;
        border-radius: 2px;
    }

.ai-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 6px 6px;
}

.ai-footer-left {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ai-footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ai-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: background .15s,color .15s;
}

    .ai-icon-btn:hover {
        background: #f1f3f4;
        color: #555;
    }

.ai-mic-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    transition: all .2s;
    position: relative;
}

    .ai-mic-btn:hover {
        background: #f1f3f4;
        color: #555;
    }

    .ai-mic-btn.mic-on {
        background: rgba(234,67,53,.08);
        color: #ea4335;
    }

        .ai-mic-btn.mic-on::after {
            content: '';
            position: absolute;
            inset: -3px;
            border-radius: 50%;
            border: 2px solid rgba(234,67,53,.35);
            animation: micRing 1.4s ease-in-out infinite;
        }

@keyframes micRing {
    0%,100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.18);
        opacity: .4;
    }
}

.ai-char-count {
    font-size: 11px;
    color: #bbb;
    font-family: inherit;
    transition: color .2s;
}

    .ai-char-count.warn {
        color: #fbbc04;
    }

    .ai-char-count.over {
        color: #ea4335;
    }

.ai-send-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #e8eaed;
    color: #aaa;
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    flex-shrink: 0;
}

    .ai-send-btn.ready {
        background: #ff6b2c;
        color: #fff;
        cursor: pointer;
        box-shadow: 0 3px 12px rgba(255,107,44,.28);
    }

        .ai-send-btn.ready:hover {
            background: #e55a1e;
            transform: scale(1.06);
        }

    .ai-send-btn.stop {
        background: #ea4335;
        color: #fff;
        cursor: pointer;
        box-shadow: 0 3px 12px rgba(234,67,53,.25);
    }

        .ai-send-btn.stop:hover {
            background: #d93025;
            transform: scale(1.04);
        }

.ai-tts-ctrl {
    display: none;
}

/* ── CHATBOT FAB ── */
.chatbot-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #1a1a2e;
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(26,26,46,.35);
    z-index: 999;
    transition: transform .2s,background .2s;
}

    .chatbot-fab.chatbot-visible {
        display: flex;
        animation: fabPop .35s cubic-bezier(.34,1.56,.64,1);
    }

    .chatbot-fab:hover {
        transform: scale(1.08);
        background: #ff6b2c;
    }

    .chatbot-fab svg {
        width: 26px;
        height: 26px;
    }

@keyframes fabPop {
    from {
        transform: scale(0);
        opacity: 0
    }

    to {
        transform: scale(1);
        opacity: 1
    }
}

/* ── CHATBOT WINDOW ── */
.chatbot-window {
    position: fixed;
    bottom: 90px;
    right: 24px;
    width: 275px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 50px rgba(0,0,0,.18);
    z-index: 998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e8eaf0;
}

    .chatbot-window.open {
        display: flex;
    }

.chatbot-header {
    background: #1a1a2e;
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 15px;
}

    .chatbot-header .dot {
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #2ecc71;
        flex-shrink: 0;
    }

.chatbot-body {
    padding: 16px;
    min-height: 180px;
    max-height: 260px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    background: #f0f1f5;
    border-radius: 12px 12px 12px 2px;
    padding: 10px 13px;
    font-size: 13px;
    color: #333;
    max-width: 88%;
    line-height: 1.5;
}

    .chat-bubble.user {
        background: #ff6b2c;
        color: #fff;
        border-radius: 12px 12px 2px 12px;
        align-self: flex-end;
    }

.chatbot-footer {
    border-top: 1px solid #e8eaf0;
    padding: 10px 14px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input {
    flex: 1;
    border: 1.5px solid #e0e3ec;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    color: #333;
    font-family: inherit;
}

    .chat-input:focus {
        border-color: #ff6b2c;
    }

.chat-send-btn {
    background: #ff6b2c;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 13px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
}

    .chat-send-btn:hover {
        background: #e55a1e;
    }

/* ── JSON MODAL ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}

    .modal-overlay.open {
        display: flex;
    }

.modal-box {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 28px 28px 22px;
    width: 580px;
    max-width: 95vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.4);
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-tag {
    color: #ff6b2c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.modal-title {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    background: rgba(255,255,255,.1);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-source {
    background: rgba(255,107,44,.15);
    border: 1px solid rgba(255,107,44,.3);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    color: #ff6b2c;
    font-weight: 600;
}

.modal-pre {
    background: #0d0d1a;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    padding: 18px;
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: #a8d8b9;
    overflow-y: auto;
    max-height: 360px;
    font-family: 'Courier New',monospace;
    white-space: pre-wrap;
    word-break: break-all;
}

.modal-copy {
    background: #ff6b2c;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

    .modal-copy:hover {
        background: #e55a1e;
    }
/* Search Now button */
.modal-search-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: background .18s;
}

    .modal-search-btn:hover {
        background: #1557b0;
    }

    .modal-search-btn:disabled {
        background: #555;
        cursor: not-allowed;
        opacity: .6;
    }
/* Spinner */
.modal-spinner {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 12px;
}

.spinner-ring {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: #ff6b2c;
    border-radius: 50%;
    animation: spin .75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}
/* Response panel */
.modal-resp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.modal-resp-label {
    font-size: 11px;
    font-weight: 700;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.modal-resp-status {
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
}

    .modal-resp-status.ok {
        background: rgba(52,168,83,.2);
        color: #34a853;
    }

    .modal-resp-status.err {
        background: rgba(234,67,53,.2);
        color: #ea4335;
    }

/* ── AUTH MODAL ── */
.auth-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(26,26,46,.6);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

    .auth-overlay.open {
        display: flex;
    }

.auth-modal {
    background: #fff;
    border-radius: 18px;
    padding: 36px 32px 28px;
    width: 380px;
    max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    position: relative;
}

.auth-title {
    font-size: 22px;
    font-weight: 800;
    color: #1a1a2e;
    margin-bottom: 4px;
}

.auth-sub {
    font-size: 13px;
    color: #888;
    margin-bottom: 24px;
}

    .auth-sub span {
        color: #ff6b2c;
        font-weight: 600;
    }

.auth-field {
    margin-bottom: 14px;
}

    .auth-field label {
        font-size: 12px;
        font-weight: 700;
        color: #555;
        display: block;
        margin-bottom: 5px;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .auth-field input {
        width: 100%;
        border: 1.5px solid #e0e3ec;
        border-radius: 9px;
        padding: 10px 14px;
        font-size: 14px;
        color: #333;
        outline: none;
        font-family: inherit;
        transition: border .2s;
    }

        .auth-field input:focus {
            border-color: #ff6b2c;
        }

.auth-submit {
    width: 100%;
    background: #ff6b2c;
    color: #fff;
    border: none;
    border-radius: 9px;
    padding: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    font-family: inherit;
}

    .auth-submit:hover {
        background: #e55a1e;
    }

.auth-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: #f4f6fa;
    border: none;
    color: #555;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .auth-close:hover {
        background: #e0e3ec;
    }

.auth-error {
    font-size: 12px;
    color: #e55a1e;
    margin-top: 6px;
    display: none;
}

/* ══════════════════════════════════════════════════════
   CANCEL BOOKING BUTTON  (inside booking card footer)
   ══════════════════════════════════════════════════════ */
.bk-cancel-action {
    padding: 10px 14px 12px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
}

.bk-cancel-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: #c0392b;
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    font-family: inherit;
}

    .bk-cancel-btn:hover {
        background: #fdecea;
        border-color: #e74c3c;
        color: #a93226;
    }

    .bk-cancel-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
    }

/* ══════════════════════════════════════════════════════
   CANCEL CONFIRMATION WIDGET  (shown inline in chat)
   ══════════════════════════════════════════════════════ */
.bk-confirm-wrap {
    background: #fff;
    border: 1px solid #e6e9ef;
    border-radius: 12px;
    padding: 12px 14px;
    max-width: 420px;
    margin: 6px 0;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
}

.bk-confirm-msg {
    font-size: 13px;
    color: #2f3640;
    display: flex;
    align-items: flex-start;
    gap: 7px;
    margin-bottom: 10px;
    line-height: 1.45;
}

    .bk-confirm-msg svg {
        flex-shrink: 0;
        margin-top: 1px;
    }

.bk-confirm-btns {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.bk-confirm-yes,
.bk-confirm-no {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}

.bk-confirm-yes {
    background: #ff6b2c;
    color: #fff;
    border-color: #ff6b2c;
}

    .bk-confirm-yes:hover {
        background: #e85e20;
        border-color: #e85e20;
    }

.bk-confirm-no {
    background: #f4f6fa;
    color: #445;
    border-color: #e0e3ec;
}

    .bk-confirm-no:hover {
        background: #e9edf4;
        border-color: #d3d9e5;
    }

.bk-confirm-ref {
    margin-left: auto;
    font-size: 11px;
    font-weight: 700;
    color: #ff6b2c;
    background: #fff3ee;
    border: 1px solid #ffd7c3;
    padding: 2px 8px;
    border-radius: 12px;
    white-space: nowrap;
}

.bk-voucher-inline {
    border: 1px solid #e6e9ef;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,.06);
    max-width: 420px;
}

.bk-voucher-inline-title {
    font-size: 12px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}

.bk-voucher-inline-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #555;
    padding: 3px 0;
}

.bk-voucher-inline-row strong {
    color: #1a1a2e;
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════
   CANCELLATION POLICY MODAL POPUP
   ══════════════════════════════════════════════════════ */
/* ── CANCELLATION POLICY MODAL OVERLAY ── */
.bk-cpol-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.48);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

    .bk-cpol-overlay.bk-cpol-visible {
        opacity: 1;
        pointer-events: auto;
    }

.bk-cpol-dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.22), 0 0 0 1px rgba(255,107,44,.08);
    width: min(540px, 95vw);
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(18px) scale(.97);
    transition: transform .28s cubic-bezier(.34,1.56,.64,1);
}

.bk-cpol-overlay.bk-cpol-visible .bk-cpol-dialog {
    transform: translateY(0) scale(1);
}

/* ── Header ── */
.bk-cpol-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 14px;
    border-bottom: 1.5px solid #fff0ea;
    flex-shrink: 0;
    background: linear-gradient(135deg, #fff8f5 0%, #fff 100%);
}

.bk-cpol-title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -.01em;
}

/* Ref number pill inside title */
.bk-cpol-refbadge {
    display: inline-block;
    background: #fff0ea;
    color: #ff6b2c;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 9px;
    border-radius: 20px;
    border: 1px solid #ffd6c0;
    letter-spacing: .02em;
    margin-left: 2px;
}

.bk-cpol-close {
    background: none;
    border: 1px solid transparent;
    font-size: 22px;
    line-height: 1;
    color: #aaa;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: 6px;
    font-family: inherit;
    transition: all .15s;
    flex-shrink: 0;
}

    .bk-cpol-close:hover {
        background: #fff0ea;
        border-color: #ffd6c0;
        color: #ff6b2c;
    }

/* ── Body ── */
.bk-cpol-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    scroll-behavior: smooth;
}

    .bk-cpol-body::-webkit-scrollbar {
        width: 5px;
    }

    .bk-cpol-body::-webkit-scrollbar-track {
        background: #f9f9f9;
        border-radius: 4px;
    }

    .bk-cpol-body::-webkit-scrollbar-thumb {
        background: #ffd6c0;
        border-radius: 4px;
    }

        .bk-cpol-body::-webkit-scrollbar-thumb:hover {
            background: #ff6b2c;
        }

/* ── Loading state ── */
.bk-cpol-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    font-size: 13px;
    padding: 20px 0;
}

.bk-cpol-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2.5px solid #ffd6c0;
    border-top-color: #ff6b2c;
    border-radius: 50%;
    animation: cpolSpin .7s linear infinite;
    flex-shrink: 0;
}

@keyframes cpolSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Key-value table ── */
.bk-cpol-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .bk-cpol-table td {
        padding: 7px 8px;
        border-bottom: 1px solid #f8f8f8;
        vertical-align: top;
        line-height: 1.5;
    }

    .bk-cpol-table tr:last-child td {
        border-bottom: none;
    }

    .bk-cpol-table tr:hover td {
        background: #fffaf8;
    }

.bk-cpol-key {
    color: #777;
    font-weight: 500;
    white-space: nowrap;
    width: 44%;
    font-size: 12.5px;
}

.bk-cpol-val {
    color: #1a1a2e;
    font-weight: 500;
    word-break: break-word;
}

.bk-cpol-section {
    color: #ff6b2c;
    font-weight: 700;
    font-size: 11px;
    padding-top: 12px;
    padding-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .07em;
    border-bottom: none !important;
    background: none !important;
}

.bk-cpol-indent {
    padding-left: 20px !important;
}

.bk-cpol-raw {
    font-size: 12px;
    color: #444;
    background: #f8f8f8;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px 12px;
    white-space: pre-wrap;
    word-break: break-all;
    margin: 0;
    line-height: 1.6;
}

.bk-cpol-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #c0392b;
    font-size: 13px;
    padding: 12px 14px;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    border-radius: 8px;
    line-height: 1.5;
}

.bk-cpol-empty {
    color: #999;
    font-size: 13px;
    padding: 16px 0;
    text-align: center;
}

/* ── Footer ── */
.bk-cpol-footer {
    padding: 12px 20px 16px;
    border-top: 1.5px solid #fff0ea;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: #fefefe;
}

.bk-cpol-footer-note {
    font-size: 11px;
    color: #bbb;
    font-style: italic;
}

.bk-cpol-dismiss {
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 700;
    background: linear-gradient(135deg, #ff6b2c, #f7941d);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all .18s;
    box-shadow: 0 3px 10px rgba(255,107,44,.35);
    letter-spacing: .01em;
}

    .bk-cpol-dismiss:hover {
        background: linear-gradient(135deg, #e85e20, #e8850f);
        box-shadow: 0 4px 14px rgba(255,107,44,.45);
        transform: translateY(-1px);
    }

    .bk-cpol-dismiss:active {
        transform: translateY(0);
        box-shadow: 0 2px 6px rgba(255,107,44,.3);
    }

/* ═══════════════════════════════════════════════════
   CANCELLATION POLICY POPUP — 4-field display styles
   cpol-summary-row  : deadline + charge pills
   cpol-conditions   : decoded HTML conditions block
═══════════════════════════════════════════════════ */

/* Summary pill row */
.cpol-summary-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.cpol-pill {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    flex: 1;
    min-width: 160px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid #f0f0f0;
    background: #fafafa;
}

    .cpol-pill svg {
        flex-shrink: 0;
        margin-top: 2px;
    }

.cpol-pill--deadline {
    border-color: #ffe0cc;
    background: #fff8f5;
    color: #ff6b2c;
}

    .cpol-pill--deadline svg {
        color: #ff6b2c;
    }

.cpol-pill--charge {
    border-color: #ffdede;
    background: #fff5f5;
    color: #c0392b;
}

    .cpol-pill--charge svg {
        color: #c0392b;
    }

.cpol-pill-label {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #aaa;
    margin-bottom: 3px;
}

.cpol-pill-value {
    font-size: 13.5px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
}

.cpol-charge-val {
    color: #c0392b;
}

/* Conditions section label */
.cpol-conditions-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #ff6b2c;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1.5px solid #fff0ea;
}

/* Rendered HTML from dotwCancellationCondition */
.cpol-conditions-body {
    font-size: 13px;
    line-height: 1.7;
    color: #333;
}

    /* Normalise common tags that hotels return */
    .cpol-conditions-body p {
        margin: 0 0 8px;
    }

    .cpol-conditions-body ul,
    .cpol-conditions-body ol {
        margin: 0 0 8px;
        padding-left: 20px;
    }

    .cpol-conditions-body li {
        margin-bottom: 4px;
    }

    .cpol-conditions-body table {
        width: 100%;
        border-collapse: collapse;
        margin: 8px 0;
        font-size: 12.5px;
    }

    .cpol-conditions-body th,
    .cpol-conditions-body td {
        padding: 6px 9px;
        border: 1px solid #eee;
        text-align: left;
    }

    .cpol-conditions-body th {
        background: #fff8f5;
        color: #ff6b2c;
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .cpol-conditions-body tr:hover td {
        background: #fffaf8;
    }

    .cpol-conditions-body strong,
    .cpol-conditions-body b {
        color: #1a1a2e;
    }

    .cpol-conditions-body h1,
    .cpol-conditions-body h2,
    .cpol-conditions-body h3 {
        font-size: 13px;
        font-weight: 700;
        color: #1a1a2e;
        margin: 10px 0 5px;
    }

/* ═══════════════════════════════════════════════════
   VOUCHER DETAILS POPUP  (bk-vchr-*)
   Spa-Ticket style — teal left stub + beige main body
   ═══════════════════════════════════════════════════ */

/* ── Overlay backdrop ── */
.bk-vchr-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 1300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
    padding: 16px;
}

    .bk-vchr-overlay.bk-vchr-visible {
        opacity: 1;
        pointer-events: all;
    }

/* ── Ticket wrapper (close btn positioned relative to this) ── */
.bk-vchr-ticket {
    position: relative;
    width: 100%;
    max-width: 620px;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,.38);
    transform: translateY(28px) scale(.97);
    transition: transform .28s cubic-bezier(.22,.68,0,1.2);
}

.bk-vchr-overlay.bk-vchr-visible .bk-vchr-ticket {
    transform: translateY(0) scale(1);
}

/* ── Close ── */
.bk-vchr-close {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 10;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.22);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}

    .bk-vchr-close:hover {
        background: rgba(255,255,255,.38);
    }

/* ── Body scrollable area ── */
.bk-vchr-body {
    background: #f5f0e8;
    overflow-y: auto;
    flex: 1;
}

    .bk-vchr-body::-webkit-scrollbar {
        width: 5px;
    }

    .bk-vchr-body::-webkit-scrollbar-track {
        background: #ede8df;
    }

    .bk-vchr-body::-webkit-scrollbar-thumb {
        background: #4a9b8e;
        border-radius: 4px;
    }

/* ── Loading state ── */
.bk-vchr-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 24px;
    color: #4a9b8e;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: .02em;
    background: #f5f0e8;
}

.bk-vchr-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #c8deda;
    border-top-color: #4a9b8e;
    border-radius: 50%;
    animation: vchrSpin .7s linear infinite;
    display: inline-block;
}

@keyframes vchrSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Error / empty ── */
.bk-vchr-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 24px 20px;
    background: #fff3f0;
    border: 1px solid #f5c6c0;
    border-radius: 8px;
    margin: 20px;
    font-size: 13px;
    color: #c0392b;
    line-height: 1.5;
}

.bk-vchr-empty {
    text-align: center;
    padding: 40px 24px;
    font-size: 13.5px;
    color: #7a6e5f;
    font-style: italic;
}

/* ══════════════════════════════════════
   SPA TICKET INNER LAYOUT
   ══════════════════════════════════════ */

/* Teal header band */
.vchr-ticket-header {
    background: #3d7d74;
    color: #fff;
    padding: 22px 64px 22px 24px; /* right pad for close btn */
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.vchr-ticket-header-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vchr-ticket-header-text {
}

.vchr-ticket-label {
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: .12em;
    opacity: .78;
    font-weight: 600;
}

.vchr-ticket-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .01em;
    line-height: 1.2;
    margin-top: 2px;
}

/* Decorative zigzag tear line */
.vchr-tear {
    height: 20px;
    background: #3d7d74;
    position: relative;
    flex-shrink: 0;
}

    .vchr-tear::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 20px;
        background: #f5f0e8;
        clip-path: polygon( 0% 100%, 2% 0%, 4% 100%, 6% 0%, 8% 100%, 10% 0%, 12% 100%, 14% 0%, 16% 100%, 18% 0%, 20% 100%, 22% 0%, 24% 100%, 26% 0%, 28% 100%, 30% 0%, 32% 100%, 34% 0%, 36% 100%, 38% 0%, 40% 100%, 42% 0%, 44% 100%, 46% 0%, 48% 100%, 50% 0%, 52% 100%, 54% 0%, 56% 100%, 58% 0%, 60% 100%, 62% 0%, 64% 100%, 66% 0%, 68% 100%, 70% 0%, 72% 100%, 74% 0%, 76% 100%, 78% 0%, 80% 100%, 82% 0%, 84% 100%, 86% 0%, 88% 100%, 90% 0%, 92% 100%, 94% 0%, 96% 100%, 98% 0%, 100% 100% );
    }

/* Main ticket content area (two-column: left stub + right detail) */
.vchr-ticket-content {
    display: flex;
    min-height: 0;
}

/* LEFT stub — teal strip */
.vchr-ticket-stub {
    background: #4a9b8e;
    width: 100px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 20px 8px;
    gap: 8px;
    position: relative;
}

    .vchr-ticket-stub::after {
        content: '';
        position: absolute;
        top: 0;
        bottom: 0;
        right: 0;
        width: 1px;
        border-right: 2px dashed rgba(255,255,255,.35);
    }

.vchr-stub-treat {
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .16em;
    color: rgba(255,255,255,.85);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
}

.vchr-stub-icon {
    opacity: .55;
}

.vchr-stub-brand {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.7);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    text-align: center;
}

/* RIGHT detail panel */
.vchr-ticket-detail {
    flex: 1;
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

/* Hotel name + city banner */
.vchr-detail-hotel {
    font-size: 17px;
    font-weight: 700;
    color: #2c4a46;
    line-height: 1.25;
    border-bottom: 1px dashed #c8bfb0;
    padding-bottom: 12px;
}

.vchr-detail-city {
    font-size: 12px;
    font-weight: 500;
    color: #6b7c78;
    margin-top: 2px;
}

/* Stay dates pills row */
.vchr-detail-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.vchr-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e0eeeb;
    color: #2c4a46;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 11.5px;
    font-weight: 600;
}

    .vchr-date-pill svg {
        flex-shrink: 0;
        color: #4a9b8e;
    }

.vchr-date-arrow {
    font-size: 13px;
    color: #4a9b8e;
    font-weight: 700;
}

/* Info grid */
.vchr-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px 14px;
}

.vchr-grid-cell {
    background: #ede8df;
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 0;
}

.vchr-grid-label {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #6b7c78;
    margin-bottom: 3px;
}

.vchr-grid-value {
    font-size: 13px;
    font-weight: 600;
    color: #2c4a46;
    word-break: break-word;
}

    .vchr-grid-value.vchr-highlight {
        color: #3d7d74;
        font-size: 14px;
        font-weight: 700;
    }

/* Additional details section */
.vchr-detail-section-title {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #4a9b8e;
    border-top: 1px dashed #c8bfb0;
    padding-top: 10px;
    margin-top: 2px;
}

/* Footer bar */
.vchr-ticket-footer {
    background: #3d7d74;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px 10px 24px;
    gap: 10px;
    flex-shrink: 0;
}

.vchr-footer-ref {
    font-size: 11px;
    color: rgba(255,255,255,.75);
    font-weight: 600;
    letter-spacing: .04em;
}

.vchr-footer-close {
    padding: 6px 20px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,.18);
    color: #fff;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
    letter-spacing: .03em;
}

    .vchr-footer-close:hover {
        background: rgba(255,255,255,.3);
    }

.bk-vchr-open-btn:hover {
    background: linear-gradient(135deg, #2d9447, #22903c);
    box-shadow: 0 4px 14px rgba(52,168,83,.4);
    transform: translateY(-1px);
}

/* ── Inline cancellation policy shown in voucher flow ── */
.bk-cancellation-inline {
    background: #fff9f3;
    border: 1px solid #f5c88a;
    border-radius: 10px;
    padding: 12px 16px;
    margin: 2px 0 4px;
    font-size: 12.5px;
}

.bk-cancellation-inline-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #e67e22;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.bk-cancellation-inline-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px dashed #f5e0c5;
}

    .bk-cancellation-inline-row:last-of-type {
        border-bottom: none;
    }

.bk-ci-label {
    font-size: 11px;
    font-weight: 600;
    color: #8a7060;
    white-space: nowrap;
}

.bk-ci-value {
    font-size: 12.5px;
    font-weight: 700;
    color: #4a3020;
    text-align: right;
}

.bk-cancellation-inline-policy {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #f5e0c5;
    font-size: 11.5px;
    color: #6b5040;
    line-height: 1.55;
    font-style: italic;
}

/* ══════════════════════════════════════════════
   AI MODE ENTRY BUTTON (inside search-card)
══════════════════════════════════════════════ */

.ai-mode-entry {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 4px 0 6px;
}

.ai-mode-entry-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ai-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #7c3aed;
    background: rgba(124,58,237,.09);
    border: 1px solid rgba(124,58,237,.18);
    border-radius: 20px;
    padding: 3px 10px 3px 7px;
}

.ai-mode-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f8f5ff 0%, #fff 60%);
    border: 1.5px solid rgba(124,58,237,.22);
    border-radius: 16px;
    padding: 16px 18px;
    cursor: pointer;
    text-align: left;
    transition: border-color .25s, box-shadow .25s, transform .18s;
    box-shadow: 0 2px 14px rgba(124,58,237,.07);
    position: relative;
    overflow: hidden;
}

    .ai-mode-btn::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(124,58,237,.06) 0%, transparent 60%);
        border-radius: inherit;
        opacity: 0;
        transition: opacity .25s;
    }

    .ai-mode-btn:hover {
        border-color: rgba(124,58,237,.5);
        box-shadow: 0 4px 24px rgba(124,58,237,.16);
        transform: translateY(-1px);
    }

        .ai-mode-btn:hover::before {
            opacity: 1;
        }

    .ai-mode-btn:active {
        transform: translateY(0);
    }

.ai-mode-btn-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    box-shadow: 0 4px 12px rgba(124,58,237,.35);
    animation: ai-icon-pulse 3s ease-in-out infinite;
}

@keyframes ai-icon-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(124,58,237,.35);
    }

    50% {
        box-shadow: 0 4px 22px rgba(124,58,237,.55);
    }
}

.ai-mode-btn-text {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -.2px;
    flex-shrink: 0;
}

.ai-mode-btn-hint {
    font-size: 13px;
    color: #888;
    font-weight: 400;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ai-mode-btn-arrow {
    color: #7c3aed;
    opacity: .7;
    transition: transform .2s, opacity .2s;
    flex-shrink: 0;
}

.ai-mode-btn:hover .ai-mode-btn-arrow {
    transform: translateX(3px);
    opacity: 1;
}

/* entry chips row */
.ai-mode-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ai-entry-chip {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    background: #f4f6fa;
    border: 1px solid #e4e7ef;
    border-radius: 20px;
    padding: 5px 12px;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}

    .ai-entry-chip:hover {
        background: rgba(124,58,237,.08);
        border-color: rgba(124,58,237,.3);
        color: #7c3aed;
    }

/* ══════════════════════════════════════════════
   AI MODE OVERLAY + SLIDING PANEL
══════════════════════════════════════════════ */

.ai-mode-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,10,30,.52);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .32s ease, visibility .32s ease;
}

    .ai-mode-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.ai-mode-panel {
    background: #fff;
    border-radius: 26px 26px 0 0;
    width: 100%;
    max-width: 740px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(48px);
    opacity: 0;
    transition: transform .38s cubic-bezier(.22,.8,.36,1), opacity .32s ease;
    box-shadow: 0 -8px 60px rgba(0,0,0,.18);
}

.ai-mode-overlay.open .ai-mode-panel {
    transform: translateY(0);
    opacity: 1;
}

/* Panel Header */
.ai-mode-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 14px;
    border-bottom: 1px solid #f0f1f6;
    flex-shrink: 0;
}

.ai-mode-panel-title {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: -.25px;
}

.ai-mode-panel-icon {
    width: 34px;
    height: 34px;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.ai-mode-panel-live-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: live-blink 1.6s ease-in-out infinite;
}

@keyframes live-blink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: .4;
        transform: scale(.75);
    }
}

.ai-mode-panel-close {
    width: 34px;
    height: 34px;
    background: #f4f6fa;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: background .18s, color .18s;
}

    .ai-mode-panel-close:hover {
        background: #fee2e2;
        color: #dc2626;
    }

/* Animated Input Bar */
.ai-mode-panel-input-wrap {
    position: relative;
    margin: 18px 22px 0;
    flex-shrink: 0;
}

.ai-panel-input-glow {
    position: absolute;
    inset: -1px;
    border-radius: 17px;
    background: linear-gradient(135deg, rgba(124,58,237,.4), rgba(168,85,247,.4), rgba(124,58,237,.4));
    background-size: 200% 200%;
    animation: glow-move 3s linear infinite;
    opacity: 0;
    transition: opacity .3s;
    pointer-events: none;
    z-index: 0;
}

.ai-mode-panel-input-wrap:focus-within .ai-panel-input-glow {
    opacity: 1;
}

@keyframes glow-move {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.ai-mode-panel-input {
    width: 100%;
    box-sizing: border-box;
    background: #f8f7ff;
    border: 1.5px solid rgba(124,58,237,.2);
    border-radius: 16px;
    padding: 14px 52px 14px 18px;
    font-size: 14.5px;
    font-family: 'Sora', 'DM Sans', sans-serif;
    color: #1a1a2e;
    resize: none;
    outline: none;
    line-height: 1.5;
    transition: border-color .2s, background .2s;
    position: relative;
    z-index: 1;
    min-height: 52px;
    max-height: 130px;
    overflow-y: auto;
}

    .ai-mode-panel-input:focus {
        border-color: rgba(124,58,237,.5);
        background: #fff;
    }

    .ai-mode-panel-input::placeholder {
        color: #aaa;
        font-style: normal;
    }

.ai-panel-send-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: #7c3aed;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    z-index: 2;
    transition: background .18s, transform .18s, opacity .18s;
    opacity: .4;
}

    .ai-panel-send-btn:not([disabled]) {
        opacity: 1;
        cursor: pointer;
    }

        .ai-panel-send-btn:not([disabled]):hover {
            background: #6d28d9;
            transform: translateY(-50%) scale(1.06);
        }

/* Panel chips */
.ai-mode-panel-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 12px 22px 0;
    flex-shrink: 0;
}

.ai-panel-chip {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    background: #f4f6fa;
    border: 1px solid #e4e7ef;
    border-radius: 20px;
    padding: 5px 13px;
    cursor: pointer;
    transition: background .18s, border-color .18s, color .18s;
}

    .ai-panel-chip:hover {
        background: rgba(124,58,237,.08);
        border-color: rgba(124,58,237,.3);
        color: #7c3aed;
    }

/* Panel body — scrollable chat area */
.ai-mode-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px 22px 18px;
    min-height: 0;
}

/* Typewriter cursor */
@keyframes ai-caret-blink {
    0%, 100% {
        border-right-color: rgba(124,58,237,.7);
    }

    50% {
        border-right-color: transparent;
    }
}

.ai-mode-panel-input.typing-caret {
    border-right: 2px solid rgba(124,58,237,.7);
    animation: ai-caret-blink .7s step-end infinite;
}

/* ── Responsive ── */
@media (min-width: 640px) {
    .ai-mode-overlay {
        align-items: center;
        padding: 20px;
    }

    .ai-mode-panel {
        border-radius: 24px;
        max-height: 82vh;
        transform: translateY(32px) scale(.97);
    }

    .ai-mode-overlay.open .ai-mode-panel {
        transform: translateY(0) scale(1);
    }
}

/* ══════════════════════════════════════════════
   AI MODE PANEL LAYOUT FIXES
   Ensure the chat area uses the available height in the overlay
   (avoid a tiny fixed-height chat window / double scrollbars).
══════════════════════════════════════════════ */

.ai-mode-panel-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ai-mode-panel-body #aiPanel {
    flex: 1;
    min-height: 0;
}

.ai-mode-panel-body #aiPanel .ai-chat-wrap {
    height: 100%;
}

.ai-mode-panel-body #aiPanel .ai-place-chips {
    flex-shrink: 0;
}

.ai-mode-panel-body #aiPanel .ai-chat-body {
    flex: 1;
    min-height: 0;
    max-height: none;
}
