/* ============================================
   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 */
    --color-primary: #fac847;
    --color-primary-hover: #e5b63e;
    --color-primary-light: rgba(250, 200, 71, 0.15);
    --color-primary-shadow: rgba(250, 200, 71, 0.25);

    /* Text Colors */
    --color-text-primary: #1f2937;
    --color-text-secondary: #161d2a;
    --color-text-tertiary: #9ca3af;

    /* Background Colors */
    --color-bg-white: #fff;
    --color-bg-light: #f9fafb;
    --color-bg-gray: #f3f4f6;
    --color-bg-gray-light: #f8f8f8;
    --color-bg-dark: #1f2937;
    --color-bg-dark-hover: #374151;

    /* Border Colors */
    --color-border: #e5e7eb;
    --color-border-light: #d1d5db;

    /* Status Colors */
    --color-error: #ef4444;
    --color-warning-light: #ffc107;
    --color-success: #10b981;
    --color-star: #fbbf24;

    /* 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);

    /* 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);

    /* 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-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-12: 3rem;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Animation Durations */
    --duration-fast: 0.15s;
    --duration-normal: 0.2s;
    --duration-slow: 0.3s;

    /* Z-Index Layers */
    --z-dropdown: 10;
    --z-modal: 100;
    --z-overlay: 1000;
    --z-gallery: 100000;
}

* {
    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;
}

.property-list-view .property-image-carousel {
    width: 11rem;
    min-width: 11rem;
    height: auto;
    min-height: 8.5rem;
    flex-shrink: 0;
    align-self: stretch;
    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: center;
    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: #F5F6F7;
}

.property-list-view .property-price {
    margin-top: 0;
    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: 1rem 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: 1rem 0 !important;
    display: block !important;
}

.markdown-content li,
.message-content .markdown-content li {
    display: list-item !important;
    margin: 0.5rem 0 !important;
    line-height: 1.75 !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: #edb726;
}

/* ===========================
   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: #F6F6FF;
    color: #39404A;
    font-weight: 600;
    font-size: 0.875rem;
    border-left: 0.0625rem solid #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 #EEF0F1;
    border-bottom: 0.0625rem solid #EEF0F1;
    color: #484F58;
    font-weight: 400;
    white-space: nowrap;
}

.markdown-content tbody td:first-child {
    font-weight: 600;
    color: #111;
    border-left: none;
}

.markdown-content tbody tr:nth-child(even) td {
    background: #F9F9F9CC;
}

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

.markdown-content tbody tr:hover {
    background: #fafafa;
}

/* Scrollable wrapper for overflow */
.markdown-content .table-wrapper,
.markdown-content table {
    overflow-x: auto;
    overflow-y: hidden;
    display: block;
    border-radius: 0.75rem;
    -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;
    }
}

.chat-backdrop {
    position: fixed;
    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: 9999;
    animation: fadeIn 0.3s ease;
}

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

    .chat-main {
        display: flex;
        flex-direction: column;
        overflow: hidden;
        min-width: 0;
        width: 100%;
        transition: width 0.3s ease;
    }

    .chat-main.with-map {
        width: 60%;
        padding: 0 1rem
    }

    .right-div {
        width: 40%;
        background: transparent;
        min-width: 0;
        overflow: hidden;
        border-top-left-radius: 0.6325rem;
        border-bottom-left-radius: 0.6325rem;
        animation: slideInRight 0.3s ease;

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

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

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

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

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

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

@keyframes slideInRight {
    from {
        width: 0;
        opacity: 0;
    }

    to {
        width: 40%;
        opacity: 1;
    }
}