/* ============================================
   CSS Houdini — custom property for grevon FAB border animation
   (must be in plain CSS, Sass strips @property)
   ============================================ */

@property --ap-fab-border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

/* ============================================
   Base Layout Styles
   ============================================ */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.split-pane {
    height: 100%;
    overflow: hidden;
}

/* Map Pane */
.map-pane {
    position: relative;
}

.map-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 1.25rem;
    left: 0.75rem;
    z-index: 20;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: none;
    background: var(--ap-color-bg-white, #fff);
    box-shadow: var(--ap-shadow-sm);
    cursor: pointer;
    color: var(--ap-color-primary-dark, #1a1a1a);
}

.map-pane booking-map {
    width: 100%;
    height: 100%;
}

/* Hide map when list is active */
.map-pane booking-map.hidden {
    display: none !important;
}

/* ============================================
   CSS Variables
   ============================================ */

:root {
    /* Primary Colors - Black & White Theme */
    --ap-color-primary: #1f2937;
    --ap-color-primary-hover: #374151;
    --ap-color-primary-light: #f3f4f6;
    --ap-color-primary-dark: #111827;
    --ap-color-primary-shadow: rgba(31, 41, 55, 0.25);

    /* Accent Color - Keep yellow for markers */
    --ap-color-accent: #29BBAF;
    --ap-color-accent-hover: #22a89d;
    --ap-color-accent-light: #9fdcd6;
    --ap-color-bg-accent-light: #e7f4f3;

    /* Tertiary Color */
    --ap-color-tertiary: #D5D6FF;
    --ap-color-tertiary-light: #E3DED380;

    --gradient-profile-hero: linear-gradient(90deg, #F6D5F7 -57.82%, #EBF4F5 53.35%);

    /* Secondary Color */
    --ap-color-secondary: #39404A;

    /* Text Colors */
    --ap-color-text-primary: #333333;
    --ap-color-text-secondary: #161d2a;
    --ap-color-text-tertiary: #9ca3af;
    --ap-color-text-dark: #1a1a1a;
    --ap-color-text-muted: #6b7280;

    /* Form Colors */
    --ap-color-form-label: #374151;
    --ap-color-form-input: #333333;
    --ap-color-form-placeholder: #CCCCCC;
    --ap-color-form-border: #CCCCCC;

    /* Background Colors */
    --ap-color-bg-white: #fff;
    --ap-color-bg-light: #f9fafb;
    --ap-color-bg-gray: #f3f4f6;
    --ap-color-bg-gray-light: #f8f8f8;
    --ap-color-bg-quantity-active: #f1f3f4;
    --ap-color-bg-tag: #f5f2ec;
    --ap-color-bg-dark: #1f2937;
    --ap-color-bg-dark-hover: #374151;
    --ap-color-bg-darkest: #111827;
    --ap-color-bg-secondary: #f3f4f6;
    --ap-color-bg-subtle: #fafafa;
    --ap-color-bg-disabled: #e5e7eb;
    --ap-color-banner-bg: #f8fafc;
    --ap-color-highlight-bg: #9fdcd6;

    /* Border Colors */
    --ap-color-border: #e5e7eb;
    --ap-color-border-light: #d1d5db;
    --ap-color-border-lighter: #EEF0F1;
    --ap-color-border-dark: #9ca3af;
    --ap-color-border-muted: #e5e7eb;
    --ap-color-border-card: #E6E6E6;
    --ap-color-border-divider: #EEF0F1;

    /* Status Colors */
    --ap-color-error: #ef4444;
    --ap-color-error-light: #fee2e2;
    --ap-color-error-bg: #fef2f2;
    --ap-color-error-dark: #dc2626;
    --ap-color-error-hover: #b91c1c;
    --ap-color-warning: #d97706;
    --ap-color-warning-light: #ffc107;
    --ap-color-warning-bg: #fef3c7;
    --ap-color-warning-dark: #92400e;
    --ap-color-warning-accent: #f59e0b;
    --ap-color-success: #10b981;
    --ap-color-success-light: #dcfce7;
    --ap-color-success-dark: #16a34a;
    --ap-color-info: #3b82f6;
    --ap-color-star: #fbbf24;
    --ap-color-status-critical: #BA3E5D;
    --ap-color-success-bg: #ecfdf5;

    /* Avatar Gradient */
    --ap-color-avatar-start: #6366f1;
    --ap-color-avatar-end: #8b5cf6;

    /* Blue Palette */
    --ap-color-blue-50: #eff6ff;
    --ap-color-blue-100: #dbeafe;
    --ap-color-blue-200: #bfdbfe;
    --ap-color-blue-500: #3b82f6;
    --ap-color-blue-600: #2563eb;
    --ap-color-blue-700: #1d4ed8;
    --ap-color-blue-800: #1e40af;

    /* Gray Palette */
    --ap-color-gray-500: #6b7280;
    --ap-color-gray-600: #4b5563;
    --ap-color-gray-700: #374151;
    --ap-color-gray-800: #1f2937;
    --ap-color-gray-900: #111827;

    /* Brand Colors */
    --ap-color-brand-purple: #3E40BA;
    --ap-color-message-user-bg: #D5D6FF;
    --ap-color-table-header-bg: #F6F6FF;
    --ap-color-table-cell-text: #484F58;
    --ap-color-table-row-alt: #F9F9F9CC;

    /* Stone Palette */
    --ap-color-stone-100: #f5f5f4;
    --ap-color-stone-200: #e7e5e4;
    --ap-color-stone-300: #d6d3d1;
    --ap-color-stone-400: #a8a29e;
    --ap-color-stone-500: #78716c;
    --ap-color-stone-600: #57534e;

    /* Overlay & Backdrop */
    --ap-backdrop-light: rgba(255, 255, 255, 0.9);
    --ap-backdrop-dark: rgba(0, 0, 0, 0.6);
    --ap-backdrop-darker: rgba(0, 0, 0, 0.85);
    --ap-overlay-black: rgba(0, 0, 0, 0.5);
    --ap-cards-container-gradient: linear-gradient(to top, rgba(31, 41, 55, 0.5) 0%, transparent 100%);

    /* Shadows */
    --ap-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --ap-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --ap-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --ap-shadow-btn: 0 2px 8px rgba(0, 0, 0, 0.15);
    --ap-shadow-card: 0 4px 20px rgba(0, 0, 0, 0.12);
    --ap-shadow-card-hover: 0 8px 30px rgba(0, 0, 0, 0.18);
    --ap-shadow-popup: 0 4px 6px rgba(0, 0, 0, 0.07), 0 10px 20px rgba(0, 0, 0, 0.1);
    --ap-shadow-panel: -4px 0 6px -2px rgb(0 0 0 / 0.025), -10px 0 15px -3px rgb(0 0 0 / 0.04);

    /* Border Radius */
    --ap-radius-xs: 0.25rem;
    --ap-radius-sm: 0.375rem;
    --ap-radius-md: 0.5rem;
    --ap-radius-lg: 0.75rem;
    --ap-radius-xl: 1rem;
    --ap-radius-2xl: 1.25rem;
    --ap-radius-pill: 6.25rem;
    --ap-radius-full: 50%;

    /* Panel Layout */
    --ap-panel-header-height: 3.5rem;

    /* Spacing — clamp(min, preferred, max) for responsive scaling
       min reached ~1024px, max reached ~1440px */
    --ap-space-0-5: 0.125rem;
    --ap-space-1: 0.25rem;
    --ap-space-1-5: 0.325rem;
    --ap-space-2: clamp(0.375rem, 0.6vw, 0.5rem);
    --ap-space-3: clamp(0.625rem, 0.85vw, 0.75rem);
    --ap-space-4: clamp(0.75rem, 1.1vw, 1rem);
    --ap-space-5: clamp(1rem, 1.35vw, 1.25rem);
    --ap-space-6: clamp(1.125rem, 1.6vw, 1.5rem);
    --ap-space-8: clamp(1.5rem, 2.1vw, 2rem);
    --ap-space-12: clamp(2rem, 3.2vw, 3rem);

    /* Font Family */
    --ap-font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;

    /* Font Sizes — clamp(min, preferred, max) for responsive scaling */
    --ap-font-size-3xs: 0.5625rem;
    /* 9px  — static */
    --ap-font-size-2xs: 0.625rem;
    /* 10px — static */
    --ap-font-size-xs: clamp(0.625rem, 0.6rem + 0.1vw, 0.6875rem);
    /* 10→11px */
    --ap-font-size-sm: clamp(0.6875rem, 0.65rem + 0.1vw, 0.75rem);
    /* 11→12px */
    --ap-font-size-md: clamp(0.75rem, 0.7rem + 0.12vw, 0.8125rem);
    /* 12→13px */
    --ap-font-size-base: clamp(0.8125rem, 0.75rem + 0.12vw, 0.875rem);
    /* 13→14px */
    --ap-font-size-lg: clamp(0.875rem, 0.8rem + 0.15vw, 0.9375rem);
    /* 14→15px */
    --ap-font-size-xl: clamp(0.9375rem, 0.85rem + 0.15vw, 1rem);
    /* 15→16px */
    --ap-font-size-2xl: clamp(1rem, 0.9rem + 0.2vw, 1.125rem);
    /* 16→18px */
    --ap-font-size-3xl: clamp(1.125rem, 1rem + 0.25vw, 1.25rem);
    /* 18→20px */
    --ap-font-size-4xl: clamp(1.25rem, 1.1rem + 0.35vw, 1.5rem);
    /* 20→24px */
    --ap-font-size-5xl: clamp(1.5rem, 1.3rem + 0.5vw, 1.875rem);
    /* 24→30px */

    /* Animation Durations - standardized across components */
    --ap-duration-fast: 150ms;
    /* micro-interactions (hover, focus) */
    --ap-duration-normal: 300ms;
    /* panel transitions, modals */
    --ap-duration-slow: 500ms;
    /* page sequences, complex animations */

    /* Easing Functions - Material Design 3 based */
    --ap-ease-standard: cubic-bezier(0.4, 0, 0.2, 1);
    /* general UI animations */
    --ap-ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
    /* entering elements */
    --ap-ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
    /* exiting elements */

    /* Transitions - combining duration + easing */
    --ap-transition-fast: var(--ap-duration-fast) var(--ap-ease-standard);
    --ap-transition-normal: var(--ap-duration-normal) var(--ap-ease-standard);
    --ap-transition-slow: var(--ap-duration-slow) var(--ap-ease-standard);
    --ap-transition-enter: var(--ap-duration-normal) var(--ap-ease-decelerate);
    --ap-transition-exit: var(--ap-duration-fast) var(--ap-ease-accelerate);

    /* Z-Index Layers - Semantic naming */
    --ap-z-base: 1;
    --ap-z-dropdown: 10;
    --ap-z-sticky: 20;
    --ap-z-fixed: 50;
    --ap-z-gutter: 50;
    --ap-z-modal: 100;
    --ap-z-overlay: 1000;
    --ap-z-chat-backdrop: 9999;
    --ap-z-chat: 10000;
    --ap-z-lightbox: 10001;

    /* Semantic Aliases (intentional duplicates for clarity) */
    /* --ap-color-text-primary (#333333) = --ap-color-form-input: both for dark text */
    /* --ap-color-bg-gray (#f3f4f6) = --ap-color-primary-light = --ap-color-bg-secondary: light backgrounds */
    /* --ap-color-border (#e5e7eb) = --ap-color-border-muted: standard border color */
    /* --ap-color-gray-800 (#1f2937) = --ap-color-primary: dark gray/black tones */
}

* {
    font-family: var(--ap-font-family);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

/* ============================================
   Property List View
   ============================================ */

.property-list-view {
    display: none;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 3.5rem 0 1rem;
    box-sizing: border-box;
    background: var(--ap-color-bg-white, #fff);
}

.property-list-view.active {
    display: block;
}

.property-list-view property-card {
    display: block;
    width: 100%;
}

.property-list-view property-card:last-of-type {
    margin-bottom: 1rem;
}

.property-list-view .property-card {
    height: clamp(7.5rem, 12vw, 9.5rem);
}

/* ===========================
   Markdown List Styles - Force bullets
   =========================== */
.markdown-content ul,
.message-content .markdown-content ul {
    list-style-type: disc !important;
    list-style-position: outside !important;
    padding-left: 1.5rem !important;
    margin: 0.75rem 0 !important;
    display: block !important;
}

.markdown-content ol,
.message-content .markdown-content ol {
    list-style-type: decimal !important;
    list-style-position: outside !important;
    padding-left: 1.5rem !important;
    margin: 0.75rem 0 !important;
    display: block !important;
}

.markdown-content li,
.message-content .markdown-content li {
    display: list-item !important;
    margin: 0.65rem 0 !important;
    line-height: 1.65 !important;
}

.markdown-content ul ul {
    list-style-type: circle !important;
}

.markdown-content ul ul ul {
    list-style-type: square !important;
}

.markdown-content ol ol {
    list-style-type: lower-alpha !important;
}

.markdown-content a {
    color: var(--ap-color-accent, #fac847);
}

/* ===========================
   Markdown Table Styles
   =========================== */
.markdown-content table {
    width: max-content;
    border-collapse: collapse;
    font-size: var(--ap-font-size-base);
    border-radius: var(--ap-radius-lg);
    border: 0.0625rem solid var(--ap-color-border-card);
    background: var(--ap-color-bg-white);
    overflow: hidden;
    margin: 1rem 0;
}

.markdown-content thead th {
    padding: 0.5rem 2rem;
    text-align: center;
    background: var(--ap-color-table-header-bg, #F6F6FF);
    color: var(--ap-color-secondary, #39404A);
    font-weight: 600;
    font-size: var(--ap-font-size-base);
    border-left: 0.0625rem solid var(--ap-color-border-divider, #EEF0F1);
    white-space: nowrap;
}

.markdown-content thead th:first-child {
    border-left: none;
}

.markdown-content tbody td {
    padding: 0.5rem 2rem;
    text-align: center;
    border-left: 0.0625rem solid var(--ap-color-border-divider, #EEF0F1);
    border-bottom: 0.0625rem solid var(--ap-color-border-divider, #EEF0F1);
    color: var(--ap-color-table-cell-text, #484F58);
    font-weight: 400;
    white-space: nowrap;
}

.markdown-content tbody td:first-child {
    font-weight: 600;
    color: var(--ap-color-text-dark, #1a1a1a);
    border-left: none;
}

.markdown-content tbody tr:nth-child(even) td {
    background: var(--ap-color-table-row-alt, #F9F9F9CC);
}

.markdown-content tbody tr:last-child td {
    border-bottom: none;
}

.markdown-content tbody tr:hover {
    background: var(--ap-color-bg-subtle, #fafafa);
}

/* Scrollable wrapper for overflow */
.markdown-content .table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    border-radius: var(--ap-radius-lg);
    border: none;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 26rem) {
    .markdown-content thead th {
        padding: 0.5rem 1rem;
        font-size: var(--ap-font-size-sm);
    }

    .markdown-content tbody td {
        padding: 0.5rem 1rem;
        font-size: var(--ap-font-size-sm);
    }
}

/* NOTE: .chat-backdrop is defined in upswing-chat.scss */

.chat-separator {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding: 0 clamp(1rem, 3vw, 4rem);
    position: relative;
}

/* Chat main — flex column so chat-body + text-input stack and fill height */
.chat-main {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    width: 100%;
}

/* Custom element hosts must participate in flex layout. Column direction
   matches chat-body-container's own flex-direction so the height chain is
   explicit: chat-main (column) → chat-body (column, flex:1) → chat-body-container
   (column, flex:1). Each level fills its parent without needing fixed heights,
   so the layout is self-correcting across viewport sizes and iOS Safari URL
   bar transitions. */
.chat-main chat-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

/* Ultrawide: cap chat content width when no side panel */
.chat-separator:not(.has-panel) .chat-main {
    max-width: 56rem;
    margin: 0 auto;
}

.chat-separator.kynect {
    padding: 0;
    transition: padding var(--ap-transition-normal);

    .chat-main {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
        /* Fill available space when no panel */
        min-width: clamp(16rem, 35vw, 18.75rem);
        /* Responsive floor: 256px at 1024px, scales to 300px */
        transition: padding var(--ap-transition-normal);
    }

    .chat-main.with-panel {
        padding: 0 1rem;
        transition: padding var(--ap-transition-normal);
    }

    .right-div {
        position: relative;
        background: var(--ap-color-bg-white, #fff);
        min-width: clamp(18rem, 30vw, 25rem);
        /* Responsive floor: 307px at 1024px, scales to 400px */
        overflow: hidden;
        box-shadow: var(--ap-shadow-panel);
        animation: panelSlideIn var(--ap-duration-normal, 300ms) ease-out forwards;

        booking-map {
            width: 100%;
            height: 100%;
            display: block;
        }

        filter-overlay {
            width: 100%;
            height: 100%;
            display: block;
        }
    }

    /* Padding only when NO map — clamp for fluid intermediate sizes.
       Also applied while the panel is leaving so .chat-separator can grow its
       padding back to the centered-chat value smoothly via the existing
       `transition: padding` rule, instead of snapping when the panel unmounts. */
    &.sep-compact:not(.has-panel),
    &.sep-compact.panel-leaving {
        @media (min-width: 769px) {
            padding: 0 clamp(1rem, 10vw, 15rem);
        }
    }

    &.sep-expanded:not(.has-panel),
    &.sep-expanded.panel-leaving {
        @media (min-width: 769px) {
            padding: 0 clamp(1rem, 15vw, 25rem);
        }
    }

    @media (max-width: 768px) {
        flex-direction: column;
        padding: 0 1rem !important;

        /* Column-flex parent — chat-main needs flex:1 to fill the available
           vertical space so the downstream flex:1 chain (chat-body →
           chat-body-container → messages-container) has a bounded height to
           grow into. Without this, chat-main collapses to content height and
           text-input ends up directly under the last message instead of
           pinned to the bottom. */
        .chat-main,
        .chat-main.with-panel {
            width: 100%;
            flex: 1;
            min-height: 0;
        }

        .map-container {
            width: 100%;
            height: 40vh;
            border-radius: 0;
        }

        .right-div {
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            min-width: unset;
            width: 100%;
            height: 100%;
            border-left: none;
            border-radius: 0;
            box-shadow: none;
            z-index: 10;
            overflow-y: auto;
            background: var(--ap-color-bg-white, #fff);
        }
    }
}

/* Bottom sheet slide-up for mobile panels */
@keyframes bottomSheetSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

/* Chat separator compact view padding override — extra specificity to beat line 506 */
@media (max-width: 768px) {
    .chat-wrapper .chat-separator.kynect {
        padding: 0;
    }

    .chat-separator.kynect .chat-main,
    .chat-separator.kynect .chat-main.with-panel {
        padding: 0;
    }
}

/* Panel slide-in animation — desktop slides from 30% offset (subtle reveal
   alongside the chat-main shrink); mobile uses a full-width slide so the
   open mirrors the close and feels like a native iOS modal. */
@keyframes panelSlideIn {
    from {
        transform: translateX(30%);
        opacity: 0;
    }

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

@keyframes panelSlideInMobile {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

/* Scoped to non-leaving panels so the entry animation doesn't re-fire if
   the cascade ever tied between has-panel + a kynect/other variant; the
   rule still wins by source order on mobile but the explicit scoping
   removes the cascade ambiguity. */
@media (max-width: 768px) {
    .chat-separator.has-panel:not(.panel-leaving) .right-div {
        animation: panelSlideInMobile var(--ap-duration-normal, 300ms) var(--ap-ease-decelerate) forwards;
    }
}

/* Panel slide-out animation. Duration must match PANEL_CLOSE_ANIM_MS in panel.store.ts. */
@keyframes panelSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.chat-separator .right-div.leaving {
    animation: panelSlideOut var(--ap-duration-normal) var(--ap-ease-accelerate) forwards;
    pointer-events: none;
}

/* Panel close: right panel slides out as a positioned overlay so the chat-main
   can animate back to full width without snapping when the splitter destroys.
   Selectors include `has-panel` so they out-rank the .chat-separator.has-panel
   rules defined later in this file. */
.chat-separator.has-panel.panel-leaving .right-div.leaving {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40%;
    min-width: clamp(18rem, 30vw, 25rem);
    flex: none;
    z-index: 1;
}

/* Mobile: the panel covers the full viewport when open, so the close animation
   must slide a full-width overlay off-screen — without this override the
   .right-div.leaving rule above forces width:40% mid-close, producing a
   visible snap before the slide. */
@media (max-width: 768px) {
    .chat-separator.has-panel.panel-leaving .right-div.leaving {
        width: 100%;
        min-width: 100%;
    }
}

/* While the panel is leaving, the chat-main is animated explicitly via the
   Web Animations API in upswing-chat.tsx so we can mirror the open glide
   exactly. The static rules below just establish its end state so the
   animation has somewhere to land. */
.chat-separator.has-panel.panel-leaving .chat-main {
    /* Pin chat-main absolutely while the WAAPI tween drives its width and
       translateX. Otherwise its CSS-computed left position shifts as the
       chat-separator padding transitions, fighting the tween's offsets.
       The right panel is also absolute (z-indexed above) and slides off,
       and the chat-main animation lands at translateX(0) at the centered
       position so it falls naturally back into flex flow on cleanup. */
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    flex: none;
    /* Disable chatMainShrink so it doesn't fight the imperative WAAPI tween. */
    animation: none;
}

.chat-separator.has-panel.panel-leaving .chat-main.with-panel {
    padding: 0;
    transition: padding var(--ap-transition-normal);
}

/* Chat main shrink animation when panel opens */
@keyframes chatMainShrink {
    from {
        width: 100%;
    }

    to {
        width: 60%;
    }
}

/* ============================================
   Shared Panel Styles
   Scoped to custom elements to avoid conflicts with components
   that use same class names (e.g., booking-details)
   ============================================ */

/* Panel Container - inside <panel-container> custom element */
panel-container .panel-container {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--ap-color-bg-white, #fff);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Panel Header - inside <panel-header> custom element */
panel-header .panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--ap-space-4, 1rem) var(--ap-space-5, 1.25rem);
    border-bottom: 1px solid var(--ap-color-border, #e5e7eb);
    gap: var(--ap-space-3, 0.75rem);
    background: var(--ap-color-bg-white, #fff);
}

panel-header .header-left {
    display: flex;
    align-items: center;
    gap: var(--ap-space-2, 0.5rem);
    flex: 1;
    min-width: 0;
}

panel-header .back-btn {
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--ap-transition-fast, 0.15s);
    border-radius: var(--ap-radius-md, 0.5rem);
    margin-left: -0.5rem;
    flex-shrink: 0;
}

panel-header .back-btn:hover {
    background: var(--ap-color-bg-gray, #f3f4f6);
}

panel-header .back-btn svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--ap-color-text-dark, #1a1a1a);
}

panel-header .panel-title {
    margin: 0;
    font-size: var(--ap-font-size-xl);
    font-weight: 600;
    color: var(--ap-color-text-dark, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

panel-header .header-stats {
    display: flex;
    align-items: center;
    gap: var(--ap-space-2, 0.5rem);
    font-size: var(--ap-font-size-md);
    color: var(--ap-color-text-dark, #1a1a1a);
    flex-shrink: 0;
}

panel-header .header-stats span {
    white-space: nowrap;
}

panel-header .stats-divider {
    color: var(--ap-color-text-dark, #1a1a1a);
    opacity: 0.3;
}

/* Panel Content - inside <panel-content> custom element */
panel-content .panel-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: var(--ap-space-4, 1rem) var(--ap-space-5, 1.25rem);
}

panel-content .panel-content::-webkit-scrollbar {
    width: 0.375rem;
}

panel-content .panel-content::-webkit-scrollbar-track {
    background: transparent;
}

panel-content .panel-content::-webkit-scrollbar-thumb {
    background: var(--ap-color-border-light, #d1d5db);
    border-radius: 0.1875rem;
}

@media (max-width: 768px) {
    panel-header .panel-header {
        padding: var(--ap-space-3, 0.75rem) var(--ap-space-4, 1rem);
    }

    panel-header .header-stats {
        display: none;
    }
}

/* ============================================
   Shared Overlay Styles
   Used for full-screen overlays with backdrop blur
   ============================================ */

.booking-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
}

/* ============================================
   Shared Tooltip Styles
   ============================================ */

.floating-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    width: max-content;
    max-width: 13.75rem;
    padding: var(--ap-space-3, 0.75rem);
    background: var(--ap-color-bg-white, #fff);
    color: var(--ap-color-text-primary, #1f2937);
    font-size: var(--ap-font-size-sm);
    font-weight: 400;
    line-height: 1.5;
    border-radius: var(--ap-radius-md, 0.5rem);
    box-shadow: var(--ap-shadow-lg, 0 0.25rem 1rem rgba(0, 0, 0, 0.12));
    border: 1px solid var(--ap-color-border, #e5e7eb);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--ap-transition-fast, 0.15s), visibility var(--ap-transition-fast, 0.15s);
    z-index: var(--ap-z-chat-backdrop);
    pointer-events: none;
}

.floating-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

/* Tooltip arrow - shared base with per-side border variations */
.tooltip-arrow {
    position: absolute;
    width: 0.625rem;
    height: 0.625rem;
    background: var(--ap-color-bg-white, #fff);
    transform: rotate(45deg);
}

.tooltip-arrow[data-side='top'] {
    border-right: 1px solid var(--ap-color-border, #e5e7eb);
    border-bottom: 1px solid var(--ap-color-border, #e5e7eb);
}

.tooltip-arrow[data-side='bottom'] {
    border-left: 1px solid var(--ap-color-border, #e5e7eb);
    border-top: 1px solid var(--ap-color-border, #e5e7eb);
}

.tooltip-arrow[data-side='right'] {
    border-left: 1px solid var(--ap-color-border, #e5e7eb);
    border-bottom: 1px solid var(--ap-color-border, #e5e7eb);
}

.tooltip-arrow[data-side='left'] {
    border-right: 1px solid var(--ap-color-border, #e5e7eb);
    border-top: 1px solid var(--ap-color-border, #e5e7eb);
}

/* ============================================
   Shared Panel Animations
   ============================================ */

@keyframes panel-slide-up {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   Shared Button Styles
   Used by: booking-cart, booking-confirmation, vgs-collect-form
   ============================================ */

/* Base pill button - shared layout and typography */
.btn-pill-primary,
.btn-pill-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ap-space-2);
    padding: 1rem var(--ap-space-6, 1.5rem);
    border-radius: var(--ap-radius-pill);
    font-size: var(--ap-font-size-lg);
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--ap-transition-normal, 0.2s);
}

/* Shared disabled state */
.btn-pill-primary:disabled,
.btn-pill-primary.disabled,
.btn-pill-secondary:disabled,
.btn-pill-secondary.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Primary Pill Button - Dark background, full rounded */
.btn-pill-primary {
    background: var(--ap-color-text-primary, #000);
    color: var(--ap-color-bg-white, #fff);
    border: none;
    box-shadow: var(--ap-shadow-sm);
}

.btn-pill-primary:hover:not(:disabled) {
    background: var(--ap-color-bg-dark, #1a1a1a);
    box-shadow: var(--ap-shadow-md);
    transform: translateY(-0.0625rem);
}

.btn-pill-primary:active:not(:disabled) {
    transform: translateY(0);
}

/* Full-width variant */
.btn-pill-primary.btn-full {
    width: 100%;
}

/* Compact variant - smaller padding */
.btn-pill-primary.btn-compact {
    padding: 0.875rem 2rem;
    font-size: var(--ap-font-size-base);
}

/* Loading state */
.btn-pill-primary.loading {
    pointer-events: none;
}

/* Secondary Button - outline style */
.btn-pill-secondary {
    background: transparent;
    color: var(--ap-color-text-primary, #000);
    border: 1px solid var(--ap-color-text-primary, #000);
}

.btn-pill-secondary:hover:not(:disabled) {
    background: var(--ap-color-text-primary, #000);
    color: var(--ap-color-bg-white, #fff);
}

.btn-pill-secondary:active:not(:disabled) {
    transform: translateY(0);
}

/* Compact variant for secondary */
.btn-pill-secondary.btn-compact {
    padding: 0.75rem 1.5rem;
    font-size: var(--ap-font-size-base);
}

/* Button spinner - simple CSS border animation */
.btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 0.125rem solid color-mix(in srgb, var(--ap-color-bg-white) 30%, transparent);
    border-top-color: var(--ap-color-bg-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Dark variant for light backgrounds */
.btn-spinner.dark {
    border-color: color-mix(in srgb, var(--ap-color-primary) 15%, transparent);
    border-top-color: var(--ap-color-text-primary, #1f2937);
}

/* ============================================
   Shared Panel States (Loading, Error, Empty)
   ============================================ */

.panel-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--ap-space-3, 0.75rem);
    padding: var(--ap-space-8, 2rem);
    min-height: 12rem;
    text-align: center;
}

.panel-state.fill {
    flex: 1;
}

.panel-state.center {
    height: calc(100% - var(--ap-panel-header-height, 3.5rem));
}

.panel-state.overlay {
    position: absolute;
    inset: 0;
    z-index: var(--ap-z-overlay, 1000);
    background: color-mix(in srgb, var(--ap-color-bg-white, #fff) 85%, transparent);
    backdrop-filter: blur(0.25rem);
    -webkit-backdrop-filter: blur(0.25rem);
    animation: overlay-enter var(--ap-duration-normal) ease-out forwards;
}

.panel-state.overlay.leaving {
    animation: overlay-leave var(--ap-duration-normal) ease-in forwards;
}

@keyframes overlay-enter {
    from { opacity: 0; backdrop-filter: blur(0); }
    to { opacity: 1; backdrop-filter: blur(0.25rem); }
}

@keyframes overlay-leave {
    from { opacity: 1; backdrop-filter: blur(0.25rem); }
    to { opacity: 0; backdrop-filter: blur(0); }
}

/* Loading State */
.panel-loading .loading-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    overflow: hidden;
    animation: avatar-pulse 2s ease-in-out infinite;
}

.panel-loading .loading-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Grevon "g." inline SVG variant — dark circle with bouncing teal dot */
.panel-loading .loading-avatar.grevon {
    background: var(--ap-color-primary-dark, #111827);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.panel-loading .loading-avatar.grevon .grevon-loading-mark {
    width: 60%;
    height: 60%;
}

.panel-loading .loading-avatar.grevon .grevon-dot {
    animation: dot-bounce 3s ease-in-out infinite;
}

.panel-loading .state-message {
    font-size: var(--ap-font-size-base);
    font-weight: 500;
    color: var(--ap-color-text-muted, #6b7280);
    animation: text-pulse 2s ease-in-out infinite;
    min-width: 10rem;
    text-align: center;
}

@keyframes avatar-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
}

@keyframes dot-bounce {
    0%, 100% { transform: translateY(0); }
    10% { transform: translateY(-0.5rem); }
    20% { transform: translateY(0); }
    26% { transform: translateY(0); }
    34% { transform: translateY(-0.25rem); }
    42% { transform: translateY(0); }
    47% { transform: translateY(0); }
    53% { transform: translateY(-0.125rem); }
    59% { transform: translateY(0); }
}

@keyframes text-pulse {
    0%, 100% { opacity: 1; transform: translateY(0); }
    25% { opacity: 0.7; }
    50% { opacity: 0.4; transform: translateY(0.125rem); }
    75% { opacity: 0.7; }
}

/* Error State */
.panel-error .error-icon {
    width: 3rem;
    height: 3rem;
    color: var(--ap-color-error, #ef4444);
}

.panel-error .error-icon svg {
    width: 100%;
    height: 100%;
}

.panel-error .state-title {
    font-size: var(--ap-font-size-xl);
    font-weight: 600;
    color: var(--ap-color-text-primary, #1f2937);
}

.panel-error .state-message {
    font-size: var(--ap-font-size-base);
    color: var(--ap-color-text-primary);
    max-width: 20rem;
    line-height: 1.5;
}

.panel-error .btn-pill-secondary {
    margin-top: var(--ap-space-2, 0.5rem);
}

/* Empty State */
.panel-empty {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
        "icon text"
        "btn  btn";
    gap: 0.75rem;
    padding: 1rem;
    min-height: auto;
    border: 1px dashed var(--ap-color-border, #d1d5db);
    border-radius: var(--ap-radius-lg, 0.75rem);
    background: var(--ap-color-bg-light, #f9fafb);
    text-align: left;
}

.panel-empty .empty-icon {
    grid-area: icon;
    align-self: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--ap-radius-md, 0.5rem);
    background: var(--ap-color-bg-white, #fff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--ap-color-text-tertiary, #9ca3af);
}

.panel-empty .empty-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.panel-empty .empty-text {
    grid-area: text;
    align-self: center;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.panel-empty .state-title {
    font-size: var(--ap-font-size-sm);
    font-weight: 600;
}

.panel-empty .state-message {
    font-size: var(--ap-font-size-xs);
    line-height: 1.4;
}

.panel-empty .empty-btn-primary {
    grid-area: btn;
    justify-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 1.5rem;
    background: var(--ap-color-text-primary, #1f2937);
    color: var(--ap-color-bg-white, #fff);
    border: none;
    border-radius: 1.5rem;
    font-size: var(--ap-font-size-sm);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--ap-transition-fast);
}

.panel-empty .empty-btn-primary:hover {
    background: var(--ap-color-bg-dark, #111);
}

/* ============================================
   Payment Blocker
   ============================================ */

.payment-blocker {
    position: absolute;
    inset: 0;
    background: color-mix(in srgb, var(--ap-color-bg-white) 85%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(0.25rem);
}

.payment-blocker .blocker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ap-space-3, 0.75rem);
    text-align: center;
    padding: var(--ap-space-6, 1.5rem);
}

.payment-blocker .blocker-icon {
    width: 5rem;
    height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.payment-blocker .blocker-ripple {
    position: absolute;
    width: 2.5rem;
    height: 2.5rem;
    border: 0.125rem solid var(--ap-color-primary-dark, #111827);
    border-radius: 50%;
    opacity: 0;
    animation: ripple-expand 2s ease-out infinite;
}

@keyframes ripple-expand {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.payment-blocker .blocker-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 0.1875rem solid var(--ap-color-border, #e5e7eb);
    border-top-color: var(--ap-color-primary-dark, #111827);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   Shared Animations
   ============================================ */

/* Single spin animation - used by all spinners */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.payment-blocker .blocker-title {
    font-size: var(--ap-font-size-2xl);
    font-weight: 600;
    color: var(--ap-color-text-primary, #1f2937);
}

.payment-blocker .blocker-message {
    font-size: var(--ap-font-size-base);
    color: var(--ap-color-text-primary);
    max-width: 16rem;
    line-height: 1.5;
}

/* ============================================
   Global AI Loading Indicator
   ============================================ */


/* ============================================
   Split.js Gutter Styles
   ============================================ */

/* Split gutter - zero width, handle floats on panel edge */
.split-gutter {
    width: 0;
    cursor: col-resize;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    z-index: var(--ap-z-gutter, 50);
}

/* Hide gutter when no panel is open */
.chat-separator:not(.has-panel) .split-gutter {
    display: none;
}

/* Simple pill handle - positioned on panel edge */
.split-gutter::after {
    content: '';
    position: absolute;
    left: -0.1875rem;
    width: 0.5rem;
    height: 2.5rem;
    background: var(--ap-color-text-tertiary, #9ca3af);
    border-radius: 62.4375rem;
    transition: all var(--ap-transition-normal);
    opacity: 0;
    animation: handle-fade-in var(--ap-duration-normal) ease-out 0.25s forwards;
}

@keyframes handle-fade-in {
    to {
        opacity: 1;
    }
}

.split-gutter:hover::after {
    opacity: 1;
    height: 3.5rem;
    background: var(--ap-color-text-tertiary, #9ca3af);
}

.split-gutter:active::after {
    height: 4rem;
    background: var(--ap-color-text-tertiary, #9ca3af);
}

/* Split.js integration - elements must be flex items for split to work */
.chat-separator.has-panel .chat-main,
.chat-separator.has-panel .right-div {
    overflow: hidden;
    flex-shrink: 0;
    flex-grow: 0;
    /* flex-basis: auto allows Split.js inline width styles to take effect */
    flex-basis: auto;
}

/* Initial width matches splitter defaults - Split.js overrides with inline styles */
.chat-separator.has-panel .chat-main {
    width: 60%;
    animation: chatMainShrink var(--ap-duration-normal, 300ms) ease-out;
}

.chat-separator.has-panel .right-div {
    width: 40%;
    min-width: 40%;
    /* Matches splitter minimum — prevents clipping before Split.js init */
}

/* Padding for chat main when panel is open */
.chat-separator.has-panel .chat-main.with-panel {
    padding: 0 1rem;
}

@media (min-width: 1280px) {
    .chat-separator.has-panel .chat-main.with-panel {
        padding: 0 2.5rem;
    }
}

/* Compact view (mobile + iPad): right-div takes full screen, hide chat-main */
@media (max-width: 768px) {
    .chat-separator.has-panel .chat-main {
        display: none;
    }

    .chat-separator.has-panel .right-div {
        width: 100%;
        flex-basis: 100%;
        flex-grow: 1;
    }
}

/* LightGallery - must appear above chat widget (var(--ap-z-chat)) */
.lg-container {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--ap-z-lightbox) !important;
}

.image-gallery-lightbox .lg-toolbar {
    padding-top: env(safe-area-inset-top, 0px) !important;
    padding-right: env(safe-area-inset-right, 0px) !important;
}

.image-gallery-lightbox .lg-close {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.image-gallery-lightbox .lg-actions .lg-prev,
.image-gallery-lightbox .lg-actions .lg-next {
    z-index: 10 !important;
    pointer-events: auto !important;
    min-width: 2.75rem !important;
    min-height: 2.75rem !important;
    touch-action: manipulation !important;
}

/* ============================================
   Reduced Motion Support
   For users who prefer reduced motion (vestibular disorders, etc.)
   ============================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   Skeleton Loading Components
   ============================================ */

/* Shimmer animation */
@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }

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

/* ============================================
   Traveller Form — host element fill
   ============================================ */
traveller-form {
    display: contents;
}

/* ============================================
   Country Code Picker (scoped to traveller-form)
   ============================================ */
traveller-form .cp-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    padding: var(--ap-space-3);
    background: var(--ap-color-bg-white);
    overflow: hidden;
    animation: fadeSlideIn var(--ap-duration-normal) ease-out;
    z-index: 10;
}

traveller-form .cp-header {
    display: flex;
    align-items: center;
    gap: var(--ap-space-2);
    margin-bottom: var(--ap-space-3);
}

traveller-form .cp-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: none;
    border: none;
    color: var(--ap-color-text-primary);
    cursor: pointer;
    border-radius: var(--ap-radius-md);
    flex-shrink: 0;
    transition: background var(--ap-transition-fast);
}

traveller-form .cp-back:hover {
    background: var(--ap-color-bg-gray);
}

traveller-form .cp-title {
    font-size: var(--ap-font-size-lg, 0.9375rem);
    font-weight: 600;
    color: var(--ap-color-text-primary);
}

traveller-form .cp-search-bar {
    display: flex;
    align-items: center;
    gap: var(--ap-space-2);
    background: var(--ap-color-bg-light);
    border: 0.09375rem solid transparent;
    border-radius: var(--ap-radius-md);
    padding: var(--ap-space-2) var(--ap-space-3);
    margin-bottom: var(--ap-space-2);
    transition: border-color var(--ap-transition-fast), background var(--ap-transition-fast), box-shadow var(--ap-transition-fast);
}

traveller-form .cp-search-bar:focus-within {
    background: var(--ap-color-bg-white);
    border-color: var(--ap-color-primary-dark);
    box-shadow: 0 0 0 0.1875rem color-mix(in srgb, var(--ap-color-primary-dark) 6%, transparent);
}

traveller-form .cp-search-icon {
    color: var(--ap-color-text-tertiary);
    flex-shrink: 0;
}

traveller-form .cp-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
    font-size: var(--ap-font-size-md, 0.8125rem);
    color: var(--ap-color-text-primary);
    outline: none;
    min-width: 0;
}

traveller-form .cp-search-input::placeholder {
    color: var(--ap-color-text-tertiary);
}

traveller-form .cp-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    background: var(--ap-color-border-light);
    border: none;
    border-radius: 50%;
    color: var(--ap-color-bg-white);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--ap-transition-fast);
}

traveller-form .cp-search-clear:hover {
    background: var(--ap-color-text-tertiary);
}

traveller-form .cp-list {
    flex: 1;
    overflow-y: auto;
    margin: 0;
    padding: 0;
}

traveller-form .cp-list::-webkit-scrollbar {
    width: 0.375rem;
}

traveller-form .cp-list::-webkit-scrollbar-track {
    background: transparent;
}

traveller-form .cp-list::-webkit-scrollbar-thumb {
    background: var(--ap-color-border-light, #d1d5db);
    border-radius: 0.1875rem;
}

traveller-form .cp-item {
    display: flex;
    align-items: center;
    gap: var(--ap-space-2);
    width: 100%;
    padding: 0.5rem var(--ap-space-2);
    background: none;
    border: 1px solid var(--ap-color-border-light, #cccccc);
    margin-bottom: 0.5rem;
    cursor: pointer;
    text-align: left;
    font-size: var(--ap-font-size-md, 0.8125rem);
    color: var(--ap-color-text-primary);
    border-radius: var(--ap-radius-sm);
    transition: background var(--ap-transition-fast);
}

traveller-form .cp-item:hover {
    background: var(--ap-color-bg-light);
}

traveller-form .cp-item.selected {
    background: var(--ap-color-tertiary, #D5D6FF);
}

traveller-form .cp-item.selected .cp-item-code {
    font-weight: 600;
}

traveller-form .cp-item-country {
    font-size: var(--ap-font-size-base, 0.875rem);
    flex-shrink: 0;
    min-width: 1.75rem;
}

traveller-form .cp-item-label {
    flex: 1;
    font-weight: 400;
    color: var(--ap-color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

traveller-form .cp-item-code {
    font-size: var(--ap-font-size-sm, 0.75rem);
    color: var(--ap-color-text-tertiary);
    flex-shrink: 0;
}

traveller-form .cp-item-check {
    color: var(--ap-color-text-primary);
    flex-shrink: 0;
}

traveller-form .cp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--ap-space-2);
    padding: 2rem var(--ap-space-2);
    color: var(--ap-color-text-tertiary);
    font-size: var(--ap-font-size-sm, 0.75rem);
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(0.25rem);
    }

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

/* iOS Safari force-zooms the page when a focused input's computed font-size
   is < 16px, and there's no auto-zoom-back — users have to pinch out to reach
   the send button after typing. Per-component class-level rules set inputs to
   --ap-font-size-sm/base (12-14px) and out-specificity the element selector,
   so !important is required to keep every focused input at >=16px on touch.
   Touch detection (hover:none + pointer:coarse) catches iPhone landscape and
   iPad regardless of viewport width; the max-width fallback handles narrow
   browsers in dev tools / responsive emulators. Desktop keeps the responsive
   --ap-font-size-* clamps that drive design typography. */
@media (hover: none) and (pointer: coarse), (max-width: 1024px) {
    upswing-chat input,
    upswing-chat textarea,
    upswing-chat select {
        font-size: 16px !important;
    }
}

/* ============================================
   Disable image / icon / avatar saving and dragging across the widget.
   The dragstart + contextmenu JS listeners on <upswing-chat> handle the
   right-click "Save image as" and iOS long-press "Add to Photos" menus;
   these CSS rules block the corresponding visual affordances (drag ghost,
   long-press callout, selection highlight) so the gesture either never
   fires or is silently ignored. Determined users can still pull assets
   via DevTools or the network tab — this is a casual-saving deterrent,
   not real DRM.
   ============================================ */
upswing-chat img,
upswing-chat svg,
upswing-chat picture,
upswing-chat canvas {
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    user-select: none;
    -webkit-user-select: none;
}

/* hydratedFlag is class-only (see stencil.config), so lazy panes paint their
   unstyled DOM for a frame on first open — hide until their scoped CSS lands. */
booking-cart:not(.hydrated) {
    visibility: hidden;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 0.0625rem;
    height: 0.0625rem;
    padding: 0;
    margin: -0.0625rem;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}