/* ── Facility Map ────────────────────────────────────── */

.pt-facility-map-section {
    padding: 30px 20px;
    background: #f8f8f8;
}

.pt-facility-map-section h2 {
    text-align: center;
    margin-bottom: 20px;
}

.pt-facility-map__container {
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.pt-facility-map__map {
    width: 100%;
    height: 420px;
    z-index: 0;   /* keep below header / modals */
    border-radius: 12px;
}

/* ── Leaflet popup overrides ─────────────────────────── */
.pt-map-popup {
    font-family: 'Work Sans', sans-serif;
    font-size: 13px;
    line-height: 1.4;
    min-width: 180px;
}

.pt-map-popup__name {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px;
}

.pt-map-popup__address {
    color: #555;
    margin: 0 0 6px;
}

.pt-map-popup__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 8px;
}

.pt-map-popup__badge--indoor {
    background: #e3f2fd;
    color: #1565c0;
}

.pt-map-popup__badge--outdoor {
    background: #e8f5e9;
    color: #2e7d32;
}

.pt-map-popup__image {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.pt-map-popup__link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #5cb85c;
    text-decoration: none;
}

.pt-map-popup__link:hover {
    text-decoration: underline;
}

/* ── Region circle label ─────────────────────────────── */
.pt-map-region-label {
    background: none;
    border: none;
    font-family: 'Work Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #5cb85c;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(255,255,255,0.9),
                 0 -1px 3px rgba(255,255,255,0.9),
                 1px 0 3px rgba(255,255,255,0.9),
                 -1px 0 3px rgba(255,255,255,0.9);
}

/* ── Sidebar map widget ──────────────────────────────── */
.pt-sidebar-map-widget {
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    margin-bottom: 12px;
    transition: box-shadow 0.2s;
}

.pt-sidebar-map-widget:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.pt-sidebar-map-preview {
    width: 100%;
    height: 140px;
    z-index: 0;
}

/* Disable interaction on the sidebar preview — clicks open the modal */
.pt-sidebar-map-preview .leaflet-container {
    pointer-events: none;
}

.pt-sidebar-map-widget__label {
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    font-family: 'Work Sans', sans-serif;
    color: #5cb85c;
    text-align: center;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.pt-sidebar-map-widget__label i {
    margin-right: 4px;
}

/* ── Map modal ───────────────────────────────────────── */
.pt-map-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pt-map-modal.pt-open {
    display: flex;
}

.pt-map-modal__inner {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}

.pt-map-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid #eee;
}

.pt-map-modal__header h3 {
    margin: 0;
    font-size: 18px;
    font-family: 'Work Sans', sans-serif;
}

.pt-map-modal__close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
}

.pt-map-modal__close:hover {
    color: #333;
}

.pt-map-modal__map {
    width: 100%;
    height: 60vh;
    min-height: 300px;
    z-index: 0;
}

/* ── Locations page: facility cards ───────────────────── */
.pt-locations-list {
    max-width: 1100px;
    margin: 30px auto 0;
}

.pt-locations-region__title {
    font-family: 'Work Sans', sans-serif;
    font-size: 20px;
    font-weight: 600;
    margin: 28px 0 14px;
    padding-bottom: 6px;
    border-bottom: 2px solid #5cb85c;
}

.pt-locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pt-location-card {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.pt-location-card:hover {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pt-location-card__image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

/* Google Maps embed fallback when a facility has no uploaded photo */
.pt-location-card__image--map {
    border: 0;
    display: block;
}

.pt-location-card__body {
    padding: 14px 16px;
}

.pt-location-card__name {
    font-family: 'Work Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 6px;
}

.pt-location-card__address {
    font-size: 13px;
    color: #555;
    margin: 6px 0;
}

.pt-location-card__address a {
    color: #555;
    text-decoration: none;
}

.pt-location-card__address a:hover {
    text-decoration: underline;
}

.pt-location-card__note {
    font-size: 13px;
    color: #666;
    margin: 6px 0;
}

.pt-location-card__actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 10px;
}

.pt-location-card__parking {
    font-size: 13px;
    color: #1565c0;
    text-decoration: none;
}

.pt-location-card__parking:hover {
    text-decoration: underline;
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .pt-facility-map__map {
        height: 300px;
    }

    .pt-facility-map-section {
        padding: 20px 10px;
    }

    .pt-sidebar-map-widget {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }

    .pt-sidebar-map-preview {
        height: 120px;
    }

    .pt-map-modal {
        padding: 10px;
    }

    .pt-map-modal__inner {
        max-height: 90vh;
    }

    .pt-map-modal__map {
        height: 55vh;
    }
}
