/* Bitrix admin panel + mobile nav (design.css hides .nav under 1020px) */

.topbar__links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    flex-shrink: 0;
}

.header {
    overflow: visible;
}

html:has(.kassa-page),
body:has(.kassa-page) {
    height: 100%;
    height: 100dvh;
    max-height: 100%;
    max-height: 100dvh;
    overflow: hidden !important;
    overscroll-behavior: none;
}
body:has(.kassa-page) {
    display: flex;
    flex-direction: column;
    min-height: 0;
}
body:has(.kassa-page) .footer,
body:has(.kassa-page) .cookie-banner {
    display: none !important;
}
body:has(.kassa-page) main {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: hidden;
}
.kassa-page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    margin: 0;
    overflow: hidden;
}
.kassa-page__bar {
    width: min(100% - 2.75rem, var(--container-wide, 1280px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
    min-height: 2.4rem;
    padding: 0.2rem 0 0.35rem;
    border: 0;
}
.kassa-page__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-dark);
    text-decoration: none;
    white-space: nowrap;
}
.kassa-page__back:hover,
.kassa-page__back:focus-visible {
    color: var(--brand);
}
.kassa-page__chevron {
    font-size: 1rem;
    line-height: 1;
}
.kassa-page__hint {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--paper-mute);
    white-space: nowrap;
}
.kassa-page .intickets-embed,
.kassa-page .intickets-embed__stage,
.kassa-page .intickets-frame-container,
.kassa-page .intickets-frame-wrapper,
.kassa-page .intickets-next-container-3 {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    width: 100%;
    max-width: none;
    height: auto;
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.kassa-page .intickets-embed {
    border: 0;
    margin-top: 0;
}
.kassa-page .intickets-frame-wrapper iframe,
.kassa-page .intickets-next-container-3 iframe,
.kassa-page .intickets-next-container-3 #intickets-frame,
.kassa-page .intickets-embed__frame {
    flex: 1 1 auto;
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    height: calc(100% + 4.75rem) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin-top: -4.75rem;
    border: 0 !important;
    border-radius: 0 !important;
    overflow: auto !important;
}
@media (max-width: 400px) {
    .kassa-page__bar {
        width: min(100% - 2rem, var(--container-wide, 1280px));
    }
    .kassa-page__hint { display: none; }
}

.crumbs {
    width: min(100% - 2.75rem, var(--container-wide, 1280px));
    margin: 0.65rem auto 0;
}
.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    color: var(--paper-mute);
}
.crumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: var(--paper-faint);
}
.crumbs a { color: var(--paper-mute); }
.crumbs a:hover { color: var(--brand); }
.crumbs [aria-current="page"] { color: var(--text-dark); }
.feedback-form__captcha img {
    display: block;
    margin: 0.35rem 0;
    border: 1px solid var(--line-dark);
}
@media (max-width: 400px) {
    .crumbs { width: min(100% - 2rem, var(--container-wide, 1280px)); }
}

.btn:focus-visible,
.chip:focus-visible,
.nav a:focus-visible,
.osm-map__btn:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}
.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0 0 1.25rem;
}
.shows-search select {
    border: 1px solid var(--line-dark);
    padding: 0.55rem 0.75rem;
    font: inherit;
    background: #fff;
}
.show-dates {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin: 1rem 0 0;
    padding: 0;
}
.show-dates li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--line);
}
.show-dates span {
    display: block;
    font-size: 0.8rem;
    color: var(--paper-mute);
}
.show-tickets__note {
    margin-top: 1rem;
    font-size: 0.82rem;
    color: var(--paper-mute);
    line-height: 1.45;
}
.person-shows {
    margin-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.person-shows a:hover { color: var(--brand); }

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    padding: 11px 10px;
    flex-shrink: 0;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
    z-index: 2;
    background: #fff;
    border: 1px solid var(--line-dark);
    border-radius: 0;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    touch-action: manipulation;
}
.nav-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--text-dark);
    transform-origin: center;
    transition: transform 0.2s var(--ease, ease), opacity 0.2s;
}
.header.is-open .nav-toggle span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.header.is-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}
.header.is-open .nav-toggle span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 1020px) {
    .nav-toggle { display: flex; }
    .header.is-open .header__panel {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--line);
        padding: 0.25rem 1.375rem 1.25rem;
        box-sizing: border-box;
        z-index: 101;
        box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    }
    .header.is-open .nav {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }
    .header.is-open .nav a {
        display: block;
        padding: 0.9rem 0;
        border-bottom: 1px solid var(--line);
        box-shadow: none;
    }
    .header.is-open .header__cta {
        display: flex;
        position: static;
        margin: 1rem 0 0;
        width: 100%;
        top: auto;
        right: auto;
    }
}

#bx-panel { font-size: 13px; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
.shows-search {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.shows-search input[type="search"] {
    min-width: 16rem;
    flex: 1;
    border: 1px solid var(--line-dark);
    padding: 0.55rem 0.75rem;
    font: inherit;
}
.intickets-embed {
    margin-top: 2.5rem;
    padding-top: 0;
    border-top: 0;
}
/* Last show already has a row rule; don't stack a second line above the kassa. */
.afisha-day:last-of-type {
    margin-bottom: 0;
}
.intickets-embed .h2 {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.15;
    margin: 0.35rem 0 0.75rem;
    color: var(--text-dark);
}
.intickets-embed__stage {
    margin-top: 1.35rem;
    width: 100%;
    background: transparent;
}
.intickets-embed .intickets-frame-container,
.intickets-embed .intickets-frame-wrapper {
    width: 100%;
    max-width: 100%;
}
.intickets-embed .intickets-frame-wrapper iframe,
.intickets-embed .intickets-next-container-3,
.intickets-embed .intickets-next-container-3 iframe,
.intickets-embed .intickets-next-container-3 #intickets-frame {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: min(88vh, 960px) !important;
    min-height: 760px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent;
}
.intickets-embed__frame {
    width: 100%;
    min-height: 760px;
    border: 0;
    background: transparent;
    display: block;
}
.intickets-embed__note,
.intickets-embed__alt {
    font-size: 0.9rem;
    color: var(--paper-mute);
    margin: 0.5rem 0 0;
}
.intickets-embed__alt {
    margin-top: 0.85rem;
}
.intickets-embed__alt a {
    color: var(--brand);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.feedback-form {
    display: grid;
    gap: 0.85rem;
    max-width: 36rem;
}
.feedback-form label { font-size: 0.85rem; }
.feedback-form input[type="text"],
.feedback-form input[type="email"],
.feedback-form textarea {
    width: 100%;
    border: 1px solid var(--line-dark);
    padding: 0.55rem 0.75rem;
    font: inherit;
}
.feedback-form__consent {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    line-height: 1.45;
}
.feedback-form__consent input[type="checkbox"] {
    width: 1.1em;
    height: 1.1em;
    margin: 0.2rem 0 0;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--line-dark);
    accent-color: var(--brand);
}
.feedback-form textarea { min-height: 8rem; }
.feedback-form__hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.feedback-form__msg { padding: 0.75rem 1rem; border: 1px solid var(--line); }
.feedback-form__msg--ok { background: #f3f7f2; }
.feedback-form__msg--err { background: #fbf1f0; }

.cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: #1a1a1a;
    color: rgba(255, 255, 255, 0.86);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 1rem 0;
}
.cookie-banner[hidden] { display: none !important; }
.cookie-banner__inner {
    width: min(100% - 2.75rem, var(--container-wide, 1280px));
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}
.cookie-banner__text {
    font-size: 0.88rem;
    line-height: 1.5;
    max-width: 48rem;
}
.cookie-banner__text a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.cookie-banner__actions {
    display: flex;
    gap: 0.6rem;
    flex-shrink: 0;
}
.cookie-banner .btn--outline {
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff;
}
@media (max-width: 720px) {
    .cookie-banner__inner { flex-direction: column; align-items: stretch; }
    .cookie-banner__actions { justify-content: flex-end; }
}

@media (max-width: 400px) {
    .header.is-open .header__panel {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .shows-search input[type="search"] {
        min-width: 0;
        width: 100%;
    }
    .intickets-embed .h2 { font-size: 1.55rem; }
    body:not(:has(.kassa-page)) .intickets-embed .intickets-frame-wrapper iframe,
    body:not(:has(.kassa-page)) .intickets-embed .intickets-next-container-3,
    body:not(:has(.kassa-page)) .intickets-embed .intickets-next-container-3 iframe,
    body:not(:has(.kassa-page)) .intickets-embed .intickets-next-container-3 #intickets-frame,
    body:not(:has(.kassa-page)) .intickets-embed__frame {
        min-height: 520px !important;
        height: min(70vh, 640px) !important;
    }
    .cookie-banner__actions { justify-content: stretch; }
    .cookie-banner__actions .btn { flex: 1; }
    .feedback-form input[type="text"],
    .feedback-form input[type="email"],
    .feedback-form textarea {
        font-size: 16px;
    }
}
