.locations-section {
    padding: 48px 0 80px;
    background: var(--page-background-color);
    color: var(--text-color);
}

.locations-section > .container {
    width: 96%;
    max-width: 1440px;
}

.locations-section .locations-intro {
    max-width: 800px;
    margin: 0 0 32px;
    font-size: 24px;
    line-height: 1.5;
    text-transform: none;
    color: var(--text-color);
}

.locations-wrapper {
    --locator-height: clamp(560px, 72vh, 760px);
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr);
    gap: 28px;
    align-items: start;
}

.locations-sidebar {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-height: var(--locator-height);
}

.locations-search {
    padding: 0 6px 18px;
}

.locations-search label {
    display: block;
    margin-bottom: 10px;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.locations-search-field {
    position: relative;
}

.locations-search-field > i {
    position: absolute;
    top: 50%;
    left: 16px;
    transform: translateY(-50%);
    color: var(--muted-text-color);
    pointer-events: none;
}

.locations-search-input {
    width: 100%;
    min-height: 50px;
    padding: 12px 16px 12px 42px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface-color);
    color: var(--text-color);
    font: inherit;
    font-size: 15px;
}

.locations-search-input::placeholder {
    color: var(--muted-text-color);
    opacity: 1;
}

.locations-list {
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: var(--border-color) transparent;
    padding: 6px;
}

.locations-section .location-item {
    display: block;
    width: 100%;
    margin: 0 0 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface-color);
    color: var(--text-color);
    box-shadow: 0 4px 14px rgba(48, 43, 47, .04);
    font: inherit;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    cursor: pointer;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.locations-section .location-item:last-child {
    margin-bottom: 0;
}

.locations-section .location-item[hidden] {
    display: none;
}

.locations-section .location-item:hover {
    border-color: var(--link-color);
    box-shadow: 0 8px 24px rgba(48, 43, 47, .08);
}

.locations-section .location-item.active {
    border-color: var(--button-color);
    box-shadow: inset 4px 0 0 var(--button-color), 0 4px 14px rgba(48, 43, 47, .06);
}

.location-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.location-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--page-background-color);
    color: var(--text-color);
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 600;
}

.location-item.active .location-number {
    border-color: var(--button-color);
    background: var(--button-color);
    color: var(--button-text-color);
}

.location-name {
    flex: 1;
    min-width: 0;
    font-family: Montserrat, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.location-arrow {
    flex-shrink: 0;
    color: var(--link-color);
    font-size: 22px;
}

.location-address,
.location-contact,
.location-hours {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--muted-text-color);
    font-size: 14px;
    line-height: 1.7;
}

.location-address > i,
.location-contact > i,
.location-hours > i {
    flex: 0 0 16px;
    margin-top: 5px;
    text-align: center;
    color: var(--link-color);
}

.location-city {
    display: block;
    margin: 4px 0 0 26px;
    color: var(--muted-text-color);
    font-size: 14px;
    line-height: 1.7;
}

.location-contact,
.location-hours {
    margin-top: 12px;
}

.location-hours {
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.location-hours strong {
    color: var(--text-color);
    font-weight: 500;
}

.locations-map {
    height: var(--locator-height);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--surface-color);
    box-shadow: 0 8px 24px rgba(48, 43, 47, .06);
}

.locations-map #map {
    width: 100%;
    height: 100%;
}

.locations-empty {
    padding: 24px;
    margin: 0 6px;
    border: 1px dashed var(--border-color);
    border-radius: 4px;
    color: var(--muted-text-color);
    line-height: 1.7;
}

@media (max-width: 991px) {
    .locations-wrapper {
        grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr);
        gap: 20px;
    }

    .locations-section .location-item {
        padding: 20px;
    }
}

@media (max-width: 767px) {
    .locations-section {
        padding: 32px 0 48px;
    }

    .locations-section > .container {
        width: 100%;
    }

    .locations-section .locations-intro {
        font-size: 20px;
        margin-bottom: 24px;
    }

    .locations-wrapper {
        grid-template-columns: minmax(0, 1fr);
    }

    .locations-sidebar {
        max-height: none;
    }

    .locations-list {
        max-height: 440px;
    }

    .locations-map {
        height: 420px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .locations-section .location-item {
        transition: none;
    }
}

/* Address Popup Menu Styles */
.address-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
}

.address-popup-menu {
    position: fixed;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    min-width: 220px;
    padding: 8px 0;
    z-index: 10001;
    display: none;
}

.address-popup-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    color: #333;
    font-size: 14px;
    transition: background-color 0.15s;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.address-popup-item:hover {
    background-color: #f5f5f5;
}

.address-popup-item i {
    margin-right: 12px;
    color: #666;
    width: 20px;
    font-size: 16px;
}

.address-popup-header {
    padding: 12px 16px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
}

.address-popup-header i {
    margin-right: 8px;
    color: #666;
}

.address-popup-header .address-popup-header-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Map info window content */
.iw-card {
    padding: 16px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-width: 280px;
    max-width: 350px;
}

.iw-card h3.iw-title {
    margin: 0 0 16px 0;
    color: #2c3e50;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
}

.iw-card .iw-title-icon {
    color: #007bff;
    margin-right: 8px;
}

.iw-card .iw-rows {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.iw-card .info-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.iw-card .info-row.iw-row-top {
    align-items: flex-start;
}

.iw-card .iw-row-icon {
    color: #007bff;
    min-width: 18px;
    font-size: 16px;
}

.iw-card .iw-row-top > .iw-row-icon {
    margin-top: 5px;
}

.iw-card .iw-grow {
    flex: 1;
}

.iw-card .iw-action {
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.iw-card .iw-action:hover {
    background-color: #f0f7ff;
    border-color: #007bff;
}

.iw-card div.iw-address-action {
    color: #495057;
    line-height: 1.6;
    cursor: pointer;
}

.iw-card a.iw-link-action,
.iw-card a.iw-link-action:hover {
    color: #007bff;
    text-decoration: none;
    flex: 1;
}

.iw-card a.iw-link-action.iw-wrap-anywhere {
    word-break: break-word;
}

.iw-card strong.iw-label {
    display: block;
    margin-bottom: 4px;
    color: #2c3e50;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.iw-card strong.iw-label.iw-label-roomy {
    margin-bottom: 6px;
}

.iw-card .iw-address-text {
    color: #495057;
}

.iw-card .iw-hint {
    margin-top: 4px;
    font-size: 11px;
    color: #6c757d;
}

.iw-card .iw-hours {
    flex: 1;
    color: #495057;
    font-size: 14px;
    line-height: 1.6;
    padding: 8px 10px;
}

/* Clipboard helpers */
.locations-clipboard-fallback {
    position: fixed;
    left: -999999px;
    top: -999999px;
}

.locations-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 12px 24px;
    border-radius: 6px;
    z-index: 10002;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s;
}

.locations-toast.is-hiding {
    opacity: 0;
}
