/* ── Visitor location toast (guest catalog pages) ──
   Mobile/tablet: in-flow below the sticky header so the site search cannot
   cover the picker, and the picker cannot sit on top of the header search.
   Desktop: overlay on the right, just below the measured header. */
.ch-loc-toast-root {
    position: relative;
    top: auto;
    right: auto;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    padding: 0.55rem max(0.75rem, env(safe-area-inset-right, 0px)) 0.7rem max(0.75rem, env(safe-area-inset-left, 0px));
    background: #0f172a;
    pointer-events: none;
}
.ch-loc-toast-root > * {
    pointer-events: auto;
}
.ch-loc-toast-root.is-collapsed {
    position: fixed;
    top: calc(var(--ch-sticky-header-h, 6.85rem) + 0.5rem + env(safe-area-inset-top, 0px));
    right: max(0.5rem, env(safe-area-inset-right, 0px));
    left: auto;
    width: auto;
    padding: 0;
    background: transparent;
    z-index: 1050;
}

.ch-loc-toast {
    background: #fff;
    border: 1px solid rgba(1, 141, 18, 0.16);
    border-radius: 0.9rem;
    width: min(21rem, 100%);
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 16px 40px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    animation: ch-loc-toast-in 0.28s ease;
}
.ch-loc-toast__header {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.8rem 0.8rem 0.65rem;
    border-bottom: 1px solid var(--ch-border);
    background: linear-gradient(180deg, #f8fffe 0%, #fff 100%);
}
.ch-loc-toast__icon {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    background: var(--ch-green-soft);
    color: var(--ch-green);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    box-shadow: inset 0 0 0 1px rgba(1, 141, 18, 0.08);
}
.ch-loc-toast__copy {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 0.05rem;
}
.ch-loc-toast__title {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--ch-text);
    line-height: 1.35;
}
.ch-loc-toast__title strong {
    color: var(--ch-green-dark);
    font-weight: 800;
}
.ch-loc-toast__sub {
    margin: 0.2rem 0 0;
    font-size: 0.74rem;
    color: var(--ch-muted);
    line-height: 1.4;
}
.ch-loc-toast__hide {
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    border: 1px solid var(--ch-border);
    background: #fff;
    color: var(--ch-muted);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ch-loc-toast__hide:hover {
    background: var(--ch-surface);
    color: var(--ch-text);
    border-color: #cbd5e1;
}

.ch-loc-toast__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
    padding: 0.55rem 0.8rem 0.7rem;
}
.ch-loc-toast__form {
    margin: 0;
    display: inline-flex;
}
.ch-loc-toast__btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin: 0;
    border: 1px solid var(--ch-border);
    background: #fff;
    color: var(--ch-text);
    font-family: inherit;
    font-weight: 700;
    font-size: 0.76rem;
    line-height: 1.2;
    padding: 0.42rem 0.75rem;
    border-radius: 0.55rem;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}
.ch-loc-toast__btn:hover {
    text-decoration: none;
}
.ch-loc-toast__btn:active {
    transform: scale(0.97);
}
.ch-loc-toast__btn--primary {
    background: var(--ch-green);
    border-color: var(--ch-green);
    color: #fff;
}
.ch-loc-toast__btn--primary:hover {
    background: var(--ch-green-dark);
    border-color: var(--ch-green-dark);
    color: #fff;
}
.ch-loc-toast__btn--outline {
    color: var(--ch-green);
    border-color: rgba(1, 141, 18, 0.35);
    background: var(--ch-green-soft);
}
.ch-loc-toast__btn--outline:hover {
    background: #d8efef;
    color: var(--ch-green-dark);
}
.ch-loc-toast__btn--ghost {
    color: var(--ch-muted);
    background: #fff;
}
.ch-loc-toast__btn--ghost:hover {
    color: var(--ch-text);
    background: var(--ch-surface);
}
.ch-loc-toast__btn--loading {
    pointer-events: none;
    opacity: 0.85;
    cursor: wait;
}

.ch-loc-pin {
    appearance: none;
    -webkit-appearance: none;
    width: 2.85rem;
    height: 2.85rem;
    margin-left: auto;
    border: none;
    border-radius: 999px;
    background: var(--ch-green);
    color: #fff;
    box-shadow:
        0 4px 12px rgba(1, 141, 18, 0.28),
        0 8px 24px rgba(1, 141, 18, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    animation: ch-loc-pin-in 0.25s ease;
}
.ch-loc-pin:hover {
    background: var(--ch-green-dark);
    transform: translateY(-1px);
}

.ch-loc-modal {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

#ch-location-modal .modal-dialog {
    width: min(44rem, calc(100vw - 1rem));
    margin-inline: auto;
}
#ch-location-modal .modal-content {
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
}
#ch-location-modal .kenya-map-picker__canvas {
    height: clamp(15rem, 40dvh, 22rem);
    border: 1px solid var(--ch-border, #e2e8f0);
    border-radius: .65rem;
    overflow: hidden;
}
#ch-location-modal .modal-footer .btn {
    min-height: 2.75rem;
}
/* This modal is rendered after the layout head. Keep its Places portal
   styles in the stylesheet loaded by the layout itself. */
#ch-location-modal .ch-place-autocomplete-spacer {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    pointer-events: none;
}
.ch-place-autocomplete-portal {
    position: fixed;
    z-index: 20050;
    pointer-events: auto;
}
.ch-place-autocomplete-portal gmp-place-autocomplete,
.ch-place-autocomplete-portal .ch-place-autocomplete {
    display: block;
    width: 100%;
}

@keyframes ch-loc-toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes ch-loc-pin-in {
    from {
        opacity: 0;
        transform: scale(0.82);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (min-width: 992px) {
    .ch-loc-toast-root:not(.is-collapsed) {
        position: fixed;
        top: calc(var(--ch-sticky-header-h, 10.5rem) + 0.5rem + env(safe-area-inset-top, 0px));
        right: max(0.75rem, env(safe-area-inset-right, 0px));
        left: auto;
        width: min(21rem, calc(100vw - 1.25rem));
        padding: 0;
        background: transparent;
        z-index: 1090;
    }
    .ch-loc-toast {
        width: 100%;
    }
}

@media (min-width: 576px) {
    .ch-loc-toast-root.is-collapsed {
        top: calc(var(--ch-sticky-header-h, 10.5rem) + 0.5rem + env(safe-area-inset-top, 0px));
        right: max(0.75rem, env(safe-area-inset-right, 0px));
    }
}

@media (max-width: 575.98px) {
    .ch-loc-toast-root:not(.is-collapsed) {
        padding: 0.45rem max(0.5rem, env(safe-area-inset-right, 0px)) 0.55rem max(0.5rem, env(safe-area-inset-left, 0px));
    }
    .ch-loc-toast {
        width: 100%;
    }
    .ch-loc-toast__sub {
        display: none;
    }
    .ch-loc-toast__btn span {
        display: none;
    }
    .ch-loc-toast__btn {
        padding: 0.45rem 0.55rem;
    }
    .ch-loc-toast__btn--primary span,
    .ch-loc-toast__btn--outline span {
        display: inline;
    }
}

[x-cloak] {
    display: none !important;
}
