/*
 * גת עקיבא: עמוד מפת הסניפים, [gak_branches_page].
 *
 * העיצוב הוא הקוד של עמוד הסניפים כפי שהוא, אחד לאחד. השינוי היחיד הוא
 * ש-#gat-map הפך ל-.gat-map, כדי ששתי מפות באותו עמוד לא יתנגשו.
 * הנתונים כבר לא כתובים כאן אלא מגיעים ממסך הסניפים.
 */
.gat-locations {
    --gat-green: #176b2a;
    --gat-green-light: #2f963d;
    --gat-red: #df2f2f;
    --gat-text: #262626;
    --gat-muted: #666;
    --gat-bg: #f7f8f6;
    --gat-border: #e4e8e2;

    max-width: 1180px;
    margin: 0 auto;
    direction: rtl;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--gat-text);
    box-sizing: border-box;
}

.gat-locations *,
.gat-locations *::before,
.gat-locations *::after {
    box-sizing: border-box;
}

/* HEADER */

.gat-locations__header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 26px;
}

.gat-locations__title {
    margin: 0 0 10px;
    color: var(--gat-green);
    font-size: clamp(32px, 5vw, 52px);
    line-height: 1.1;
    font-weight: 900;
}

.gat-locations__subtitle {
    margin: 0;
    color: var(--gat-muted);
    font-size: 17px;
    line-height: 1.7;
}

/* TOOLBAR */

.gat-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.gat-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.gat-filter,
.gat-near-me {
    appearance: none;
    border: 1px solid var(--gat-border);
    background: #fff;
    color: var(--gat-text);
    border-radius: 999px;
    padding: 10px 17px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s ease;
}

.gat-filter:hover {
    border-color: var(--gat-green);
}

.gat-filter.is-active {
    background: var(--gat-green);
    border-color: var(--gat-green);
    color: #fff;
}

.gat-near-me {
    background: #fff;
    border: 2px solid var(--gat-green);
    color: var(--gat-green);
}

.gat-near-me:hover {
    background: var(--gat-green);
    color: #fff;
}

/* MAP */

.gat-map-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--gat-border);
    box-shadow: 0 12px 36px rgba(20,60,25,.10);
    background: #eee;
    margin-bottom: 32px;
}

.gat-locations .gat-map {
    height: 570px;
    width: 100%;
    z-index: 1;
}

.gat-map-message {
    position: absolute;
    z-index: 500;
    bottom: 18px;
    right: 18px;
    max-width: calc(100% - 36px);
    padding: 11px 16px;
    background: rgba(255,255,255,.96);
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,.15);
    font-size: 14px;
    font-weight: 700;
    display: none;
}

/* CUSTOM MAP PIN */

.gat-pin {
    width: 34px;
    height: 34px;
    position: relative;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    border: 3px solid #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.25);
}

.gat-pin::after {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    background: #fff;
    border-radius: 50%;
    top: 9px;
    left: 9px;
}

.gat-pin--fresh {
    background: var(--gat-green);
}

.gat-pin--juice {
    background: var(--gat-red);
}

.gat-pin--both {
    background: linear-gradient(
        135deg,
        var(--gat-green) 0 50%,
        var(--gat-red) 50% 100%
    );
}

.gat-pin--24 {
    box-shadow:
        0 0 0 4px rgba(23,107,42,.23),
        0 3px 12px rgba(0,0,0,.25);
}

/* LEAFLET POPUP */

.gat-locations .leaflet-popup-content-wrapper {
    border-radius: 17px;
    box-shadow: 0 8px 30px rgba(0,0,0,.18);
}

.gat-locations .leaflet-popup-content {
    width: 260px !important;
    margin: 17px;
    direction: rtl;
    text-align: right;
}

.gat-popup__title {
    color: var(--gat-green);
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 7px;
}

.gat-popup__place {
    color: var(--gat-muted);
    font-weight: 700;
    margin-bottom: 8px;
}

.gat-popup__row {
    margin: 7px 0;
    line-height: 1.45;
}

.gat-popup__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.gat-popup__badge {
    border-radius: 999px;
    padding: 5px 9px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.gat-popup__badge--fresh {
    background: var(--gat-green);
}

.gat-popup__badge--juice {
    background: var(--gat-red);
}

.gat-popup__buttons {
    display: flex;
    gap: 7px;
    margin-top: 12px;
}

.gat-popup__button {
    flex: 1;
    text-align: center;
    text-decoration: none !important;
    color: #fff !important;
    font-weight: 800;
    padding: 9px 8px;
    border-radius: 9px;
}

.gat-popup__button--waze {
    background: #25b9e8;
}

.gat-popup__button--call {
    background: var(--gat-green);
}

/* RESULTS HEADER */

.gat-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 17px;
}

.gat-results-title {
    margin: 0;
    color: var(--gat-green);
    font-size: 27px;
    font-weight: 900;
}

.gat-results-count {
    color: var(--gat-muted);
    font-size: 14px;
    font-weight: 700;
}

/* GRID */

.gat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 19px;
}

.gat-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 23px;
    background: #fff;
    border: 1px solid var(--gat-border);
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(29,69,34,.08);
    cursor: pointer;
    transition:
        transform .2s ease,
        box-shadow .2s ease,
        border-color .2s ease;
}

.gat-card:hover {
    transform: translateY(-3px);
    border-color: #c8d9c5;
    box-shadow: 0 13px 30px rgba(29,69,34,.13);
}

.gat-card.is-selected {
    border: 2px solid var(--gat-green);
    box-shadow: 0 14px 35px rgba(23,107,42,.18);
}

.gat-card.is-hidden {
    display: none;
}

.gat-card__title {
    margin: 0 0 8px;
    color: var(--gat-green);
    font-size: 21px;
    line-height: 1.3;
    font-weight: 900;
}

.gat-card__place {
    margin: -2px 0 13px;
    color: var(--gat-muted);
    font-size: 14px;
    font-weight: 700;
}

.gat-card__row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 7px;
    margin-bottom: 9px;
    line-height: 1.5;
    font-size: 14px;
}

.gat-card__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 5px 0 13px;
}

.gat-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 11px;
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.gat-badge--fresh {
    background: var(--gat-green);
}

.gat-badge--juice {
    background: var(--gat-red);
}

.gat-badge--24 {
    color: var(--gat-green);
    background: #e8f3e8;
    border: 1px solid #c8dfc8;
}

.gat-card__note {
    padding: 10px 12px;
    margin: 2px 0 12px;
    background: #fff8da;
    color: #5f4a00;
    border: 1px solid #f0df94;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
}

.gat-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 9px;
}

.gat-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 12px;
    border-radius: 10px;
    text-decoration: none !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 900;
}

.gat-btn--waze {
    background: #25b9e8;
}

.gat-btn--call {
    background: var(--gat-green);
}

.gat-no-results {
    display: none;
    padding: 40px;
    text-align: center;
    border-radius: 18px;
    background: var(--gat-bg);
    color: var(--gat-muted);
    font-weight: 700;
}

/* RESPONSIVE */

@media (max-width: 980px) {
    .gat-grid {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }

    .gat-locations .gat-map {
        height: 500px;
    }
}

@media (max-width: 650px) {

    .gat-toolbar {
        align-items: stretch;
    }

    .gat-filters {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 4px;
        scrollbar-width: none;
    }

    .gat-filters::-webkit-scrollbar {
        display: none;
    }

    .gat-filter {
        flex: 0 0 auto;
    }

    .gat-near-me {
        width: 100%;
    }

    .gat-locations .gat-map {
        height: 52vh;
        min-height: 390px;
        max-height: 520px;
    }

    .gat-map-wrap {
        border-radius: 17px;
        margin-bottom: 25px;
    }

    .gat-grid {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .gat-card {
        padding: 19px 16px;
    }

    .gat-results-title {
        font-size: 23px;
    }

    .gat-results-header {
        align-items: flex-end;
    }
}

/* Keyboard focus, which the original had no style for. Invisible to mouse users. */
.gat-locations .gat-filter:focus-visible,
.gat-locations .gat-near-me:focus-visible,
.gat-locations .gat-card:focus-visible,
.gat-locations .gat-btn:focus-visible,
.gat-locations .leaflet-marker-icon:focus-visible {
    outline: 3px solid #1d4ed8;
    outline-offset: 3px;
}
