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

@property --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-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 */
    --color-primary: #1f2937;
    --color-primary-hover: #374151;
    --color-primary-light: #f3f4f6;
    --color-primary-dark: #111827;
    --color-primary-shadow: rgba(31, 41, 55, 0.25);

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

    /* Tertiary Color */
    --color-tertiary: #F5F2EC;

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

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

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

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

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

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

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

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

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

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

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

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

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 20px;
    --radius-full: 50%;

    /* Spacing */
    --space-0-5: 0.125rem;
    --space-1: 0.25rem;
    --space-1-5: 0.325rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-12: 3rem;

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

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

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

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

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

* {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#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(--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;
}

/* Horizontal card layout for list view */
.property-list-view .property-card {
    flex-direction: row;
    align-items: stretch;
    height: auto;
    min-height: 8.5rem;
    border-radius: var(--radius-md, 0.5rem);
    border: 1px solid #cccccc;
    overflow: hidden;
}

.property-list-view .property-image-carousel {
    width: 11rem;
    min-width: 11rem;
    height: 8.5rem;
    max-height: 8.5rem;
    flex-shrink: 0;
    border-radius: var(--radius-md, 0.5rem) 0 0 var(--radius-md, 0.5rem);
}

.property-list-view .property-image-carousel img {
    height: 100%;
    min-height: 8.5rem;
    border-radius: var(--radius-md, 0.5rem) 0 0 var(--radius-md, 0.5rem);
}

.property-list-view .carousel-dots {
    bottom: 0.5rem;
}

.property-list-view .carousel-dot {
    width: 5px;
    height: 5px;
}

.property-list-view .property-details {
    flex: 1;
    padding: 0.75rem 1rem;
    justify-content: flex-start;
    gap: 0.5rem;
}

.property-list-view .property-name {
    margin: 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.property-list-view .property-tags {
    margin-bottom: 0;
    gap: 0.5rem;
}

.property-list-view .property-tag {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: var(--radius-sm, 0.25rem);
    border: none;
    background: var(--color-bg-tag, #f5f2ec);
}

.property-list-view .property-footer {
    margin-top: auto;
}

.property-list-view .property-price {
    font-size: 1rem;
}

/* ===========================
   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.25rem 0 0.4rem !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.25rem 0 0.4rem !important;
    display: block !important;
}

.markdown-content li,
.message-content .markdown-content li {
    display: list-item !important;
    margin: 0.15rem 0 !important;
    line-height: 1.55 !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(--color-accent, #fac847);
}

/* ===========================
   Markdown Table Styles
   =========================== */
.markdown-content table {
    width: max-content;
    border-collapse: collapse;
    font-size: 0.875rem;
    border-radius: 0.75rem;
    border: 0.0625rem solid #e8e8e8;
    background: #fff;
    overflow: hidden;
    margin: 1rem 0;
}

.markdown-content thead th {
    padding: 0.5rem 2rem;
    text-align: center;
    background: var(--color-table-header-bg, #F6F6FF);
    color: var(--color-secondary, #39404A);
    font-weight: 600;
    font-size: 0.875rem;
    border-left: 0.0625rem solid var(--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(--color-border-divider, #EEF0F1);
    border-bottom: 0.0625rem solid var(--color-border-divider, #EEF0F1);
    color: var(--color-table-cell-text, #484F58);
    font-weight: 400;
    white-space: nowrap;
}

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

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

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

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

/* Scrollable wrapper for overflow */
.markdown-content .table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    border-radius: 0.75rem;
    border: 0.0625rem solid var(--color-border-divider, #EEF0F1);
    -webkit-overflow-scrolling: touch;
}

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

    .markdown-content tbody td {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

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

.chat-separator {
    display: flex;
    flex-direction: row;
    height: calc(100vh - 3.75rem);
    flex: 1;
    overflow: hidden;
    padding: 0 1rem;
}

.chat-separator.kynect {
    padding: 0;
    transition: padding 0.25s ease-out;

    .chat-main {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        width: 100%;
        /* Fill available space when no panel */
        min-width: 18.75rem;
        /* 300px - match splitter minSize */
        transition: padding 0.25s ease-out;
    }

    .chat-main.with-panel {
        padding: 0 1rem;
    }

    .right-div {
        background: var(--color-bg-white, #fff);
        min-width: 25rem;
        /* 400px - match splitter minSize */
        overflow: hidden;
        border-left: 1px solid var(--color-border, #e5e7eb);
        box-shadow: var(--shadow-panel);
        animation: panelSlideIn 0.25s ease-out forwards;

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

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

    /* Padding only when NO map */
    &.sep-compact:not(.has-panel) {
        @media (min-width: 481px) {
            padding: 0 15rem;
        }
    }

    &.sep-expanded:not(.has-panel) {
        @media (min-width: 481px) {
            padding: 0 25rem;
        }
    }

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

        .chat-main,
        .chat-main.with-panel {
            width: 100%;
        }

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

/* Panel slide-in animation */
@keyframes panelSlideIn {
    from {
        transform: translateX(50%);
        opacity: 0;
    }

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

/* ============================================
   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(--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(--space-4, 1rem) var(--space-5, 1.25rem);
    border-bottom: 1px solid var(--color-border, #e5e7eb);
    gap: var(--space-3, 0.75rem);
    background: var(--color-bg-white, #fff);
}

panel-header .header-left {
    display: flex;
    align-items: center;
    gap: var(--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(--transition-fast, 0.15s);
    border-radius: var(--radius-md, 0.5rem);
    margin-left: -0.5rem;
    flex-shrink: 0;
}

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

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

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

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

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

panel-header .stats-divider {
    color: var(--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(--space-4, 1rem) var(--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(--color-border-light, #d1d5db);
    border-radius: 3px;
}

@media (max-width: 768px) {
    panel-header .panel-header {
        padding: var(--space-3, 0.75rem) var(--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;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: var(--z-overlay, 1000);
    display: flex;
    justify-content: flex-end;
}

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

.floating-tooltip {
    position: absolute;
    top: 0;
    left: 0;
    width: max-content;
    max-width: 220px;
    padding: var(--space-3, 0.75rem);
    background: var(--color-bg-white, #fff);
    color: var(--color-text-primary, #1f2937);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.5;
    border-radius: var(--radius-md, 0.5rem);
    box-shadow: var(--shadow-lg, 0 0.25rem 1rem rgba(0, 0, 0, 0.12));
    border: 1px solid var(--color-border, #e5e7eb);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-fast, 0.15s), visibility var(--transition-fast, 0.15s);
    z-index: var(--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: 10px;
    height: 10px;
    background: var(--color-bg-white, #fff);
    transform: rotate(45deg);
}

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

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

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

.tooltip-arrow[data-side='left'] {
    border-right: 1px solid var(--color-border, #e5e7eb);
    border-top: 1px solid var(--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, stripe-payment-button, booking-confirmation
   ============================================ */

/* Base pill button - shared layout and typography */
.btn-pill-primary,
.btn-pill-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem var(--space-6, 1.5rem);
    border-radius: 6.25rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--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(--color-text-primary, #000);
    color: var(--color-bg-white, #fff);
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-pill-primary:hover:not(:disabled) {
    background: var(--color-bg-dark, #1a1a1a);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.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: 0.875rem;
}

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

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

.btn-pill-secondary:hover:not(:disabled) {
    background: var(--color-text-primary, #000);
    color: var(--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: 0.875rem;
}

/* Button spinner - simple CSS border animation */
.btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Dark variant for light backgrounds */
.btn-spinner.dark {
    border-color: rgba(0, 0, 0, 0.15);
    border-top-color: var(--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(--space-3, 0.75rem);
    padding: var(--space-8, 2rem);
    min-height: 12rem;
    text-align: center;
}

/* Loading State */
.panel-loading .loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--color-border, #e5e7eb);
    border-top-color: var(--color-primary, #3b82f6);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.panel-loading .state-message {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #6b7280);
}

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

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

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

.panel-error .state-message {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #6b7280);
    max-width: 20rem;
    line-height: 1.5;
}

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

/* Empty State */
.panel-empty .empty-illustration {
    width: 8rem;
    height: auto;
    margin-bottom: var(--space-4, 1rem);
    opacity: 0.9;
}

.panel-empty .empty-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: var(--space-3, 0.75rem);
    color: var(--color-text-tertiary, #9ca3af);
}

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

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

.payment-blocker {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.payment-blocker .blocker-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3, 0.75rem);
    text-align: center;
    padding: var(--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: 2px solid var(--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: 3px solid var(--color-border, #e5e7eb);
    border-top-color: var(--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: 1.125rem;
    font-weight: 600;
    color: var(--color-text-primary, #1f2937);
}

.payment-blocker .blocker-message {
    font-size: 0.875rem;
    color: var(--color-text-secondary, #6b7280);
    max-width: 16rem;
    line-height: 1.5;
}

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

/* Panel Loading State */
.panel-container.panel-loading {
    cursor: wait;
}

/* Disable interactions on all interactive elements while loading */
.panel-container.panel-loading button,
.panel-container.panel-loading a,
.panel-container.panel-loading input,
.panel-container.panel-loading textarea,
.panel-container.panel-loading select,
.panel-container.panel-loading [role="button"],
.panel-container.panel-loading [tabindex]:not([tabindex="-1"]) {
    pointer-events: none;
    cursor: wait;
}

/* Top Loading Bar */
.panel-container.panel-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--color-primary-dark, #111827) 25%,
            var(--color-primary-dark, #111827) 75%,
            transparent 100%);
    animation: panel-loading-slide 1.2s ease-in-out infinite;
    z-index: 10;
    pointer-events: none;
    border-radius: var(--radius-sm, 0.375rem) var(--radius-sm, 0.375rem) 0 0;
}

@keyframes panel-loading-slide {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(200%);
    }
}

/* ============================================
   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(--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: -3px;
    width: 0.5rem;
    height: 2.5rem;
    background: var(--color-text-tertiary, #9ca3af);
    border-radius: 9999px;
    transition: all 0.2s ease-out;
    opacity: 0;
    animation: handle-fade-in 0.2s ease-out 0.25s forwards;
}

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

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

.split-gutter:active::after {
    height: 4rem;
    background: var(--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;
    /* Disable transition during drag for smooth resizing */
    transition: none;
}

/* Initial width matches splitter defaults - Split.js overrides with inline styles */
.chat-separator.has-panel .chat-main {
    width: 60%;
}

.chat-separator.has-panel .right-div {
    width: 40%;
}

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

/* LightGallery - must appear above chat widget (var(--z-chat)) */
.lg-container {
    position: fixed !important;
    inset: 0 !important;
    z-index: var(--z-lightbox) !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;
    }
}

/* Base skeleton element */
.skeleton-image,
.skeleton-title,
.skeleton-subtitle,
.skeleton-tag,
.skeleton-price,
.skeleton-date,
.skeleton-guests,
.skeleton-cart-image {
    background: linear-gradient(90deg,
            var(--color-bg-gray, #f3f4f6) 25%,
            var(--color-bg-light, #f9fafb) 50%,
            var(--color-bg-gray, #f3f4f6) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite linear;
    border-radius: var(--radius-sm, 6px);
}

/* Skeleton cards container */
.skeleton-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-4, 1rem);
    padding: var(--space-4, 1rem);
}

.skeleton-cards.skeleton-vertical {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Single skeleton card - horizontal layout */
.skeleton-card {
    display: flex;
    gap: var(--space-4, 1rem);
    padding: var(--space-4, 1rem);
    background: var(--color-bg-white, #fff);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--color-border, #e5e7eb);
}

.skeleton-vertical .skeleton-card {
    flex-direction: column;
    width: calc(50% - var(--space-2, 0.5rem));
}

.skeleton-image {
    width: 8rem;
    height: 6rem;
    flex-shrink: 0;
}

.skeleton-vertical .skeleton-image {
    width: 100%;
    height: 8rem;
}

.skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-2, 0.5rem);
}

.skeleton-title {
    height: 1.25rem;
    width: 70%;
}

.skeleton-subtitle {
    height: 0.875rem;
    width: 50%;
}

.skeleton-tags {
    display: flex;
    gap: var(--space-2, 0.5rem);
}

.skeleton-tag {
    height: 1.5rem;
    width: 4rem;
}

.skeleton-price {
    height: 1.5rem;
    width: 5rem;
    margin-top: auto;
}

/* Cart skeleton items */
.skeleton-cart-items {
    display: flex;
    flex-direction: column;
    gap: var(--space-4, 1rem);
}

.skeleton-cart-item {
    display: flex;
    gap: var(--space-3, 0.75rem);
    padding: var(--space-3, 0.75rem);
    background: var(--color-bg-white, #fff);
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--color-border, #e5e7eb);
}

.skeleton-cart-image {
    width: 5rem;
    height: 5rem;
    flex-shrink: 0;
}

.skeleton-cart-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-1-5, 0.375rem);
}

.skeleton-meta {
    display: flex;
    gap: var(--space-3, 0.75rem);
}

.skeleton-date,
.skeleton-guests {
    height: 0.75rem;
    width: 4rem;
}

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