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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f9fafb;
    color: #111827;
    overflow-x: hidden;
    overflow-y: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.scrollable {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.app-container {
    display: flex;
    flex-direction: column;
    width: 100vw;
}

.app-container.scrollable {
    min-height: 100vh;
    height: auto;
}

/* Compact Filter Panel */
.filter-panel-compact {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.filter-panel-compact:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.filter-header {
    display: flex;
    align-items: center;
}

.logo-compact {
    font-size: 1rem;
    white-space: nowrap;
    color: #111827;
}

.logo-compact strong {
    font-weight: 700;
}

.search-box-compact {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    font-size: 1rem;
    color: #6b7280;
}

#searchInput {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    transition: all 0.2s;
    background: #f9fafb;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

#searchInput:focus {
    border-color: #22c55e;
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Dropdown Wrapper */
.dropdown-wrapper {
    position: relative;
}

.amenity-dropdown {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    outline: none;
    cursor: pointer;
    background: #f9fafb;
    color: #374151;
    font-weight: 500;
    transition: all 0.2s;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    min-width: 180px;
}

.amenity-dropdown:hover {
    border-color: #22c55e;
    background: white;
}

.amenity-dropdown:focus {
    border-color: #22c55e;
    background: white;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.results-badge {
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}

.results-badge #resultCount {
    font-size: 1rem;
    font-weight: 700;
}

/* Blog Dropdown */
.blog-dropdown-wrapper {
    position: relative;
    z-index: 10001;
}

.blog-dropdown-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #000000;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 40px; /* Touch-friendly size */
}

.blog-dropdown-btn:hover {
    background: #4000ff;
    color: white;
}

.telegram-chat-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #9333ea;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 40px; /* Touch-friendly size */
}

.telegram-chat-btn:hover {
    background: #7e22ce;
    color: white;
}

.qa-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    background: #14b8a6;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    white-space: nowrap;
    font-weight: 600;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 40px; /* Touch-friendly size */
}

.qa-btn:hover {
    background: #0d9488;
    color: white;
}

.clear-btn-compact {
    width: 2rem;
    height: 2rem;
    padding: 0;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 700;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-btn-compact:hover {
    background: #fecaca;
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex: 1;
    position: relative;
    height: 100vh;
    min-height: 100vh;
    overflow: hidden;
    flex-shrink: 0;
}

.app-container.scrollable .main-content {
    height: 100vh;
    min-height: 100vh;
}

.map-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

@media (max-width: 768px) {
    .map-container {
        touch-action: none; /* Prevent page zoom, Mapbox handles its own touch events */
        -ms-touch-action: none;
    }
    
    /* Ensure Mapbox canvas can handle touches */
    .map-container .mapboxgl-canvas-container,
    .map-container .mapboxgl-canvas {
        touch-action: none;
        -ms-touch-action: none;
    }
}

/* On mobile, when scrollable, allow touch events to pass through for page scrolling */
@media (max-width: 768px) {
    body.scrollable .map-container {
        pointer-events: none;
    }
    
    /* Re-enable pointer events for map controls */
    body.scrollable .map-container .mapboxgl-control-container {
        pointer-events: auto;
    }
}

.toggle-btn {
    position: absolute;
    top: 1rem;
    z-index: 10;
    background: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem;
    font-size: 1.25rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: none;
}

.toggle-btn:hover {
    background: #f9fafb;
}

.map-legend {
    position: absolute;
    bottom: 2rem;
    left: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    z-index: 5;
}

.map-legend h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.375rem 0;
    font-size: 0.75rem;
}

.legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.legend-note {
    margin-top: 0.5rem;
    font-size: 0.625rem;
    color: #6b7280;
}

.loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.spinner {
    width: 3rem;
    height: 3rem;
    border: 3px solid #e5e7eb;
    border-top-color: #22c55e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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


/* Mobile Styles */
.mobile-only {
    display: none;
}

@media (max-width: 1023px) {
    .mobile-only {
        display: block;
    }

    .toggle-btn {
        display: block;
    }

    /* Compact filter panel on mobile */
    .filter-panel-compact {
        top: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        transform: none;
        flex-wrap: wrap;
        padding: 0.75rem;
        gap: 0.75rem;
        max-width: none;
    }

    .filter-header {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    .logo-compact {
        font-size: 0.9rem;
    }

    .search-box-compact {
        width: 100%;
        min-width: 100%;
        order: 2;
    }

    .dropdown-wrapper {
        width: 100%;
        min-width: 100%;
        order: 3;
    }

    .amenity-dropdown {
        width: 100%;
        min-width: auto;
    }

    .blog-dropdown-btn,
    .telegram-chat-btn,
    .qa-btn {
        flex: 1;
        min-width: 0;
        order: 4;
        font-size: 0.85rem;
        padding: 0.5rem 0.5rem;
        min-height: 44px; /* iOS touch target minimum */
    }

    .clear-btn-compact {
        order: 5;
        width: 44px;
        height: 44px;
    }

    .results-badge {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
        order: 1;
        width: 100%;
        text-align: center;
    }

    .map-legend {
        left: 0.5rem;
        bottom: 0.5rem;
        font-size: 0.75rem;
        max-width: 200px;
    }
}

@media (max-width: 768px) {
    /* Footer mobile styles */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        display: grid !important;
    }

    .footer-section {
        flex-direction: column !important;
        gap: 1rem;
        width: 100% !important;
    }

    .footer-section h3 {
        white-space: normal;
        margin-bottom: 1rem;
        font-size: 1.1rem;
        width: 100% !important;
    }

    .footer-section ul {
        width: 100% !important;
    }

    .site-footer {
        padding: 2rem 1rem;
    }

    /* Chat widget mobile */
    .chat-widget {
        bottom: 1rem;
        right: 1rem;
    }

    .chat-button {
        width: 56px;
        height: 56px;
        font-size: 1.25rem;
    }

    .chat-window {
        width: 76.5vw !important; /* Reduced by 10% from 85vw */
        max-width: 360px !important; /* Reduced by 10% from 400px */
        height: 54vh !important; /* Reduced by 10% from 60vh */
        max-height: 450px !important; /* Reduced by 10% from 500px */
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        right: auto !important;
        bottom: auto !important;
        position: fixed !important;
        z-index: 10001 !important;
        margin: 0 !important;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
        overflow: hidden !important; /* Keep hidden but ensure flexbox works */
        display: flex !important;
        flex-direction: column !important;
    }
    
    .chat-window .chat-messages {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        min-height: 0 !important;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100% - 140px); /* Reserve space for header and input */
    }
    
    .chat-window .chat-input-container {
        flex: 0 0 auto !important; /* Don't shrink, always visible */
        flex-shrink: 0 !important;
        padding: 0.75rem !important;
    }
    
    .chat-window .send-button {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        white-space: nowrap;
        min-width: 60px;
    }

    /* FAQ mobile */
    .faq-question {
        font-size: 0.9rem;
        padding: 0.875rem 2rem 0.875rem 0;
        min-height: 44px;
    }

    .faq-answer {
        font-size: 0.875rem;
        padding: 0 0 1rem 0;
        line-height: 1.6;
    }

    /* Map legend mobile - hide or reposition */
    .map-legend {
        font-size: 0.7rem;
        padding: 0.5rem;
        max-width: 140px;
        bottom: 1rem;
        left: 0.5rem;
    }

    .map-legend h4 {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .legend-item {
        margin-bottom: 0.25rem;
        font-size: 0.65rem;
    }

    /* Filter panel adjustments */
    .filter-panel-compact {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    #searchInput {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem 0.6rem 2.5rem;
    }

    .amenity-dropdown {
        font-size: 0.9rem;
        padding: 0.6rem 2rem 0.6rem 0.75rem;
    }
}

@media (max-width: 640px) {
    /* Filter panel - full width stack on small screens */
    .filter-panel-compact {
        padding: 0.75rem;
        gap: 0.75rem;
        top: 0;
        left: 0;
        right: 0;
        border-radius: 0 0 1rem 1rem;
    }

    .logo-compact {
        font-size: 0.9rem;
    }

    #searchInput {
        font-size: 1rem; /* Larger for mobile readability */
        padding: 0.75rem 1rem 0.75rem 2.75rem;
        min-height: 44px;
    }

    .search-icon {
        left: 1rem;
        font-size: 1.1rem;
    }

    .amenity-dropdown {
        font-size: 1rem;
        padding: 0.75rem 2.5rem 0.75rem 1rem;
        min-height: 44px;
    }

    /* Buttons mobile - make touch-friendly */
    .blog-dropdown-btn,
    .telegram-chat-btn,
    .qa-btn {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
        min-height: 44px; /* iOS/Android touch target minimum */
        font-weight: 600;
    }

    .clear-btn-compact {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    /* Chat window full width on very small screens - centered (reduced by 10%) */
    .chat-window {
        width: 81vw !important; /* Reduced by 10% from 90vw */
        max-width: 342px !important; /* Reduced by 10% from 380px */
        height: 58.5vh !important; /* Reduced by 10% from 65vh */
        max-height: 495px !important; /* Reduced by 10% from 550px */
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        right: auto !important;
        bottom: auto !important;
        position: fixed !important;
        z-index: 10001 !important;
        margin: 0 !important;
        overflow: hidden !important; /* Keep hidden but ensure flexbox works */
        display: flex !important;
        flex-direction: column !important;
    }
    
    .chat-window .chat-messages {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        min-height: 0 !important;
        -webkit-overflow-scrolling: touch;
        max-height: calc(100% - 140px); /* Reserve space for header and input */
    }
    
    .chat-window .chat-input-container {
        flex: 0 0 auto !important; /* Don't shrink, always visible */
        flex-shrink: 0 !important;
        padding: 0.75rem !important;
    }
    
    .chat-window .send-button {
        padding: 0.75rem 1rem !important;
        font-size: 0.875rem !important;
        white-space: nowrap;
        min-width: 60px;
    }

    /* Prevent zoom on input focus - ensure font-size is at least 16px */
    #searchInput,
    #chatInput,
    input[type="text"] {
        font-size: 16px !important;
    }
    
    /* Prevent zoom on select focus */
    .amenity-dropdown,
    select {
        font-size: 16px !important;
    }

    /* Prevent body scroll/zoom when chat is open on mobile */
    body.chat-open {
        position: fixed;
        width: 100%;
        overflow: hidden;
        touch-action: none;
    }

    /* Popup mobile - full width friendly */
    .mapboxgl-popup-content {
        min-width: calc(100vw - 2rem);
        max-width: calc(100vw - 2rem);
        margin: 0 1rem;
    }

    .mapboxgl-popup {
        max-width: 100vw !important;
        position: fixed !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        z-index: 10000 !important;
    }

    /* Map legend - hide on very small screens or make smaller */
    .map-legend {
        display: none; /* Hide on very small screens to save space */
    }

    /* Footer smaller padding */
    .site-footer {
        padding: 1.5rem 0.75rem;
    }

    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
        display: grid !important;
    }

    .footer-section {
        flex-direction: column !important;
        width: 100% !important;
    }

    .footer-section h3 {
        font-size: 1rem;
        width: 100% !important;
        margin-bottom: 0.75rem;
    }

    .footer-section ul {
        font-size: 0.875rem;
        width: 100% !important;
    }

    /* Ensure body is scrollable on mobile */
    body {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }

    /* Main content adjustments */
    .main-content {
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
    }
}

/* Enhanced Mapbox Popup */
.mapboxgl-popup-content {
    border-radius: 0.75rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    padding: 0 !important;
    min-width: 280px;
    max-width: 350px;
}


.mapboxgl-popup-close-button {
    font-size: 1.5rem;
    padding: 0.5rem;
    color: #6b7280;
    transition: color 0.2s;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mapboxgl-popup-close-button:hover {
    color: #374151;
}

@media (max-width: 640px) {
    .mapboxgl-popup-close-button {
        font-size: 1.75rem;
        padding: 0.75rem;
    }
}

.popup-content {
    padding: 1.25rem;
}

@media (max-width: 640px) {
    .popup-content {
        padding: 1rem;
    }

    .popup-header {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
    }

    .popup-icon-circle {
        width: 40px;
        height: 40px;
    }

    .popup-title {
        font-size: 1rem;
    }

    .popup-details {
        font-size: 0.875rem;
    }

    .popup-details div {
        margin: 0.4rem 0;
    }

    .popup-link {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.popup-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f3f4f6;
}

.popup-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.popup-header-content {
    flex: 1;
}

.popup-title {
    font-weight: 700;
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: #111827;
    line-height: 1.3;
}

.popup-type {
    display: inline-block;
    font-size: 0.75rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.popup-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f59e0b;
}

.popup-details {
    font-size: 0.875rem;
    color: #6b7280;
    line-height: 1.6;
}

.popup-details div {
    margin: 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.popup-details-icon {
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.popup-description {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f3f4f6;
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Footer */
.site-footer {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 3rem 2rem;
    width: 100%;
    flex-shrink: 0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.footer-section {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
}

.footer-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0;
    color: #111827;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'DM Sans', sans-serif;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.9375rem;
}

.footer-section ul li a:hover {
    color: #374151;
}

/* FAQ Accordion */
.faq-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.faq-item {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.faq-question {
    background: none;
    border: none;
    color: #9ca3af;
    text-align: left;
    cursor: pointer;
    font-size: 0.9375rem;
    padding: 0.5rem 1.5rem 0.5rem 0;
    width: 100%;
    transition: color 0.2s;
    position: relative;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.faq-question:hover {
    color: #374151;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #9ca3af;
}

.faq-item.active .faq-question::after {
    transform: translateY(-50%) rotate(45deg);
    color: #374151;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 0.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0.75rem 0.5rem 0.5rem 0;
}

.faq-answer p {
    color: #6b7280;
    font-size: 0.875rem;
    line-height: 1.6;
    margin: 0;
}

.faq-answer a {
    color: #0066cc;
    text-decoration: none;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0066cc;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.chat-header {
    background: #9333ea;
    color: white;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10002;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

@media (max-width: 768px) {
    .close-chat {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.75rem;
        z-index: 10003 !important;
        position: relative !important;
        pointer-events: auto !important;
    }
    
    .chat-header {
        position: relative;
        z-index: 10002;
    }
}

@media (max-width: 768px) {
    .close-chat {
        min-width: 44px;
        min-height: 44px;
        font-size: 1.75rem;
        z-index: 10002;
    }
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f9fafb;
}

.message {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    background: #9333ea;
    color: white;
    margin-left: auto;
    text-align: right;
}

.message.bot {
    background: #e5e7eb;
    color: #111827;
}

.chat-input-container {
    display: flex;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    gap: 0.5rem;
    background: white;
}

#chatInput {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.send-button {
    padding: 0.75rem 1.5rem;
    background: #9333ea;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
}

.send-button:hover {
    background: #0052a3;
}

.send-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

