.find-location-section {
    --find-loc-width: 780px;
    --find-loc-width-md: 700px;
}

#loadingSpinner {
    animation: spin 1s linear infinite;
    border: 4px solid #e0e0e0;
    border-radius: 50%;
    border-top: 4px solid #005198;
    height: 40px;
    margin: 20px auto;
    width: 40px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#spinnerContainer {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

.pac-container {
    background-color: #fff;
    border: 1px solid #d1e3ea;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    font-family: inherit;
    font-size: 1.2rem;
    z-index: 10000 !important;
    /*left: 100px !important;*/
}

.pac-item {
    border-bottom: 1px solid #f0f0f0;
    color: #222;
    cursor: pointer;
    font-size: 15px;
    padding: 12px 18px;
    transition: background 0.2s;
}

.pac-item-query {
    color: #005198;
    font-size: 15px;
}

.pac-item:last-child {
    border-bottom: none;
}

.pac-item.pac-item-selected,
.pac-item:hover {
    background-color: #e6f7fa;
    color: #005198;
}

.pac-item .pac-item-query {
    color: #007c91;
    font-weight: bold;
}

.gm-style .gm-style-iw-c {
    width: 100%;
}

.gm-style-iw {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    color: #222;
    font-family: inherit;
    font-size: 1rem;
    max-width: 320px;
    padding: 0 !important;
}

.gm-style-iw-d {
    margin: 0 !important;
    padding: 20px 20px 10px 20px;
}

.infowindow {
    font-size: 17px;
}

.infowindow p {
    margin: 0 0 15px;
    padding: 0;
}

.infowindow p:first-of-type {
    line-height: 1.2;
}

/* ---- Enhanced Text alert (centered toast) ---- */
#gmTextAlertContainer {
    align-items: center;
    animation: slideInFromTop 0.2s ease-out;
    background: #222a36;
    border: 2px solid #111a2a;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(18, 24, 32, 0.35);
    box-sizing: border-box;
    color: #fff;
    display: flex;
    font-size: 18px;
    gap: 12px;
    justify-content: space-between;
    left: 50%;
    max-width: 600px;
    padding: 24px 32px;
    position: fixed;
    top: 30%;
    transform: translateX(-50%);
    z-index: 99999;
}

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

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Alert type variants */
#gmTextAlertContainer.gm-alert-info {
    background: #222a36;
    border-color: #005198;
    color: #eaf6ff;
}

#gmTextAlertContainer.gm-alert-warning {
    background: #3a2c1a;
    border-color: #f0ad4e;
    color: #ffe6b0;
}

#gmTextAlertContainer.gm-alert-error {
    background: #3a1a1a;
    border-color: #d9534f;
    color: #ffd6d6;
}

#gmTextAlertContainer.gm-alert-success {
    background: #1a3a1a;
    border-color: #1f6f2b;
    color: #d6ffd6;
}

/* Alert text */
#gmTextAlertContainer .gm-text {
    flex: 1;
    font-size: 18px;
    margin-right: 16px;
}

/* Alert close button */
#gmTextAlertContainer .gm-alert-close {
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
    padding: 0 12px;
}

#gmTextAlertContainer .gm-alert-close:hover {
    opacity: 0.7;
}

/* ---- Enhanced Location permission prompt (centered modal) ---- */
#gmLocationPrompt {
    align-items: stretch;
    animation: slideInFromTop 0.2s ease-out;
    background: #222a36;
    border: 2px solid #111a2a;
    border-radius: 8px;
    box-shadow: 0 16px 48px rgba(18, 24, 32, 0.45);
    box-sizing: border-box;
    color: #fff;
    display: flex;
    flex-direction: column;
    font-size: 20px;
    gap: 12px;
    left: 50%;
    max-width: 540px;
    padding: 32px 36px;
    position: fixed;
    top: 30%;
    transform: translateX(-50%);
    z-index: 99999;

}

#gmLocationPrompt .gm-prompt-message {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
}

#gmLocationPrompt .gm-prompt-hint {
    color: #e0e0e0;
    font-size: 16px;
}

#gmLocationPrompt .gm-prompt-btnrow {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
}

#gmLocationPrompt .gm-prompt-btn {
    background: #005198;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(47, 134, 246, 0.15);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 24px;
    transition: background 0.2s;
}

#gmLocationPrompt .gm-prompt-btn.no {
    background: #444;
    color: #fff;
}

#gmLocationPrompt .gm-prompt-btn.no:hover {
    background: #666;
}

#gmLocationPrompt .gm-prompt-btn.yes {
    background: #005198;
    color: #fff;
}

#gmLocationPrompt .gm-prompt-btn.yes:hover {
    background: #005198;
}

.button-holder {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    margin-top: 20px;
}

.infowindow-content {
    display: grid;
    font-weight: 500;
    gap: 10px;
    grid-template-columns: 0.4fr 0.6fr;

}

.infowindow-content p:last-child {
    margin-bottom: 0;
}

.gm-style-iw-ch {
    padding: 0 !important;
}

.gm-style-iw-chr > button {
    position: absolute !important;
    right: 0;
    top: 0;
}

/* Title styling */
.infowindow h2 {
    color: #002647;
    font-size: 1.7em;
    font-weight: 400;
    margin-bottom: 15px;
}

.gm-style-iw {
    background: lightgrey;
    line-height: 1.5;
    margin-bottom: 10px;
}

.gm-style-iw-c button.gm-ui-hover-effect:hover {
    background: #19aad180 !important;
    color: #fff !important;
}

.find-location-section {
    display: flex;
    height: clamp(500px, calc(100vh - var(--glacial-header-height)), 900px);
    margin-top: var(--glacial-header-height);
    padding-bottom: 0;
}

.search-locations-mock-up {
    background: #005198;
    height: 100%;
    justify-content: space-between;
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    overflow: scroll;
    padding-top: 0;
    width: var(--find-loc-width);
}

.search-locations-mock-up h1 {
    color: #fff;
    font-size: 35px;
    line-height: 1.2;
    margin-top: 0;
}

h2.locations-search-subtitle {
    color: #fff;
    font-size: 19px;
    font-weight: 300;
    line-height: 1.5;
}

.search-locations-mock-up.locations-search-on {
    display: flex;
}

a {
    color: #005198;
    text-decoration: none;
}

.find-location-section a:not(.ui-button):not(.open-info-window):hover {
    text-decoration: underline;
}

.title-search {
    align-items: flex-start;
    background: #005097;
    display: flex;
    flex-direction: column;
    gap: 1em;
    padding: 20px;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1;
}

#locationSearch {
    background: transparent;
    display: flex;
    flex: 1;
    gap: 10px;
    line-height: 1;
    width: auto;
}

.search-subtitle-holder {
    display: grid;
    gap: 40px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 10px;
    width: 100%;
}

.pac-input {
    background: transparent;
}

.location-search input {
    background: transparent;
    border: 1px #e2e2e2 solid;
    border-radius: 10px;
    color: #fff;
    padding: 10px 10px 10px 15px;
    width: auto;
}

.location-search input::placeholder {
    color: #fff;
}

.location-search input:focus {
    border-left: 10px solid #e2e2e2;
    box-shadow: 2px 0 15px rgba(256, 256, 256, 0.4);
    outline: none;
}

.location-search button {
    align-items: center;
    -webkit-appearance: none;
    background-color: #efefef;
    border: none;
    border-radius: 10px;
    color: var(--gl-button-bg);
    display: flex;
    font-size: 15px;
    gap: 10px;
    justify-content: center;
    line-height: 1;
    padding: 10px;
    transition: .2s;
}

.location-search button:hover {
    background-color: #fff;
    color: #005198;
    cursor: pointer;
}

.location-search button svg {
    height: 20px;
    margin-bottom: 0;
    width: 20px;
}

/* Button loading spinner */
.btn-spinner {
    animation: spin 0.4s linear infinite;
    border: 4px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    border-top-color: #005198;
    display: inline-block;
    height: 16px;
    width: 16px;
}

.location-search button.is-loading {
    cursor: not-allowed;
    min-width: 60px;
    opacity: 1;
    pointer-events: none;
}

.find-location-div {
    margin-left: auto;
    margin-right: auto;
    position: relative;
    width: 90%;
}

.location-holder-left {
    --gap: 10px;
    /*align-items: stretch;*/
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    gap: var(--gap);
    padding: 0 20px 20px 20px;
    width: 100%;
}

.location-holder-left > div {
    border-radius: 10px;
    display: flex;
    /*flex: 1 0 calc(50% - var(--gap) / 2);*/
    flex-direction: column;
    height: auto;
    /*max-width: calc(50% - var(--gap) / 2);*/
    overflow: hidden;
}

.location-title {
    background-color: #002647;
    color: #fff;
    font-weight: bold;
    line-height: 1em;
    padding: 10px;
    width: 100%;
}

.location-info-holder {
    align-items: center;
    background-color: #f9f9f9;
    display: flex;
    flex: 1;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
    padding: 10px 10px;
}

.location-info-holder > div {
    /*flex: 1*/
}

.location-info-holder .ui-button {
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.4;
    padding: 10px;
}

.location-info-holder ul.phone-fields,
.location-info-holder li {
    margin: 0;
    padding: 0;
}

.address-icon-holder {
    align-content: center;
    align-items: center;
    display: flex;
    gap: 10px;
}

.address-icon-holder svg {
    color: #0a7aff;
}

.icon-placeholder {
    width: 30px;
}

.location-finder-address {
    min-width: 200px;
}

a.open-info-window {
    text-decoration: none;
}

a.open-info-window:hover .location-title {
    background: #047de8;
    color: #fff;
    text-decoration: none;
}

ul.phone-fields li, ul.phone-fields li a {
    align-items: center;
    display: flex;
    gap: 10px;
    line-height: 1;
    margin-top: 0;
}

ul.phone-fields li a {
    margin-top: 0;
}

.entry a:not(.wp-block-button__link):not(.ui-button):not(.lasik-link a) {
    word-break: break-all;
}

.nowrap {
    white-space: nowrap;
}

ul.phone-fields {
    font-size: 18px;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.map-div {
    height: 100%;
    width: 100%;
}

.find-location-div {
    align-items: flex-start;
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 0;
    position: static;
    width: auto;
}

.location-holder-left {
    overflow: scroll;
    position: static;
}

.icon-tooltip {
    align-items: center;
    border-radius: 7px;
    display: flex;
    gap: 5px;
    padding: 3px;
    position: relative;
}

.icon-tooltip::after {
    background-color: #333;
    border-radius: 4px;
    bottom: 125%;
    color: #fff;
    content: attr(data-tooltip);
    font-size: 14px;
    left: 50%;
    opacity: 0;
    padding: 5px 10px;
    position: absolute;
    transform: translateX(-50%);
    transition: opacity 0.3s;
    visibility: hidden;
    white-space: nowrap;
    z-index: 10;
}

.icon-tooltip::before {
    border-color: #333 transparent transparent transparent;
    border-style: solid;
    border-width: 5px;
    bottom: 110%;
    content: "";
    left: 50%;
    opacity: 0;
    position: absolute;
    transform: translateX(-50%);
    transition: opacity 0.3s;
    visibility: hidden;
    z-index: 10;
}

.location-holder-left .icon-tooltip:hover::after,
.location-holder-left .icon-tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

.age-filter {
    display: none;
}

.age-checkboxes {
    color: #fff;
    display: flex;
    gap: 20px;
}

.age-checkboxes > div {
    align-items: center;
    display: flex;
    gap: 2px;
    line-height: 1;
}

.age-checkboxes label {
    line-height: 1;
    margin-bottom: 0;
    margin-right: 0;
}

p.age-filter-label {
    color: #fff;
    margin-bottom: 0;
}

/* Overlay for text alerts so clicks outside dismiss the alert */
#searchContainer.age18 .open-info-window:not(.age18),
#searchContainer.age18 .location-info-holder:not(.age18) {
    display: none !important;
}

#searchContainer.age40 .open-info-window:not(.age40),
#searchContainer.age40 .location-info-holder:not(.age40) {
    display: none !important;
}

/* If both are selected, show if it has either */
#searchContainer.age18.age40 .open-info-window.age18,
#searchContainer.age18.age40 .open-info-window.age40,
#searchContainer.age18.age40 .location-info-holder.age18,
#searchContainer.age18.age40 .location-info-holder.age40 {
    display: flex !important;
}

#searchContainer.age18.age40 .open-info-window:not(.age18):not(.age40),
#searchContainer.age18.age40 .location-info-holder:not(.age18):not(.age40) {
    display: none !important;
}

#gmTextAlertOverlay {
    background: transparent;
    inset: 0;
    pointer-events: auto;
    position: fixed;
    /* allow pointer events so clicks are captured to dismiss alerts */
    z-index: 99998;
}

@media screen and (max-width: 1200px) {

    .search-locations-mock-up {
        width: var(--find-loc-width-md);
    }
}

/* Mobile Responsive Styles - max-width: 767px */
@media (max-width: 991px) {

    .map-div, .location-holder-left {
        position: static;
        width: 100%;
    }

    .find-location-div {
        flex-direction: column;
        gap: 1rem;
    }

    .map-div {
        height: 400px;
        width: 100%;
    }

    #resetMap {
        display: none;
    }

    .find-location-section {
        flex-direction: column-reverse;
        height: auto;
        min-height: 100vh;
    }

    .search-locations-mock-up {
        height: auto;
        max-width: 100%;
        order: 2;
        width: 100%;
    }

    .find-location-div {
        min-height: 300px;
        order: 1;
        width: 100%;
    }

    #amrMap,
    .map-div {
        height: 300px !important;
        min-height: 300px;
    }

    .location-search {
        padding: 20px 15px;
    }

    .title-search {
        padding: 15px;
    }

    .title-search h1,
    .search-locations-mock-up h1 {
        font-size: 1.75rem;
        margin-bottom: 1rem;
    }

    .locations-search-subtitle,
    h2.locations-search-subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }

    .search-subtitle-holder {
        gap: 20px;
        grid-template-columns: 1fr;
    }

    #locationSearch {
        flex-direction: column;
        margin-bottom: 15px;
        width: 100%;
    }

    .location-search input {
        width: auto;
    }

    .button-holder {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }

    .button-holder button,
    .location-search button {
        font-size: 0.9rem;
        padding: 12px 20px;
        width: 100%;
    }

    #getLocation,
    #resetMap {
        justify-content: center;
    }

    .age-filter {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        margin-top: 15px;
        padding: 15px;
    }

    .age-filter-label,
    p.age-filter-label {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .age-checkboxes {
        flex-direction: row;
        gap: 20px;
        justify-content: flex-start;
    }

    .location-holder-left {
        max-height: none;
        overflow-y: visible;
        padding: 15px;
    }

    .location-holder-left > div {
        margin-bottom: 10px;
        padding: 0;
    }

    .location-title {
        font-size: 1rem;
        padding: 12px;
    }

    .location-info-holder {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 15px;
    }

    .location-info-holder > div {
        width: 100%;
    }

    .address-icon-holder {
        align-items: center;
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 10px;
        width: 100%;
    }

    .address-icon-holder svg {
        width: 20px;
    }

    .location-finder-address {
        flex: 1 1 100%;
        font-size: 0.9rem;
        margin-bottom: 0;
        min-width: auto;
    }

    .icon-placeholder {
        margin-right: 0;
        width: auto;
    }

    .phone-fields {
        margin: 0;
        width: 100%;
    }

    .phone-fields li a,
    ul.phone-fields li a {
        font-size: 0.9rem;
    }

    .link.ui-button,
    .location-info-holder .ui-button {
        display: block;
        font-size: 0.9rem;
        margin-top: 0;
        padding: 10px 15px;
        text-align: center;
        width: 100%;
    }

    .ecp-svg-icon {
        height: 20px;
        width: 20px;
    }

    #gmTextAlertContainer {
        font-size: 16px;
        max-width: 90%;
        padding: 20px 24px;
    }

    #gmTextAlertContainer .gm-text {
        font-size: 16px;
    }

    #gmLocationPrompt {
        font-size: 18px;
        max-width: 90%;
        padding: 24px 28px;
    }

    #gmLocationPrompt .gm-prompt-message {
        font-size: 20px;
    }

    #gmLocationPrompt .gm-prompt-hint {
        font-size: 14px;
    }

    #gmLocationPrompt .gm-prompt-btn {
        font-size: 16px;
        padding: 10px 20px;
    }

    .gm-style-iw,
    .infowindow {
        font-size: 14px;
        max-width: 280px;
    }

    .infowindow h2 {
        font-size: 1.4em;
    }
}

@media screen and (max-width: 479px) {
    .search-locations-mock-up {
        align-items: flex-start;
        flex-direction: column;
        justify-content: flex-start;
    }

    .location-search {
        width: 100%;
    }

    #amrMap, .find-location-div {
        display: none !important;
        height: 0 !important;
        min-height: 0;

    }
}