/* =========================================================================
   /locations/ — page-specific styles.
   Extends the cgtmt brand (Futura + red + uppercase headings) from style.css.
   ========================================================================= */

/* Page scaffold */
.locations-page {
    max-width: 1100px;
    margin: 150px auto 60px;
    padding: 0 24px;
}

.locations-header {
    text-align: center;
    margin-bottom: 28px;
}
.locations-header h1 {
    font-size: 3.5em;
    line-height: 1;
    margin-bottom: 16px;
}
.locations-header p {
    color: var(--grey-font);
    max-width: 620px;
    margin: 0 auto 0;
}

/* Map shell */
.map-shell {
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
}

/* Error banner — amber, never red (red is the brand accent) */
.map-error-banner {
    background: #f3d86b;
    color: #6b5412;
    padding: 12px 20px;
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    font-family: "FuturaBT-Medium", sans-serif;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.map-error-banner.show { display: flex; }
.map-error-banner i.fas { margin-right: 6px; }
.map-error-banner .retry {
    background: #6b5412;
    color: #f3d86b;
    border: none;
    padding: 6px 14px;
    border-radius: 3px;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 12px;
    cursor: pointer;
}
.map-error-banner .retry:hover { filter: brightness(1.1); }

/* Search bar */
.search-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 2px solid #eee;
    background: #fff;
}
.search-bar i.fa-search {
    color: var(--grey-font);
    font-size: 16px;
}
.search-bar input {
    flex: 1;
    border: none;
    font-family: "FuturaBT-Medium", sans-serif;
    font-size: 16px;
    color: var(--black-font);
    padding: 8px 0;
    outline: none;
    background: transparent;
}
.search-bar input::placeholder { color: #a8a8a8; }
.search-bar .result-count {
    color: var(--grey-font);
    font-size: 13px;
    font-family: "Futura Bold", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Legend */
.map-legend {
    display: flex;
    gap: 24px;
    padding: 10px 20px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    font-family: "Futura Bold", sans-serif;
    color: var(--grey-font);
    letter-spacing: 0.5px;
}
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-pin {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(0, 0, 0, 0.15);
}
.legend-pin.gold { background: #c8a84b; }
.legend-pin.gray { background: #8a8a8a; }

/* Map area */
#map {
    height: 600px;
    background: #e8ecef;
    position: relative;
}

/* Loading skeleton */
.map-skeleton {
    position: absolute;
    inset: 0;
    background: #e8ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 14px;
    z-index: 5;
    transition: opacity 0.25s;
}
.map-skeleton.hidden {
    opacity: 0;
    pointer-events: none;
}
.map-spinner {
    width: 44px;
    height: 44px;
    border: 4px solid rgba(208, 32, 46, 0.25);
    border-top-color: var(--red-font);
    border-radius: 50%;
    animation: cgt-spin 0.8s linear infinite;
}
@keyframes cgt-spin { to { transform: rotate(360deg); } }
.map-skeleton .label {
    color: var(--grey-font);
    font-family: "Futura Bold", sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
}

/* InfoWindow content — Google injects this into its own wrapper, so we only
   style our inner content. */
.iw-content {
    padding: 4px 6px 6px;
    font-family: "FuturaBT-Medium", sans-serif;
    max-width: 260px;
}
.iw-name {
    font-family: "Futura Bold", sans-serif;
    font-weight: 800;
    color: var(--red-font);
    font-size: 17px;
    line-height: 1.15;
    margin: 0 0 6px 0;
}
.iw-address {
    color: var(--grey-font);
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 10px 0;
}
.iw-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-family: "Futura Bold", sans-serif;
    font-size: 11px;
    letter-spacing: 0.5px;
}

/* Collapse Google's InfoWindow header strip; float the close button over
   the content instead of letting it reserve vertical space. */
.gm-style-iw-chr {
    height: 0;
    min-height: 0;
    padding: 0;
}
.gm-style-iw-chr .gm-ui-hover-effect {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
}
.iw-status.rewards { background: #c8a84b; color: #3e3007; }
.iw-status.standard { background: #eee; color: var(--grey-font); }

/* Empty-results hint when search filters everything out */
.search-empty-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 12px 18px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-family: "Futura Bold", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
    color: var(--grey-font);
    z-index: 4;
    display: none;
}
.search-empty-hint.show { display: block; }

/* Responsive: mobile */
@media (max-width: 767px) {
    .locations-page { margin: 150px auto 40px; padding: 0 12px; }
    .locations-header h1 { font-size: 2.4em; }
    .locations-header p { font-size: 15px; }
    #map { height: 460px; }
    .search-bar { padding: 12px 14px; gap: 10px; }
    .search-bar .result-count { display: none; }
    .map-legend { flex-wrap: wrap; gap: 14px; padding: 10px 14px; }
}
