/*
 * NMW Events – Pretix widget overrides
 *
 * Scoped to the NMW popup and loaded after Pretix's v2.css.
 */

.nmw-pretix-test {
    --nmw-pretix-green: #005b45;
    --nmw-pretix-green-dark: #005b45;
    --nmw-pretix-green-soft: #edf8f4;
    --nmw-pretix-green-border: #b9e1d7;
    --nmw-pretix-ink: #08202a;
    --nmw-pretix-muted: #60727d;
    --nmw-pretix-surface: #fff;
    color: var(--nmw-pretix-ink);
    font-family: "Segoe UI", Arial, sans-serif;
}

.nmw-pretix-test,
.nmw-pretix-test *,
.nmw-pretix-test *::before,
.nmw-pretix-test *::after {
    box-sizing: border-box;
}

.nmw-popup-scroll-content--pretix {
    align-items: stretch;
    gap: 0;
}

.nmw-pretix-popup-view {
    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
}

.nmw-popup-scroll-content--pretix .nmw-pretix-fallback {
    margin: 12px 0;
    padding: 18px;
    border: 2px solid var(--nmw-pretix-green-border, #b9e1d7);
    border-radius: 16px;
    background: #fff;
    color: var(--nmw-pretix-ink, #08202a);
    text-align: center;
}

/* Widget shell */

.nmw-pretix-test .pretix-widget-wrapper {
    width: 100%;
}

.nmw-pretix-test .pretix-widget {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--nmw-pretix-ink);
}

.nmw-pretix-test .pretix-widget-event-form,
.nmw-pretix-test .pretix-widget-event-form form {
    width: 100%;
}

/* Compact Pretix widget foundation */

.nmw-pretix-test .pretix-widget .pretix-widget-info-message {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    overflow: hidden;
    border: 1px solid rgba(0, 107, 80, 0.14);
    color: var(--nmw-pretix-ink);
    cursor: default;
}

.nmw-pretix-test .pretix-widget .pretix-widget-info-message > span {
    display: block;
    max-width: none;
    color: var(--nmw-pretix-ink);
}

.nmw-pretix-test .pretix-widget .pretix-widget-info-message > span::before {
    content: "Ihr Warenkorb ist aktiv";
    display: block;
    color: var(--nmw-pretix-green);
    font-weight: 700;
}

.nmw-pretix-test .pretix-widget .pretix-widget-resume-button {
    display: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-category {
    margin: 0;
}

.nmw-pretix-test .pretix-widget .pretix-widget-category-items {
    display: grid;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item {
    overflow: hidden;
    border: 1px solid rgba(8, 32, 42, 0.1);
    background: var(--nmw-pretix-surface);
}

.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-info-col,
.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-title-and-description {
    display: contents;
}

.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-title {
    display: block;
    margin: 0;
    color: var(--nmw-pretix-ink);
    font-weight: 700;
}

.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-description,
.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-meta {
    color: var(--nmw-pretix-muted);
    line-height: 1.45;
}

.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-price-col {
    float: none;
    color: var(--nmw-pretix-ink);
    font-weight: 700;
    line-height: 1.1;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-price-col > span:only-child {
    display: inline-block;
    white-space: nowrap;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-price-col > span:only-child::before {
    content: "0,00 €";
}

.nmw-pretix-test .pretix-widget .pretix-widget-pricebox-tax {
    color: var(--nmw-pretix-muted);
    font-weight: 400;
    line-height: 1.3;
}

.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-availability-col {
    float: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group {
    position: relative;
    z-index: 0;
    isolation: isolate;
    display: grid;
    align-items: center;
    overflow: visible;
    border: 1px solid #e2e8ea;
    background: #fff;
    box-shadow: 0 5px 15px rgba(8, 32, 42, 0.06);
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button {
    position: relative;
    z-index: 2 !important;
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    background: var(--nmw-pretix-green-soft);
    color: var(--nmw-pretix-green);
    line-height: 1;
    box-shadow: none;
    transform: none;
    transition: color 160ms ease, background-color 160ms ease;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button:hover {
    border-color: transparent;
    background: #d9f0e9;
    color: var(--nmw-pretix-green-dark);
    transform: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button:active,
.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button:focus,
.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button:focus-visible {
    z-index: 10 !important;
    transform: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button:focus-visible {
    outline: 3px solid rgba(0, 119, 87, 0.25);
    outline-offset: 2px;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group button span {
    display: block;
    line-height: 1;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group input,
.nmw-pretix-test .pretix-widget .pretix-widget-item-count-multiple {
    position: relative;
    z-index: 1 !important;
    width: 100%;
    margin: 0;
    padding: 0 4px;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: var(--nmw-pretix-ink);
    font: inherit;
    font-weight: 700;
    text-align: center;
    box-shadow: none;
    appearance: textfield;
}

.nmw-pretix-test .pretix-widget .pretix-widget-item-count-group input:focus {
    outline: 0;
    box-shadow: inset 0 -2px var(--nmw-pretix-green);
}

.nmw-pretix-test .pretix-widget .pretix-widget-main-item-row > .pretix-widget-clear {
    display: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-action {
    display: flex;
    flex-direction: column;
}

.nmw-pretix-test .pretix-widget .pretix-widget-action button {
    margin: 0;
    border: 0;
    color: #fff;
    font-weight: 650;
    line-height: 1.15;
    transform: none;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.nmw-pretix-test .pretix-widget .pretix-widget-action button::after {
    content: "  →";
}

.nmw-pretix-test .pretix-widget .pretix-widget-action button:hover,
.nmw-pretix-test .pretix-widget .pretix-widget-action button:active,
.nmw-pretix-test .pretix-widget .pretix-widget-action button:focus {
    transform: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-action button:focus-visible {
    outline: 3px solid rgba(0, 119, 87, 0.35);
    outline-offset: 3px;
}

.nmw-pretix-test .pretix-widget .pretix-widget-attribution {
    display: none;
}

.nmw-pretix-test .pretix-widget .pretix-widget-loading {
    z-index: 10;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.nmw-pretix-test .pretix-widget .pretix-widget-error-message {
    margin: 0 0 18px;
    padding: 14px 16px;
    border: 1px solid rgba(233, 0, 18, 0.45);
    border-radius: 14px;
    background: #fff5f6;
    color: #a6000d;
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    .nmw-pretix-test .pretix-widget *,
    .nmw-pretix-test .pretix-widget *::before,
    .nmw-pretix-test .pretix-widget *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* --------------------------------------------------------------------------
 * Ticket purchase choice: online via Pretix or at a local sales point
 * ----------------------------------------------------------------------- */

.nmw-popup-content.nmw-popup-content--pretix {
    max-width: 1160px;
}

.nmw-popup.nmw-popup--pretix {
    overflow: hidden;
    overscroll-behavior: none;
}

.nmw-popup.nmw-popup--pretix .nmw-popup-scroll-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

.nmw-popup-content--pretix #nmw-popup-inner {
    gap: 0;
}

.nmw-pretix-back {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    margin: 0 0 3px;
    padding: 5px 10px;
    border: 1px solid rgba(0, 107, 80, 0.22);
    border-radius: 999px;
    background: #fff;
    background-image: none;
    color: var(--nmw-pretix-green-dark, #005b45);
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}

.nmw-popup-heading-copy > .nmw-pretix-back {
    flex: 0 0 auto;
}

.nmw-pretix-back:hover,
.nmw-pretix-back:focus-visible {
    border-color: var(--nmw-pretix-green, #005b45);
    background: var(--nmw-pretix-green-soft, #eef8f5);
    color: var(--nmw-pretix-green-dark, #005b45);
}

.nmw-pretix-back .material-symbols-rounded {
    font-size: 18px;
    line-height: 1;
}

@media (min-width: 577px) {
    .nmw-popup.nmw-popup--pretix {
        padding: 20px;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-content {
        height: calc(100dvh - 40px);
        max-height: calc(100dvh - 40px);
    }

    .nmw-popup.nmw-popup--pretix #nmw-popup-inner {
        height: 100%;
        min-height: 0;
    }
}

.nmw-popup-content--pretix #nmw-popup-inner,
.nmw-popup-content--pretix .nmw-popup-scroll-content--pretix {
    align-items: stretch;
}

.nmw-popup.nmw-popup--pretix .nmw-popup-title {
    display: none;
}

.nmw-pretix-popup-view {
    --nmw-ticket-green: #005b45;
    --nmw-ticket-green-dark: #005b45;
    --nmw-ticket-green-soft: #eef8f5;
    --nmw-ticket-line: #dbe7e3;
    --nmw-ticket-ink: #09232a;
    gap: 18px;
    color: var(--nmw-ticket-ink);
    font-family: "Segoe UI", Arial, sans-serif;
}

.nmw-pretix-popup-before {
    width: 100%;
}

.nmw-ticket-choice-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
}

.nmw-ticket-choice-grid--online-only,
.nmw-ticket-choice-grid--offline-only {
    grid-template-columns: minmax(0, 1fr);
}

.nmw-ticket-choice-or[hidden],
.nmw-ticket-choice-card--offline[hidden] {
    display: none !important;
}

.nmw-ticket-choice-card {
    position: relative;
    min-width: 0;
    padding: 19px;
    border: 1px solid rgba(9, 35, 42, 0.08);
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 14px 38px rgba(9, 35, 42, 0.1);
}

.nmw-ticket-choice-card--offline {
    background: #f4faf7;
}

.nmw-ticket-choice-header {
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 20px;
    align-items: center;
}

.nmw-ticket-choice-icon {
    display: flex;
    width: 66px;
    height: 66px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--nmw-ticket-green);
    box-shadow: 0 8px 22px rgba(0, 107, 80, 0.22);
    color: #fff;
    font-size: 50px;
}

.nmw-ticket-choice-icon.material-symbols-rounded,
.nmw-ticket-shop-icon.material-symbols-rounded,
.nmw-ticket-secure-icon.material-symbols-rounded {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    padding: 0;
    font-family: "Material Symbols Rounded" !important;
    font-style: normal;
    font-weight: 400;
    font-feature-settings: "liga";
    line-height: 1;
    text-align: center;
}

.nmw-ticket-choice-title,
.nmw-ticket-choice-description,
.nmw-ticket-shop-title,
.nmw-ticket-shop-address {
    display: block;
    margin: 0;
    font-family: inherit;
}

.nmw-ticket-choice-title {
    color: var(--nmw-ticket-green-dark);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: 0.01em;
}

.nmw-ticket-choice-description {
    margin-top: 6px;
    color: var(--nmw-ticket-ink);
    font-size: 16px;
    line-height: 1.45;
}

.nmw-ticket-choice-divider {
    display: grid;
    grid-template-columns: minmax(20px, 1fr) auto minmax(20px, 1fr);
    gap: 14px;
    align-items: center;
    margin: 25px 0 19px;
    color: var(--nmw-ticket-green-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-align: center;
    text-transform: uppercase;
}

.nmw-ticket-choice-divider::before,
.nmw-ticket-choice-divider::after {
    content: "";
    height: 1px;
    background: rgba(0, 76, 57, 0.25);
}

.nmw-ticket-choice-or {
    position: relative;
    display: grid;
    place-items: center;
    min-width: 0;
}

.nmw-ticket-choice-or::before {
    content: "";
    position: absolute;
    top: 12%;
    bottom: 12%;
    left: 50%;
    width: 1px;
    background: rgba(0, 107, 80, 0.18);
}

.nmw-ticket-choice-or span {
    position: relative;
    z-index: 1;
    display: grid;
    width: 64px;
    height: 64px;
    place-items: center;
    border: 5px solid rgba(255, 255, 255, 0.92);
    border-radius: 50%;
    background: var(--nmw-ticket-green);
    box-shadow: 0 8px 22px rgba(0, 76, 57, 0.22);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* Compact Pretix product presentation inside the online choice card. */

.nmw-pretix-online-card {
    padding-top: 0 !important;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-info-message {
    min-height: 0;
    margin: 0 0 12px;
    padding: 10px 12px;
    border-width: 1px;
    border-radius: 16px;
    background: var(--nmw-ticket-green-soft);
    box-shadow: none;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-info-message > span {
    font-size: 11px;
    line-height: 1.35;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-info-message > span::before {
    margin-bottom: 2px;
    font-size: 14px;
    line-height: 1.2;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-category-name {
    display: none;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-category-items {
    gap: 14px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-item {
    border-radius: 18px;
    box-shadow: 0 7px 22px rgba(9, 35, 42, 0.09);
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(115px, 40%);
    grid-template-rows: auto auto auto;
    gap: 10px 15px;
    min-height: 0;
    padding: 18px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-item-picture-link {
    display: none;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-title {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    padding: 0;
    border: 0;
    font-size: 20px;
    line-height: 1.2;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-description,
.nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    font-size: 13px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-price-col,
.nmw-pretix-online-card .pretix-widget.pretix-widget-mobile .pretix-widget-item-price-col {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    width: auto;
    min-width: 0;
    padding: 0;
    font-size: 24px;
    text-align: right;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-pricebox-tax {
    margin-top: 4px;
    font-size: 12px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-availability-col,
.nmw-pretix-online-card .pretix-widget.pretix-widget-mobile .pretix-widget-item-availability-col {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: center;
    width: min(100%, 250px);
    min-width: 0;
    padding: 3px 0 0;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-group {
    grid-template-columns: 44px minmax(56px, 1fr) 44px;
    min-height: 46px;
    padding: 4px;
    border-width: 1px;
    border-radius: 14px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-group button,
.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-group input,
.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-multiple {
    height: 36px;
    line-height: 36px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-group button {
    border-radius: 10px;
    font-size: 23px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-group input,
.nmw-pretix-online-card .pretix-widget .pretix-widget-item-count-multiple {
    font-size: 20px;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-action,
.nmw-pretix-online-card .pretix-widget.pretix-widget-mobile .pretix-widget-action {
    position: static;
    align-items: stretch;
    width: 100%;
    margin: 14px 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-action button {
    width: 100%;
    min-height: 48px;
    padding: 9px 16px;
    border-radius: 15px;
    background: #e3000f;
    background-image: none;
    box-shadow: 0 8px 20px rgba(227, 0, 15, 0.2);
    font-size: 19px;
    text-transform: uppercase;
}

.nmw-pretix-online-card .pretix-widget .pretix-widget-action button:hover {
    background: #bd000d;
    background-image: none;
    box-shadow: 0 10px 25px rgba(227, 0, 15, 0.27);
}

.nmw-pretix-popup-view button,
.nmw-pretix-popup-view [type="button"],
.nmw-pretix-popup-view [type="submit"] {
    background-image: none !important;
}

.nmw-ticket-secure {
    display: flex;
    min-height: 0;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 8px;
    padding: 6px 10px;
    border: 1px solid rgba(0, 107, 80, 0.22);
    border-radius: 14px;
    background: var(--nmw-ticket-green-soft);
    color: var(--nmw-ticket-green-dark);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.nmw-ticket-secure-icon {
    font-size: 9px;
}

/* Local sales points. */

.nmw-ticket-shops {
    overflow: hidden;
    border: 1px solid rgba(0, 76, 57, 0.1);
    border-radius: 17px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 7px 22px rgba(9, 35, 42, 0.07);
}

.nmw-ticket-shop {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    min-height: 100px;
    padding: 15px;
}

.nmw-ticket-shop + .nmw-ticket-shop {
    border-top: 1px solid var(--nmw-ticket-line);
}

.nmw-ticket-shop-icon {
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 107, 80, 0.12);
    border-radius: 50%;
    background: var(--nmw-ticket-green-soft);
    color: var(--nmw-ticket-green);
    font-size: 27px;
}

.nmw-ticket-shop-copy {
    min-width: 0;
}

.nmw-ticket-shop-title {
    color: var(--nmw-ticket-green-dark);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.nmw-ticket-shop-address {
    margin-top: 5px;
    color: var(--nmw-ticket-ink);
    font-size: 12px;
    line-height: 1.4;
    white-space: pre-line;
}

.nmw-ticket-shop-phone,
.nmw-ticket-shop-location {
    display: inline-flex;
    min-height: 34px;
    padding: 6px 11px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--nmw-ticket-green);
    box-shadow: 0 4px 12px rgba(0, 91, 69, 0.18);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
    justify-self: end;
    transition: background-color 160ms ease, transform 160ms ease;
}

.nmw-ticket-shop-location {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.nmw-ticket-shop-location .material-symbols-rounded {
    color: #fff;
    font-size: 20px;
}

.nmw-ticket-shop-phone:hover,
.nmw-ticket-shop-phone:focus-visible,
.nmw-ticket-shop-location:hover,
.nmw-ticket-shop-location:focus-visible {
    background: #e3000f;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    outline: none;
}

@media (max-width: 900px) {
    .nmw-ticket-choice-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .nmw-ticket-choice-or {
        min-height: 72px;
    }

    .nmw-ticket-choice-or::before {
        top: 50%;
        right: 10%;
        bottom: auto;
        left: 10%;
        width: auto;
        height: 1px;
    }

    .nmw-ticket-choice-or span {
        width: 58px;
        height: 58px;
    }

}

@media (max-width: 576px) {
    .nmw-popup.nmw-popup--pretix .nmw-popup-snap-start {
        height: 100dvh;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-snap-point--expanded {
        top: 95dvh;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-content {
        height: 95dvh;
        min-height: 95dvh;
        max-height: 95dvh;
        padding-bottom: 0;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-header {
        padding-top: 5px;
        padding-bottom: 10px;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-scroll-content {
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: max(4px, env(safe-area-inset-bottom));
    }

    .nmw-popup.nmw-popup--transitioning {
        scroll-snap-type: none;
    }

    .nmw-popup-content.nmw-popup-content--pretix {
        width: 100%;
        max-width: none;
    }

    .nmw-pretix-popup-view {
        gap: 13px;
    }

    .nmw-ticket-choice-card {
        padding: 12px;
        border-radius: 21px;
    }

    .nmw-ticket-choice-header {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 13px;
    }

    .nmw-ticket-choice-icon {
        width: 54px;
        height: 54px;
        font-size: 42px;
    }

    .nmw-ticket-choice-title {
        font-size: 20px;
    }

    .nmw-ticket-choice-description {
        margin-top: 4px;
        font-size: 13px;
    }

    .nmw-ticket-choice-divider {
        gap: 9px;
        margin: 19px 0 14px;
        font-size: 11px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row {
        grid-template-columns: minmax(0, 1fr) minmax(94px, 38%);
        gap: 9px;
        padding: 14px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-title {
        font-size: 17px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-price-col,
    .nmw-pretix-online-card .pretix-widget.pretix-widget-mobile .pretix-widget-item-price-col {
        font-size: 19px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-action button {
        min-height: 46px;
        padding: 8px 14px;
        font-size: 16px;
    }

    .nmw-ticket-shop {
        grid-template-columns: 42px minmax(0, 1fr) minmax(70px, max-content);
        gap: 10px;
        min-height: 88px;
        padding: 12px;
    }

    .nmw-ticket-shop-icon {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .nmw-ticket-shop-title {
        font-size: 13px;
    }

    .nmw-ticket-shop-address {
        font-size: 10px;
    }

}

@media (max-width: 390px) {
    .nmw-ticket-shop {
        grid-template-columns: 38px minmax(0, 1fr) minmax(68px, max-content);
        gap: 8px;
    }

}

/* Pretix innerhalb des schmalen Desktop-Seitenpanels. Die Desktop-Viewport-
   Breite ist groß, der tatsächlich verfügbare Container aber handybreit. */
@media (min-width: 901px) {
    .nmw-popup.nmw-popup--pretix {
        padding: 0 0 0 10px;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-content,
    .nmw-popup-content.nmw-popup-content--pretix {
        width: 100%;
        max-width: none;
        height: 100%;
        min-height: 0;
        max-height: none;
    }

    .nmw-popup.nmw-popup--pretix #nmw-popup-inner {
        height: 100%;
        min-height: 0;
    }

    .nmw-popup.nmw-popup--pretix .nmw-popup-scroll-content {
        overflow-x: clip;
        overflow-y: auto;
    }

    .nmw-pretix-popup-view {
        gap: 13px;
    }

    .nmw-ticket-choice-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .nmw-ticket-choice-or {
        min-height: 66px;
    }

    .nmw-ticket-choice-or::before {
        top: 50%;
        right: 10%;
        bottom: auto;
        left: 10%;
        width: auto;
        height: 1px;
    }

    .nmw-ticket-choice-or span {
        width: 54px;
        height: 54px;
    }

    .nmw-ticket-choice-card {
        padding: 13px;
        border-radius: 21px;
    }

    .nmw-ticket-choice-header {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 13px;
    }

    .nmw-ticket-choice-icon {
        width: 54px;
        height: 54px;
        font-size: 41px;
    }

    .nmw-ticket-choice-title {
        font-size: 20px;
    }

    .nmw-ticket-choice-description {
        margin-top: 4px;
        font-size: 13px;
    }

    .nmw-ticket-choice-divider {
        gap: 9px;
        margin: 18px 0 13px;
        font-size: 11px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row {
        grid-template-columns: minmax(0, 1fr) minmax(94px, 38%);
        gap: 9px;
        padding: 14px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row .pretix-widget-item-title {
        font-size: 17px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-main-item-row > .pretix-widget-item-price-col,
    .nmw-pretix-online-card .pretix-widget.pretix-widget-mobile .pretix-widget-item-price-col {
        font-size: 19px;
    }

    .nmw-pretix-online-card .pretix-widget .pretix-widget-action button {
        min-height: 46px;
        padding: 8px 14px;
        font-size: 16px;
    }

    .nmw-ticket-shop {
        grid-template-columns: 42px minmax(0, 1fr) minmax(70px, max-content);
        gap: 10px;
        min-height: 88px;
        padding: 12px;
    }

    .nmw-ticket-shop-icon {
        width: 42px;
        height: 42px;
        font-size: 23px;
    }

    .nmw-ticket-shop-title {
        font-size: 13px;
    }

    .nmw-ticket-shop-address {
        font-size: 10px;
    }
}

/* --------------------------------------------------------------------------
 * Pretix-Checkout im vorhandenen NMW-Popup
 *
 * Pretix selbst bleibt unveraendert im Cross-Origin-iframe. Nur sein aeusserer
 * Dialog folgt Position, Groesse und Rundungen der aktuellen Popup-Ansicht.
 * Die !important-Angaben sind notwendig, weil Pretix seine Widget-CSS je nach
 * Veranstaltung dynamisch nach diesem Stylesheet laden kann.
 * ----------------------------------------------------------------------- */

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame {
    --nmw-pretix-checkout-header-height: 46px;
    position: fixed !important;
    inset: auto !important;
    top: var(--nmw-pretix-checkout-top, 0) !important;
    left: var(--nmw-pretix-checkout-left, 0) !important;
    width: var(--nmw-pretix-checkout-width, 100vw) !important;
    min-width: 0 !important;
    max-width: none !important;
    height: var(--nmw-pretix-checkout-height, 100dvh) !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
    border-radius: var(--nmw-pretix-checkout-radius, 18px) !important;
    outline: 0 !important;
    background: #005b45 !important;
    box-shadow: -12px 0 32px rgba(0, 38, 29, .2) !important;
    box-sizing: border-box !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame::backdrop {
    background: transparent !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-inner {
    position: absolute !important;
    inset: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    padding: var(--nmw-pretix-checkout-header-height) 0 0 !important;
    overflow: hidden !important;
    border-radius: inherit !important;
    background: #005b45 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-inner iframe {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    margin: 0 !important;
    border: 0 !important;
    background: #fff !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-close {
    top: 8px !important;
    right: 10px !important;
    z-index: 3 !important;
    transform: none !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-close button {
    display: grid !important;
    width: 30px !important;
    height: 30px !important;
    padding: 7px !important;
    place-items: center !important;
    border: 1px solid rgba(255, 255, 255, .75) !important;
    border-radius: 50% !important;
    background: #fff !important;
    box-shadow: 0 3px 10px rgba(0, 38, 29, .18) !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-close button path {
    fill: #005b45 !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-close button:focus-visible {
    outline: 2px solid #fff !important;
    outline-offset: 2px !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-loading {
    position: absolute !important;
    inset: var(--nmw-pretix-checkout-header-height) 0 0 !important;
    width: auto !important;
    height: auto !important;
    overflow: hidden !important;
    border-radius: inherit !important;
    background: #fff !important;
}

dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-loading svg {
    display: block !important;
    width: min(38vw, 150px) !important;
    height: min(38vw, 150px) !important;
    margin: clamp(28px, 10vh, 72px) auto 24px !important;
}

@media (max-width: 576px) {
    dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame {
        --nmw-pretix-checkout-header-height: 42px;
        box-shadow: 0 -12px 32px rgba(0, 38, 29, .2) !important;
    }

    dialog.pretix-widget-frame-holder.nmw-pretix-checkout-frame .pretix-widget-frame-close {
        top: 6px !important;
        right: 12px !important;
    }
}
