.site-footer {
    background: #28123f;
    color: #fff;
    overflow-wrap: anywhere;
}

:root {
    --floating-control-bottom: max(16px, env(safe-area-inset-bottom));
    --icon-control-purple: #4b2b85;
    --icon-control-hover: #62328a;
    --icon-control-pressed: #321c5c;
}

.a11y-widget {
    --a11y-panel-offset: 52px;
    bottom: var(--floating-control-bottom);
    left: 0;
}

.a11y-trigger {
    width: 44px;
    height: 44px;
    padding-right: 8px;
    border-radius: 0 8px 8px 0;
}

.a11y-trigger::before {
    content: "";
    position: absolute;
    inset: 0 8px 0 0;
    border-radius: 0 8px 8px 0;
}

.a11y-trigger > svg { position: relative; }

html.a11y-contrast .a11y-trigger { background-color: transparent !important; }
html.a11y-contrast .a11y-widget { background-color: transparent !important; }
html.a11y-contrast .a11y-trigger::before {
    background: #000;
    border: 1px solid #fff;
}

.a11y-trigger:focus-visible,
html.a11y-keyboard .a11y-trigger:focus {
    outline: none !important;
}

.a11y-badge {
    position: absolute;
    top: -4px;
    right: 3px;
    display: grid;
    width: 14px;
    height: 14px;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--icon-control-purple);
    background: #fff;
    color: #28123f;
    font-size: 12px;
    pointer-events: none;
}

.a11y-badge[hidden] { display: none; }

.a11y-badge::after,
.a11y-options [aria-pressed="true"]::after,
.a11y-text-size.a11y-checked::after {
    content: "";
    display: inline-block;
    flex: none;
    width: 0.36em;
    height: 0.62em;
    border: solid currentColor;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.a11y-options [aria-pressed],
.a11y-text-size {
    display: flex;
    align-items: center;
    gap: 0.5em;
}

#a11y-panel {
    position: absolute;
    bottom: var(--a11y-panel-offset);
    left: 8px;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    inline-size: 18.5rem;
    max-inline-size: calc(100vw - 16px);
    max-block-size: calc(100vh - var(--floating-control-bottom) - var(--a11y-panel-offset) - 8px);
    max-block-size: calc(100dvh - var(--floating-control-bottom) - var(--a11y-panel-offset) - 8px);
    overflow: hidden;
    border: 1px solid #d8cce4;
    border-radius: .875rem;
    background: #fff;
    color: #28123f;
    box-shadow: 0 8px 24px rgb(40 18 63 / 18%);
}

#a11y-panel[hidden] { display: none; }

.a11y-panel-header,
.a11y-text-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .375rem;
}

.a11y-panel-header {
    padding-inline-start: .75rem;
    border-block-end: 1px solid transparent;
    background: var(--icon-control-purple);
    color: #fff;
}

.a11y-panel-header h2 { font-weight: 700; }

.a11y-panel-close {
    display: grid;
    flex: none;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
}

.a11y-panel-close:hover svg { opacity: .75; }

.a11y-panel-close:focus-visible,
html.a11y-keyboard .a11y-panel-close:focus {
    outline: 2px solid #fff !important;
    outline-offset: -4px !important;
}

.a11y-panel-body {
    overflow: auto;
    overscroll-behavior: contain;
    display: grid;
    gap: .5rem;
    padding: .625rem .75rem .375rem;
    font-size: .875rem;
}

.a11y-text-row { flex-wrap: wrap; }

.a11y-text-buttons {
    display: flex;
    gap: .25rem;
    margin-inline-start: auto;
}

.a11y-options {
    display: grid;
    gap: .375rem;
}

.a11y-options button,
.a11y-text-buttons button,
.a11y-reset {
    min-block-size: 44px;
    border: 1px solid #917aa4;
    border-radius: .5rem;
}

.a11y-text-buttons button {
    inline-size: 44px;
    background: #f7f4fa;
    font-weight: 700;
}

.a11y-text-buttons [aria-disabled="true"] {
    border-style: dashed;
    color: #635371;
    cursor: default;
}

.a11y-options button {
    justify-content: space-between;
    padding: .25em .75em;
    background: #fff;
    text-align: start;
}

.a11y-options [aria-pressed="true"] {
    border-color: var(--icon-control-purple);
    background: #eee7f6;
    color: var(--icon-control-purple);
    font-weight: 700;
}

.a11y-reset {
    border-color: var(--icon-control-purple);
    background: var(--icon-control-purple);
    color: #fff;
    font-weight: 700;
}

.a11y-panel-info {
    color: #51465e;
    text-align: center;
}

.a11y-panel-info a {
    display: inline-grid;
    place-items: center;
    min-block-size: 44px;
    color: var(--icon-control-purple);
    font-weight: 600;
    text-decoration: underline;
}

.footer-wrap {
    inline-size: min(74rem, calc(100% - 2rem));
    margin-inline: auto;
}

.footer-columns {
    display: grid;
    gap: 2rem;
    padding-block: 2.75rem;
}

.site-footer h2 {
    margin: 0 0 .7rem;
    color: #ffd269;
    font-size: 1.2rem;
    font-weight: 800;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer address {
    margin-block-start: .65rem;
    font-style: normal;
}

.footer-contacts a {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .45rem;
    min-block-size: 2.5rem;
}

.footer-contacts svg,
.navigation-icon-button svg,
.lightbox-close svg {
    flex: none;
    inline-size: 1.2rem;
    block-size: 1.2rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.footer-contacts svg { color: #ffd269; }

.navigation-icon-button svg,
.lightbox-close svg { inline-size: 20px; block-size: 20px; }

:where(.site-footer) a {
    text-decoration: none;
    text-underline-offset: .18em;
}

.site-footer a:is(:hover, :focus-visible) {
    text-decoration: underline;
}

.site-footer a:focus-visible {
    outline: 2px solid #ffd269;
    outline-offset: 2px;
}

.footer-categories a,
.footer-location {
    display: block;
    padding-block: .5rem;
}

.footer-location {
    display: flex;
    align-items: flex-start;
    gap: .45rem;
}

.footer-waze-icon {
    flex: none;
    inline-size: 1.125rem;
    block-size: 1.125rem;
    margin-block-start: .15rem;
}

.footer-map {
    display: block;
    border: 1px solid #a58bb4;
    border-radius: .65rem;
}

.footer-map img {
    display: block;
    inline-size: 100%;
    block-size: auto;
    border-radius: inherit;
}

.footer-bottom {
    border-block-start: 1px solid #6e5880;
}

.footer-bottom .footer-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .5rem 1rem;
    padding-block: 1rem 5rem;
}

@media (min-width: 40em) {
    .footer-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 60em) {
    .footer-columns { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr) minmax(0, 1.3fr); }
}

#image-lightbox {
    position: fixed;
    inset: 0;
    margin: auto;
    inline-size: fit-content;
    max-inline-size: calc(100% - 2rem);
    max-block-size: calc(100% - 2rem);
    padding: .5rem;
    border: 1px solid #a58bb4;
    border-radius: .75rem;
    background: #28123f;
    color: #fff;
}

#image-lightbox::backdrop { background: rgb(14 6 24 / 83%); }

.lightbox-image {
    display: block;
    max-inline-size: 100%;
    max-block-size: calc(100dvh - 6rem);
    object-fit: contain;
}

.lightbox-close,
.navigation-icon-button {
    display: grid;
    place-items: center;
    inline-size: 44px;
    block-size: 44px;
    color: #fff;
    cursor: pointer;
}

.navigation-icon-button,
.a11y-trigger::before {
    border: 1px solid #a58bb4;
    background: var(--icon-control-purple);
}

.a11y-trigger::before { border-left: 0; }

.navigation-icon-button {
    border-radius: 5px;
}

.back-to-top:focus-visible,
.a11y-trigger:focus-visible::before,
html.a11y-keyboard .a11y-trigger:focus::before {
    outline: 2px solid #fff;
    outline-offset: -3px;
}

html.a11y-keyboard .back-to-top:focus {
    outline: 2px solid #fff !important;
    outline-offset: -3px !important;
}

@media (prefers-reduced-motion: no-preference) {
    .navigation-icon-button,
    .a11y-trigger::before { transition: background-color 150ms ease; }
}

.lightbox-close {
    margin-block-end: .5rem;
    margin-inline-start: auto;
}

.lightbox-close,
.gallery-dialog .gallery-close {
    border: 0;
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

:is(.lightbox-close, .gallery-close):hover svg { opacity: .75; }
:is(.lightbox-close, .gallery-close):focus-visible {
    outline: 2px solid #ffd269;
    outline-offset: -2px;
}

html.image-lightbox-open { overflow: hidden; }

.back-to-top {
    position: fixed;
    bottom: var(--floating-control-bottom);
    right: max(16px, env(safe-area-inset-right));
    z-index: 30;
}

.back-to-top[hidden] { display: none; }
.navigation-icon-button:hover,
.a11y-trigger:hover::before { background: var(--icon-control-hover); }

.navigation-icon-button:active,
.a11y-trigger:active::before { background: var(--icon-control-pressed); }
