/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    position: relative;
}

/* Toolbar styles */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 16px 24px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
    margin-bottom: 24px;
    gap: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 60px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

.toolbar-left h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: -0.5px;
}

.toolbar-center {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-geolocation {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    box-sizing: border-box;
}

.btn-geolocation:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-geolocation:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

/* Dropdown menu styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.btn-menu {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-menu:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-menu:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}

.dropdown-content {
    display: none;
    position: fixed;
    background: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    z-index: 999999;
    border: 1px solid rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transform: translateZ(0);
    will-change: transform;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    font-weight: 500;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #f8f9fa;
    color: #667eea;
}

.dropdown-content a:focus {
    background-color: #e9ecef;
    outline: none;
}

.dropdown.show .dropdown-content {
    display: block;
    animation: fadeInDown 0.2s ease-out;
}

.dropdown-content[style*="visibility: hidden"] {
    animation: none;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-container {
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    flex-shrink: 1;
    min-width: 0;
}

#searchInput {
    flex: 1;
    min-width: 200px;
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    color: #333;
    font-weight: 500;
    height: 44px;
    box-sizing: border-box;
}

#searchInput::placeholder {
    color: #666;
    font-weight: 400;
}

#searchInput:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

#searchBtn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

#searchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

#searchBtn:active {
    transform: translateY(0);
}

.toolbar-right select {
    padding: 10px 14px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 130px;
    backdrop-filter: blur(10px);
    color: #333;
    font-weight: 500;
    height: 44px;
    box-sizing: border-box;
}

.toolbar-right select:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-1px);
}

.toolbar-right button {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    height: 44px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
}

.toolbar-right button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.toolbar-right button:active {
    transform: translateY(0);
    background: rgba(255, 255, 255, 0.2);
}


#loadMore {
    padding: 10px 20px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

#loadMore:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: white;
    padding: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tab-button {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    color: #666;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button:hover {
    background: #f5f7fa;
    color: #667eea;
}

.tab-button.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* List View */
.list-view {
    display: none;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 30px;
    min-height: 500px;
    margin-bottom: 25px;
}

.list-view.active {
    display: block;
}

/* Map View */
.map-view {
    display: none;
}

.map-view.active {
    display: block;
}

/* Search Prompt */
.search-prompt {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.prompt-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.search-prompt h2 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.search-prompt p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto;
}

/* Results List */
.results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.result-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.result-card.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    margin-top: 35px;
}

.result-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    padding-right: 10px;
}

.result-card-rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    padding: 8px 16px;
    border-radius: 8px;
    min-width: 60px;
    justify-content: center;
    flex-shrink: 0;
}

.result-card-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.result-detail {
    display: flex;
    align-items: start;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.result-detail strong {
    color: #333;
    font-weight: 600;
}

.result-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.btn-show-on-map {
    padding: 8px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-show-on-map:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.distance-badge {
    position: absolute;
    top: 15px;
    left: 20px;
    background: #667eea;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

/* Map container */
.map-container {
    position: relative;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    z-index: 1;
}

#map {
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border-radius: 20px;
    position: relative;
    z-index: 1;
}

/* Leaflet custom marker styles */
.custom-marker-icon {
    background: transparent !important;
    border: none !important;
}

/* Leaflet popup styles */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.leaflet-popup-content {
    margin: 0;
    padding: 0;
}

.custom-popup .leaflet-popup-content-wrapper {
    padding: 0;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
}

/* Loading spinner */
.loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    border-radius: 15px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading p {
    font-size: 18px;
    color: #667eea;
    font-weight: 600;
}

/* Stats section */
.stats {
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    text-align: center;
}

#statsInfo {
    font-size: 1.1rem;
    color: #667eea;
    font-weight: 600;
}

#establishmentCount {
    font-size: 1.3rem;
    color: #333;
    font-weight: 700;
}


/* Info window styles */
.info-window {
    max-width: 300px;
    padding: 10px;
}

.info-window h3 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.info-window p {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.4;
}

.info-window strong {
    color: #333;
    font-weight: 600;
}

/* Rating color indicators */
.rating-5 { color: #00AA00; }
.rating-4 { color: #88CC00; }
.rating-3 { color: #FFD700; }
.rating-2 { color: #FF8C00; }
.rating-1 { color: #FF4500; }
.rating-0 { color: #FF0000; }

/* Responsive design */
/* Tablet and small desktop */
@media (max-width: 1024px) {
    .toolbar {
        gap: 16px;
        padding: 14px 20px;
    }
    
    .toolbar-left h1 {
        font-size: 1.3rem;
    }
    
    .toolbar-right select {
        min-width: 120px;
    }
    
    .result-card-title {
        font-size: 1.2rem;
    }
    
    .result-card-details {
        grid-template-columns: 1fr;
    }
}

/* Tablet */
@media (max-width: 768px) {
    .container {
        padding: 12px;
    }
    
    .toolbar {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .toolbar-left h1 {
        font-size: 1.2rem;
        text-align: center;
    }
    
    .toolbar-center {
        max-width: 100%;
        order: 2;
    }
    
    .toolbar-right {
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        order: 3;
    }
    
    .toolbar-left {
        order: 1;
    }
    
    #searchInput {
        min-width: 100%;
    }
    
    .toolbar-right select {
        min-width: 120px;
        flex: 1;
    }
    
    .toolbar-right button {
        flex: 1;
        min-width: 80px;
    }
    
    #map {
        height: calc(100vh - 140px);
        min-height: 400px;
    }
    
    .list-view {
        padding: 20px;
    }
    
    .search-prompt h2 {
        font-size: 1.5rem;
    }
    
    .search-prompt p {
        font-size: 1rem;
    }
    
    .result-card {
        padding: 16px;
    }
    
    .result-card-title {
        font-size: 1.1rem;
    }
    
    .distance-badge {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
        left: auto;
        top: auto;
    }
    
    .result-card-header {
        flex-direction: column;
        gap: 10px;
        margin-top: 0;
    }
    
    .result-card-rating {
        align-self: flex-start;
    }
}

/* Medium mobile */
@media (max-width: 600px) {
    .toolbar {
        padding: 14px;
        gap: 14px;
    }
    
    .toolbar-left h1 {
        font-size: 1.15rem;
    }
    
    .toolbar-right {
        gap: 8px;
    }
    
    .toolbar-right select {
        min-width: 100px;
        flex: 1;
    }
    
    .toolbar-right button {
        flex: 1;
        min-width: 70px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .container {
        padding: 6px;
    }
    
    .toolbar {
        padding: 10px;
        gap: 10px;
        margin-bottom: 16px;
        min-height: auto;
    }
    
    .toolbar-left h1 {
        font-size: 1rem;
        margin-bottom: 2px;
        line-height: 1.2;
    }
    
    .tabs {
        padding: 6px;
        gap: 6px;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .list-view {
        padding: 15px;
    }
    
    .search-prompt {
        padding: 40px 15px;
    }
    
    .search-prompt h2 {
        font-size: 1.3rem;
    }
    
    .search-prompt p {
        font-size: 0.95rem;
    }
    
    .prompt-icon {
        font-size: 3rem;
    }
    
    .result-card {
        padding: 14px;
    }
    
    .result-card-title {
        font-size: 1rem;
    }
    
    .result-card-rating {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .result-detail {
        font-size: 0.85rem;
    }
    
    .toolbar-center {
        order: 2;
        width: 100%;
    }
    
    .toolbar-right {
        flex-direction: row;
        gap: 8px;
        order: 3;
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-group {
        flex: 1;
        gap: 6px;
    }
    
    .filter-group select,
    .filter-group button {
        flex: 1;
        height: 38px;
        font-size: 0.85rem;
        padding: 6px 10px;
    }
    
    .btn-geolocation {
        height: 38px;
        min-width: 38px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .btn-menu {
        height: 38px;
        min-width: 38px;
        font-size: 14px;
        flex-shrink: 0;
    }
    
    .search-container {
        gap: 6px;
        width: 100%;
        flex-direction: row;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 0 2px;
        box-sizing: border-box;
        overflow: hidden;
        flex-shrink: 1;
        min-width: 0;
    }
    
    #searchInput {
        height: 38px;
        font-size: 0.85rem;
        padding: 6px 8px;
        flex: 1;
        min-width: 0;
        width: auto;
        max-width: calc(100% - 75px);
        box-sizing: border-box;
        overflow: hidden;
    }
    
    #searchBtn {
        height: 38px;
        font-size: 0.8rem;
        padding: 6px 8px;
        flex: 0 0 auto;
        min-width: 65px !important;
        max-width: 70px;
        width: 65px !important;
        white-space: nowrap;
        display: flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
        background: #007bff !important;
        color: white !important;
        border: 2px solid #0056b3 !important;
        border-radius: 6px !important;
        font-weight: bold !important;
        margin-left: 4px;
    }
    
    #map {
        height: calc(100vh - 120px);
        min-height: 350px;
    }
    
}

/* iPhone and very small mobile */
@media (max-width: 375px) {
    .container {
        padding: 4px;
    }
    
    .toolbar {
        padding: 8px;
        gap: 8px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .toolbar-left h1 {
        font-size: 0.95rem;
        margin-bottom: 1px;
        line-height: 1.1;
    }
    
    .search-container {
        gap: 4px;
        flex-direction: row;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 0 2px;
        box-sizing: border-box;
        overflow: hidden;
        flex-shrink: 1;
        min-width: 0;
    }
    
    .toolbar-right {
        gap: 6px;
    }
    
    .filter-group {
        gap: 4px;
    }
    
    .filter-group select,
    .filter-group button {
        height: 36px;
        font-size: 0.8rem;
        padding: 4px 8px;
    }
    
    .btn-geolocation {
        height: 36px;
        min-width: 36px;
        font-size: 12px;
    }
    
    .btn-menu {
        height: 36px;
        min-width: 36px;
        font-size: 12px;
    }
    
    #searchInput {
        height: 36px;
        font-size: 0.8rem;
        padding: 4px 6px;
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 65px);
    }
    
    #searchBtn {
        height: 36px;
        font-size: 0.75rem;
        padding: 4px 6px;
        flex: 0 0 auto;
        min-width: 60px !important;
        width: 60px !important;
        white-space: nowrap;
        display: flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
        background: #007bff !important;
        color: white !important;
        border: 2px solid #0056b3 !important;
        border-radius: 6px !important;
        font-weight: bold !important;
        margin-left: 4px;
    }
    
    #map {
        height: calc(100vh - 100px);
        min-height: 280px;
    }
}

/* Very small mobile */
@media (max-width: 320px) {
    .container {
        padding: 2px;
    }
    
    .toolbar {
        padding: 6px;
        gap: 6px;
        margin-bottom: 10px;
    }
    
    .toolbar-left h1 {
        font-size: 0.9rem;
    }
    
    .filter-group select,
    .filter-group button {
        height: 34px;
        font-size: 0.75rem;
        padding: 3px 6px;
    }
    
    .btn-geolocation {
        height: 34px;
        min-width: 34px;
        font-size: 11px;
    }
    
    .btn-menu {
        height: 34px;
        min-width: 34px;
        font-size: 11px;
    }
    
    .search-container {
        gap: 3px;
        flex-direction: row;
        display: flex !important;
        align-items: center;
        justify-content: flex-start;
        padding: 0 1px;
        box-sizing: border-box;
        overflow: hidden;
        flex-shrink: 1;
        min-width: 0;
    }
    
    #searchInput {
        height: 34px;
        font-size: 0.75rem;
        padding: 3px 4px;
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 55px);
    }
    
    #searchBtn {
        height: 34px;
        font-size: 0.7rem;
        padding: 3px 6px;
        flex: 0 0 auto;
        min-width: 50px !important;
        width: 50px !important;
        white-space: nowrap;
        display: flex !important;
        align-items: center;
        justify-content: center;
        visibility: visible !important;
        opacity: 1 !important;
        background: #007bff !important;
        color: white !important;
        border: 2px solid #0056b3 !important;
        border-radius: 4px !important;
        font-weight: bold !important;
        margin-left: 2px;
    }
    
    #map {
        height: calc(100vh - 90px);
        min-height: 250px;
    }
}

/* iPhone landscape and small screens */
@media (max-width: 667px) and (orientation: landscape) {
    .toolbar {
        padding: 8px 12px;
        gap: 8px;
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .toolbar-left {
        order: 1;
        flex: 0 0 auto;
    }
    
    .toolbar-left h1 {
        font-size: 0.9rem;
        white-space: nowrap;
    }
    
    .toolbar-center {
        order: 2;
        flex: 1;
        min-width: 0;
    }
    
    .toolbar-right {
        order: 3;
        flex: 0 0 auto;
        flex-direction: row;
        gap: 6px;
    }
    
    .search-container {
        flex-direction: row;
        gap: 6px;
    }
    
    #searchInput {
        min-width: 120px;
        flex: 1;
    }
    
    #searchBtn {
        flex: 0 0 auto;
        white-space: nowrap;
        min-width: 60px;
    }
    
    .toolbar-right select {
        min-width: 80px;
        flex: 0 0 auto;
    }
    
    .toolbar-right button {
        min-width: 50px;
        flex: 0 0 auto;
    }
    
    #map {
        height: calc(100vh - 80px);
        min-height: 300px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Info window scrollbar styles - force scrollbar visibility */
.gm-style div[style*="overflow-y: scroll"] {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f1f1f1;
}

.gm-style div[style*="overflow-y: scroll"]::-webkit-scrollbar {
    width: 8px;
    display: block !important;
}

.gm-style div[style*="overflow-y: scroll"]::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
    display: block !important;
}

.gm-style div[style*="overflow-y: scroll"]::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
    display: block !important;
}

.gm-style div[style*="overflow-y: scroll"]::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Leaflet popup scrollbar styles */
.leaflet-popup-content-wrapper {
    overflow: visible !important;
}

.gm-style-iw-d {
    overflow: visible !important;
}

.gm-style-iw-tc {
    overflow: visible !important;
}

/* Animation for smooth transitions */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Button hover effects */
button {
    transition: all 0.3s ease;
}

button:active {
    transform: translateY(1px);
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Initial message styles */
.initial-message {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    padding: 0;
    max-width: 420px;
    width: 90%;
    text-align: center;
    animation: fadeInUp 0.6s ease-out;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.message-content {
    padding: 40px 30px;
}

.message-content h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 600;
}

.message-content p {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.5;
}

.message-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.message-actions .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
}

.message-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.message-actions .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.message-actions .btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.message-actions .btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Responsive design for initial message */
@media (max-width: 768px) {
    .initial-message {
        width: 95%;
        max-width: 350px;
    }
    
    .message-content {
        padding: 30px 20px;
    }
    
    .message-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .message-actions .btn {
        width: 100%;
        max-width: 200px;
    }
}



