* {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    position: relative;
}

header {
    background-color: #1a3c5a;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 56px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.title-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
}

.app-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: white;
    margin: 0;
    text-align: center;
    font-family: 'Segoe UI', Arial, sans-serif;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 100px;
}

.logo-container a {
    display: flex;
    align-items: center;
    height: 36px;
}

.stats-container {
    display: flex;
    min-width: 100px;
    padding: 0 10px;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.stat-box {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.stat-box h3 {
    margin: 0 0 3px 0;
    color: #1a3c5a;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-box p {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.logo {
    height: 36px;
    max-width: 100px;
    object-fit: contain;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Add hover effect for the clickable logo */
.logo-container a:hover .logo {
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.4)) brightness(1.05);
    transition: filter 0.2s ease;
}

/* Navigation Button Bar */
.nav-button-bar {
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    padding: 0.5rem 1rem;
}

.nav-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.nav-button i {
    font-size: 1rem;
}

/* Modal styles */
.modal {
    display: block;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 30px;
    border: none;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.6s ease-in-out;
    position: relative;
    z-index: 2001;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    color: #333;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: -10px;
    margin-right: -10px;
}

.close-btn:hover,
.close-btn:focus {
    color: #e74c3c;
    transform: scale(1.1);
}

.modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.modal-header h2 {
    font-size: 28px;
    margin: 15px 0 5px;
    color: #1a3c5a;
}

.modal-header h3 {
    color: #1a3c5a;
    margin: 10px 0;
}

.modal-header p {
    font-size: 18px;
    color: #3498db;
    margin: 5px 0 0;
}

.modal-logo {
    width: 200px;
    height: auto;
    margin-bottom: 10px;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.1));
}

.modal-body h3 {
    color: #1a3c5a;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-size: 20px;
}

.modal-body ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.modal-body ul li {
    margin-bottom: 12px;
    line-height: 1.6;
    padding-left: 20px;
    position: relative;
}

.modal-body ul li:before {
    content: "•";
    color: #3498db;
    font-size: 18px;
    position: absolute;
    left: 0;
    top: -2px;
}

.modal-body a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
}

.modal-body a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.modal-body p:last-child {
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
    color: #1a3c5a;
}

/* Responsive styles */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        align-items: center;
        padding: 1px 0.6rem;
        height: 50px;
    }
    
    .logo-container {
        margin-bottom: 0;
        width: auto;
        min-width: 40px;
    }
    
    .logo-container a {
        height: 30px;
    }
    
    .logo {
        height: 30px;
        max-width: 80px;
    }
    
    .title-container {
        gap: 6px;
    }
    
    .app-title {
        font-size: 1.1rem;
    }
    
    .stats-container {
        margin: 0;
        min-width: auto;
        gap: 5px;
    }
    
    .stat-box {
        padding: 3px 6px;
    }
    
    .stat-box h3 {
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .stat-box p {
        font-size: 12px;
    }
    
    .modal-content {
        margin: 15% auto;
        padding: 20px;
    }
    
    .modal-header h2 {
        font-size: 24px;
    }
    
    .modal-logo {
        width: 150px;
    }
    
    .filter-bar {
        padding: 0;
        top: 40px;
    }
    
    .map-container {
        top: 90px;
    }
    
    .leaflet-top {
        margin-top: 0;
    }
    
    .filter-group {
        min-width: 150px;
    }
    
    .filter-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .filter-group select {
        padding: 8px 12px;
        font-size: 13px;
    }

    .filter-group label {
        font-size: 11px;
    }
    
    /* Show filter toggle button on medium screens */
    .filter-toggle-btn {
        display: flex !important; /* Force display on mobile */
    }
    
    #map {
        top: 110px;
    }
    
    .filters-hidden #map {
        top: 0;
    }
    
    /* Hide specific content on mobile */
    .hide-on-mobile {
        display: none !important;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    header {
        padding: 0.3rem 0.5rem;
        height: 46px;
    }
    
    .logo-container {
        min-width: 30px;
    }
    
    .logo {
        height: 26px;
        max-width: 70px;
    }
    
    .app-title {
        font-size: 1rem;
    }
    
    .stat-box {
        padding: 2px 5px;
    }
    
    /* Hide the L2 Analytics logo on very small screens */
    .logo-container {
        display: none;
    }
    
    /* Center the title when logo is hidden */
    .title-container {
        justify-content: flex-start;
    }
    
    .filter-bar {
        padding: 8px;
        top: 46px;
    }
    
    .map-container {
        top: 100px;
    }
    
    .leaflet-top {
        margin-top: 106px;
    }
    
    .filter-group {
        min-width: 120px;
    }
    
    .filter-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Adjust filter toggle position */
    .filter-toggle-btn {
        top: 50px; /* Position right below the header */
        right: 5px;
        padding: 5px 10px;
        font-size: 12px;
    }
    
    #map {
        top: 106px;
    }
    
    .filters-hidden #map {
        top: 0;
    }
}

/* Add map container styles */
.map-container {
    position: absolute;
    top: 100px;
    width: 100%;
    z-index: 1;
}

.filters-hidden .map-container {
    top: 0;
}

/* Add crime popup styles */
.crime-popup {
    padding: 12px;
    max-width: 280px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.crime-popup h3 {
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e0e0e0;
    color: #1a3c5a;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup-details {
    font-size: 13px;
}

.popup-details p {
    margin: 0 0 7px 0;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dotted #f0f0f0;
    padding-bottom: 5px;
}

.popup-details p:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.popup-details strong {
    font-weight: 600;
    color: #006d77;
    margin-right: 8px;
}

/* Improve the Leaflet popup styling */
.leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.98);
}

.leaflet-popup-content {
    margin: 10px 12px;
    line-height: 1.5;
}

.leaflet-popup-tip {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.2);
}

.leaflet-popup-close-button {
    color: #1a3c5a;
    font-size: 18px;
    padding: 6px 6px 0 0;
}

.leaflet-popup-close-button:hover {
    color: #006d77;
}

/* Position the map zoom controls below the header */
.leaflet-top {
    margin-top: 164px;
}

/* Add loading indicator styles */
.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    text-align: center;
    display: none;
}

.loading-container.active {
    display: block;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1a3c5a;
    border-radius: 50%;
    width: 40px;
        height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.loading-text {
    color: #1a3c5a;
    font-size: 14px;
    font-weight: 500;
    margin: 0;
}

.loading-progress {
    margin-top: 10px;
    width: 200px;
    height: 6px;
    background-color: #f3f3f3;
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background-color: #1a3c5a;
    transition: width 0.3s ease;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filter Bar Styles - Consolidated */
.filter-bar {
    position: absolute;
    top: 104px;
    left: 0;
    right: 0;
    background: white;
    padding: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.filter-header {
    background-color: #f8f9fa;
    padding: 8px 20px;
    border-bottom: 1px solid #eee;
}

.filter-year {
    font-size: 17px;
    font-weight: 700;
    color: #1a3c5a;
}

.filter-content {
    padding: 15px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    align-items: start;
}

/* For extra large screens - all 6 controls in one row */
@media (min-width: 1400px) {
    .filter-content {
        grid-template-columns: repeat(6, 1fr);
        gap: 25px;
    }
}

/* For large screens - 3 controls per row */
@media (min-width: 1200px) and (max-width: 1399px) {
    .filter-content {
        grid-template-columns: repeat(3, 1fr);
        gap: 25px;
    }
}

/* For medium screens - 2 controls per row */
@media (min-width: 900px) and (max-width: 1199px) {
    .filter-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* For smaller medium screens - force single column to prevent overlap */
@media (min-width: 769px) and (max-width: 899px) {
    .filter-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    position: relative;
}

.filter-group label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;
}



/* Unified input styling */
.filter-group select {
    padding: 10px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f8f9fa;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Custom icons for inputs */
.filter-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

/* Hover and focus states for select */
.filter-group select:hover {
    border-color: #babcbd;
    background-color: white;
}

.filter-group select:focus {
    border-color: #1a3c5a;
    background-color: white;
    outline: none;
}

/* Dropdown option styling */
.filter-group select option {
    padding: 8px 12px;
    background-color: white;
}

/* Dropdown option states */
.filter-group select option:hover,
.filter-group select option:focus,
.filter-group select option:active {
    background-color: #e8e8e8 !important;
}

.filter-group select option:checked {
    color: rgb(0, 0, 0) !important;
    font-weight: bold;
}

/* Style for empty selects (being updated) */
.filter-group select.updating {
    background-color: #f0f7ff;
    border-color: #3498db;
    position: relative;
}

/* Add a pulse animation to updating selects */
.filter-group select.updating:after {
    content: '';
    position: absolute;
    right: 35px;
    top: 50%;
    margin-top: -3px;
    width: 6px;
    height: 6px;
    background-color: #3498db;
    border-radius: 50%;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0.5; }
}

/* Styles for select with filtered options */
.filter-group select.filtered {
    border-color: #1a3c5a;
    box-shadow: 0 0 0 1px rgba(26, 60, 90, 0.2);
}

/* Animation for options being updated */
@keyframes fadeInOption {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-group select.animated option {
    animation: fadeInOption 0.3s ease-out;
}

/* Adjust map position */
#map {
    position: absolute;
    top: 130px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: top 0.3s ease;
}

/* Adjust Leaflet controls position */
.leaflet-top {
    margin-top: 130px;
    transition: margin-top 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .filter-bar {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        padding: 12px 15px;
    }
}

@media (max-width: 768px) {
    .filter-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .filter-group select {
        padding: 8px 12px;
        font-size: 13px;
    }

    .filter-group label {
        font-size: 11px;
    }
}

@media (max-width: 576px) {
    .filter-bar {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

/* Filter Toggle Button */
.filter-toggle-btn {
    position: fixed;
    top: 110px;
    right: 10px;
    background-color: #1a3c5a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1100;
    box-shadow: 0 2px 2px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    
    /* Fix the display properties */
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-toggle-btn:hover,
.filter-toggle-btn:active {
    background-color: #2c5282;
    transform: translateY(1px);
}

.filter-icon {
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.filter-icon-bar {
    width: 14px;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
}

/* Toggle button when filters are hidden */
.filters-hidden .filter-icon-bar:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.filters-hidden .filter-icon-bar:nth-child(2) {
    opacity: 0;
}

.filters-hidden .filter-icon-bar:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
}

/* Filter bar animation */
.filter-bar {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.filters-hidden .filter-bar {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

/* Adjust map position when filters are hidden */
.filters-hidden #map {
    top: 0;
}

.filters-hidden .leaflet-top {
    margin-top: 107px;
}

/* For larger screens, hide the filter toggle button */
@media (min-width: 769px) {
    .filter-toggle-btn {
        display: flex !important;

    }
}

/* For medium and small screens, show the filter toggle button */
@media (max-width: 768px) {
    .filter-toggle-btn {
        display: flex;
        top: 90px;
    }
    
    .nav-button-bar {
        padding: 0 0;
    }
    
    .nav-button {
        font-size: 0.8rem;
        padding: 2px 2px;
    }
}

@media (max-width: 576px) {
    .nav-buttons-container {
        gap: 0;
        padding: 1px 1px;
    }
    
    .nav-button {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .nav-button span {
        display: none;
    }
    
    .nav-button i {
        font-size: 1.1rem;
    }
}

/* Map watermark styles */
.map-watermark {
    position: fixed;
    bottom: 10px;
    left: 10px;
    width: 100px;
    height: 100px;
    z-index: 900;
    background-image: url('../images/l2-analytics-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none;
    opacity: 0.9;
    filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.7));
}

/* Responsive adjustments for the watermark */
@media (max-width: 768px) {
    .map-watermark {
        width: 75px;
        height: 75px;
        bottom: 10px;
        left: 10px;
    }
}
@media (max-width: 576px) {
    .map-watermark {
        width: 63px;
        height: 63px;
        bottom: 8px;
        left: 8px;
    }
}

/* Layer Control Styles */
.layer-control {
    position: fixed;
    right: 10px;
    top: 258px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 1101;
    width: 120px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.layer-toggle {
    padding: 1px 1px 0 1px;
}

.layer-toggle-btn {
    width: 100%;
    margin: 0 0 3px 0;
    background-color: #1a3c5a;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 3px 3px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 2px rgba(0,0,0,0.3);
    transition: background 0.3s, box-shadow 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    min-height: 33px;
}

.layer-toggle-btn:hover,
.layer-toggle-btn:active {
    background-color: #2c5282;
    transform: translateY(1px);
}

.toggle-icon {
    position: relative;
    width: 22px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-icon::before,
.toggle-icon::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2.5px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(.4,2,.6,1);
    left: 2px;
}

.toggle-icon::before {
    top: 2px;
}

.toggle-icon::after {
    bottom: 4px;
}

.layer-control.collapsed .toggle-icon::before {
    top: 7px;
    transform: rotate(45deg);
}

.layer-control.collapsed .toggle-icon::after {
    bottom: 7px;
    transform: rotate(-45deg);
}

.layer-content {
    max-height: 500px;
    transition: max-height 0.3s ease;
    overflow: hidden;
}

.layer-control.collapsed .layer-content {
    max-height: 0;
}

.control-section {
    padding: 4px 0;
}

.section-title {
    padding: 4px 16px;
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.control-divider {
    height: 1px;
    background-color: #eee;
    margin: 4px 0;
}

.layer-button,
.year-button {
    padding: 8px 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    transition: background-color 0.2s ease;
}

.layer-button:hover,
.year-button:hover {
    background-color: #f0f0f0;
}

.layer-button.active,
.year-button.active {
    background-color: #f8f9fa;
    color: #1a3c5a;
    font-weight: 700;
}

.layer-dot {
    width: 16px;
    height: 16px;
    border: 2px solid #999;
    border-radius: 50%;
    display: inline-block;
    position: relative;
}

.layer-button.active .layer-dot,
.year-button.active .layer-dot {
    border-color: #1a3c5a;
}

.layer-button.active .layer-dot::after,
.year-button.active .layer-dot::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    background: #1a3c5a;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Adjust layer control position when filters are hidden */
body.filters-hidden .layer-control {
    top: 145px;
}

/* Responsive adjustments for layer control */
@media (max-width: 768px) {
    .layer-control {
        top: 150px;
        right: 10px;
        transform: none;
        width: auto;
    }
    
    body.filters-hidden .layer-control {
        top: 145px;
    }
}

@media (max-width: 915px) {
    .layer-control {
        top: 150px;
        right: 10px;
        transform: none;
        width: auto;
    }
    
    body.filters-hidden .layer-control {
        top: 145px;
    }
}

@media (max-width: 576px) {
    .layer-control {
        top: 140px;
        right: 10px;
        width: 100px;
    }
    
    body.filters-hidden .layer-control {
        top: 130px;
    }
}

/* Map Data Source Attribution */
.map-data-source {
    position: absolute;
    bottom: 120px;
    left: 15px;
    z-index: 800;
    pointer-events: none;
}

.data-source-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.6);
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.data-source-link:hover {
    background: rgba(0, 0, 0, 0.8);
    color: #3498db;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border-color: rgba(52, 152, 219, 0.3);
}

.data-source-link i {
    color: #3498db;
    font-size: 14px;
    opacity: 0.9;
}

.data-source-link:hover i {
    opacity: 1;
    color: #5dade2;
}

.source-text {
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Responsive adjustments for data source */
@media (max-width: 768px) {
    .map-data-source {
        bottom: 95px;
        left: 10px;
    }
    
    .data-source-link {
        padding: 6px 10px;
        font-size: 11px;
        gap: 5px;
    }
    
    .data-source-link i {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .map-data-source {
        bottom: 80px;
        left: 8px;
    }
    
    .data-source-link {
        padding: 5px 8px;
        font-size: 10px;
        gap: 4px;
    }
    
    .data-source-link i {
        font-size: 11px;
    }
} 