.aquila-map-outer {
    width: 100%;
}

.aquila-map-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.aquila-map-filter-btn {
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.aquila-map-filter-btn:hover {
    border-color: #bbb;
}

.aquila-map-filter-btn.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.aquila-map-wrap {
    position: relative;
    /* Establishes its own stacking context so Leaflet's internal panes
       (tooltips/popups can reach z-index 700 by default) never escape
       above the detail panel below. */
    isolation: isolate;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.aquila-map-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.aquila-map-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    max-width: 90%;
    height: 100%;
    background: #fff;
    box-shadow: -6px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    transition: transform 0.35s ease;
    z-index: 500;
}

.aquila-map-panel.is-open {
    transform: translateX(0);
}

.aquila-map-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.9);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.aquila-map-carousel {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #e8e8e8;
    flex-shrink: 0;
}

.aquila-map-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.aquila-map-carousel-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
}

.aquila-map-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.aquila-map-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
}

.aquila-map-dots span.active {
    background: #fff;
}

.aquila-map-body {
    padding: 18px 20px 8px;
    overflow-y: auto;
    flex: 1;
}

.aquila-map-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a1a;
}

.aquila-map-subtitle {
    margin: 0 0 14px;
    font-size: 14px;
    color: #6b6b6b;
}

.aquila-map-directions {
    display: inline-block;
    background: #1a1a1a;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 18px;
    border-radius: 8px;
    margin-bottom: 18px;
}

.aquila-map-directions:hover {
    background: #333;
    color: #fff;
}

.aquila-map-notes-box {
    background: #f5f5f5;
    border-radius: 10px;
    padding: 12px 14px;
}

.aquila-map-notes-label {
    font-size: 12px;
    color: #8a8a8a;
    margin-bottom: 4px;
}

.aquila-map-notes-text {
    font-size: 14px;
    color: #333;
}

.aquila-map-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

.aquila-map-footer button {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    cursor: pointer;
}

.aquila-map-footer button:hover {
    background: #f0f0f0;
}

.aquila-map-count {
    font-size: 14px;
    color: #444;
}

@media (max-width: 640px) {
    .aquila-map-wrap {
        height: 420px !important;
        border-radius: 12px;
    }

    .aquila-map-panel {
        width: 100%;
        max-width: 100%;
    }

    .aquila-map-carousel {
        height: 160px;
    }

    .aquila-map-body {
        padding: 14px 16px 6px;
    }

    .aquila-map-title {
        font-size: 18px;
    }

    .aquila-map-directions {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .aquila-map-close {
        width: 36px;
        height: 36px;
        font-size: 22px;
    }

    .aquila-map-footer button {
        width: 40px;
        height: 40px;
    }

    .aquila-map-filter-btn {
        padding: 7px 14px;
        font-size: 12px;
    }
}

/* Leaflet's own zoom/attribution controls are tiny by default on touch
   screens — make them easier to tap on mobile. */
@media (max-width: 640px) {
    .leaflet-touch .leaflet-control-zoom a {
        width: 34px;
        height: 34px;
        line-height: 34px;
        font-size: 18px;
    }
}
