:root {
    --leaflet-modal-accent: var(--home-yellow, #ffea00);
    --leaflet-modal-surface: #ffffff;
    --leaflet-modal-scroller: #f1f1f1;
    --leaflet-modal-button: #efefef;
    --leaflet-modal-text: #0a0a0a;
    --leaflet-modal-shadow: rgba(0, 0, 0, .3);
    --leaflet-modal-footer-shadow: rgba(0, 0, 0, .06);
}

:root[data-theme="dark"] {
    --leaflet-modal-surface: #171717;
    --leaflet-modal-scroller: #242424;
    --leaflet-modal-button: #2b2b2b;
    --leaflet-modal-text: #ffffff;
    --leaflet-modal-shadow: rgba(0, 0, 0, .45);
    --leaflet-modal-footer-shadow: rgba(0, 0, 0, .28);
}

body.leaflet-modal-open {
    overflow: hidden;
}

.leaflet-modal[hidden] {
    display: none;
}

.leaflet-modal {
    position: fixed;
    z-index: 11000;
    inset: 0;
    display: grid;
    padding: 28px;
    place-items: center;
    box-sizing: border-box;
    font-family: "Onest VF", sans-serif;
    --home-yellow: #ffea00;
}

.leaflet-modal *,
.leaflet-modal *::before,
.leaflet-modal *::after {
    box-sizing: border-box;
    font-family: inherit;
}

.leaflet-modal .home-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .87);
}

.leaflet-modal .home-modal__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(560px, 100%);
    max-width: 560px;
    max-height: calc(100vh - 56px);
    max-height: calc(100dvh - 56px);
    flex-direction: column;
    margin: 0;
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    background: var(--leaflet-modal-surface);
    color: var(--leaflet-modal-text);
    box-shadow: 0 24px 70px var(--leaflet-modal-shadow);
}

.leaflet-modal__title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.leaflet-modal .home-leaflets {
    flex: 1 1 auto;
    min-height: 0;
    padding: 16px 16px 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--leaflet-modal-scroller);
    color-scheme: light;
}

:root[data-theme="dark"] .leaflet-modal .home-leaflets {
    color-scheme: dark;
}

.leaflet-modal .home-leaflets__group,
.leaflet-modal .home-leaflets__group.is-active {
    display: block;
}

.leaflet-modal .home-leaflets__group + .home-leaflets__group {
    margin-top: 24px;
}

.leaflet-modal .home-leaflets img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 auto 14px;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
}

.leaflet-modal .home-modal__footer {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
    padding: 18px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    background: var(--leaflet-modal-surface);
    color: var(--leaflet-modal-text);
    box-shadow: 0 -8px 24px var(--leaflet-modal-footer-shadow);
}

.leaflet-modal .home-modal__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.leaflet-modal .home-modal__button {
    display: inline-flex;
    min-height: 45px;
    padding: 11px 18px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--leaflet-modal-button);
    color: var(--leaflet-modal-text);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-shadow: none;
    cursor: pointer;
}

.leaflet-modal .home-modal__button:hover,
.leaflet-modal .home-modal__button:focus-visible,
.leaflet-modal .home-modal__button.is-active {
    background: var(--leaflet-modal-accent);
    color: #0a0a0a;
}

@media (max-width: 575.98px) {
    .leaflet-modal {
        padding: 12px;
    }

    .leaflet-modal .home-modal__dialog {
        max-height: calc(100vh - 24px);
        max-height: calc(100dvh - 24px);
        border-radius: 16px;
    }

    .leaflet-modal .home-modal__footer {
        padding: 14px;
    }

    .leaflet-modal .home-modal__button {
        min-height: 42px;
        padding: 10px 14px;
        font-size: 13px;
    }
}
