:root {
    --color-loading-overlay: white;
    --fade-in-animation-duration: 0.2s;
    --gradient: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
}

html {
    font-size: 16px;
}

html[data-path="/"] {
    & header.cover {
        display: none !important;
    }
    & body > .wrapper > .container {
        margin-top: unset;
    }

    & .text-muted {
        color: black;
        text-align: center;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    justify-content: space-between;
    font-family: var(--font-primary);
    font-weight: 400;
    color: var(--color-font-primary) !important;
    background-color: transparent;
    padding: unset !important;
    font-size: inherit;

    & > tio-theme-provider {
        display: none;
    }

    & .modal {
        color: black;
    }

    &::before {
        display: block;
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        background-image: var(--background-url);
        background-repeat: no-repeat;
        background-size: cover;
        z-index: -1;
        background-position: 100% center;

        @media screen and (min-width: 768px) {
            background-position: center;
        }
    }

    --loading-transition: var(--fade-in-animation-duration) ease-in-out;

    &::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        height: 100dvh;
        width: 100dvw;
        z-index: 100;
        background-color: var(--color-loading-overlay);
        opacity: 1;
        transition: var(--loading-transition);
    }

    &.loaded::after,
    .loaded::before {
        opacity: 0;
        pointer-events: none;
    }

    &>.wrapper {
        background-color: transparent !important;
        margin: unset;

        /* & .footerpusher {
            display: none;
        } */

        & nav.navbar {
            display: none;
        }
    }

    & footer {
        background-color: transparent !important;
        color: black;

        & .container {
            margin-bottom: -50px;
            position: relative;
            z-index: 2;
        }

        & p,
        a {
            color: inherit !important;
        }

        &::after {
            content: "";
            background-image: url("./assets/trenner-1.webp");
            background-repeat: no-repeat;
            background-size: cover;
            background-position: center top;
            height: 200px;
            display: block;
            width: 100%;
            mix-blend-mode: color-dodge;
        }
    }

    & footer {
        background-color: transparent !important;
        font-size: 0.8rem;

        & p,
        a {
            color: inherit !important;
            font-family: inherit;
        }
    }

    & :is(.ticketType-group-navigation, .action-bar, .actionBar, .couponDiv, .container-purchasecomplete, .input-group-btn:last-child) :is(button, .btn, > .btn) {
        border-radius: 2rem !important;
        border: unset;
        padding: 0.25rem 2rem !important;
        background: white;
        color: black;
        border: 2px solid var(--color-primary);
        font-family: var(--font-secondary);
        transition: var(--transition-regular);
        line-height: unset !important;
        white-space: nowrap;

        &.active {
            background: var(--gradient);
            color: white;
            opacity: 1;
        }

        &:hover {
            border-color: var(--color-secondary);
            background: var(--gradient);
            color: white;
        }
    }
}

body:has(.container-purchasecomplete) {
    & header.cover {
        display: none;
    }

    & h2, h3, p {
        font-family: inherit !important;
    }

    & .address .list-eventinfos {
        color: inherit;
        font-family: inherit;
    }
}

a:hover {
    text-decoration: none;
}

#page2 {
    background-color: transparent !important;

    & .cover {
        display: none;
    }

    & table.config {
        & td {
            background-color: unset !important;
        }
    }

    &> :is(.container, .actionBar) {
        display: none;
    }
}

#page3 {
    background: transparent !important;
    color: inherit;

    & input, select {
        background-color: hsl(from var(--color-secondary) h s 90%) !important;
        color: black !important;
        border-color: var(--color-primary);
    }

    & .wrapper :is(h2,
        h3,
        small,
        label:is(.tio-form-label, .radio-inline),
        .radio,
        .checkbox,
        .checkbox label a,
        a) {
        color: inherit !important;
        font-family: unset !important;
        line-height: normal !important;
    }

    & .radio-inline, .tio-form-label, h2, h3, .radio, .checkbox {
        font-family: inherit !important;
    }

    & .customer-data-wrapper {
        background: transparent !important;
    }

    & .sumOfPurchase {
        & .help-block {
            color: inherit;
        }

        & table {
            & td {
                background: transparent !important;
            }

            & .ticketTypes small {
                display: none;
            }

            & .tio-fee td {
                font-family: inherit !important;
            }
        }
    }

    & .tioNotOrganizer {
        background: transparent !important;
        color: inherit !important;
        font-family: inherit;
    }

    & .insuranceDiv {
        & .highlight-card {
            color: black !important;
            border: 2px solid var(--color-secondary);

            & .highlight-card__title {
                background-color: var(--color-secondary);
            }
        }
    }

    & .actionBar {
        backdrop-filter: blur(10px);
        background-color: rgba(255, 255, 255, 0.1) !important;
        --border-style: 1px solid var(--color-font-primary);
        border-top: var(--border-style);
        border-bottom: var(--border-style);

        & a, button {
            background-color: var(--color-secondary) !important;
            color: var(--color-font-primary);
            line-height: unset !important;
        }
    }
}

#custom-shop {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 90%;
    margin: auto;

    & .logo {
        max-width: 100%;
        max-height: 200px;
        height: 25vh;
        object-fit: contain;

        &.secondary {
            height: unset;
            max-width: min(500px, 100%);
            margin: auto;
        }

        @media screen and (min-width: 768px) {
            height: unset;
        }
    }

    & .custom-ticket-overview {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        margin: auto;

        @media screen and (min-width: 768px) {
            width: 50%;
        }

        & .ticketType-title {
            display: block;
            text-align: center;
            font-family: var(--font-secondary);
            font-size: 1.25rem;
            line-height: 1.2;
        }

        & .ticketType-group-navigation {
            display: flex;
            gap: 1rem;
            place-content: center;
        }

        & table {
            display: flex;
            flex-direction: column;
            gap: 3rem;

            & .ticketTypes {
                opacity: 0;
                transform: var(--loading-offset);
                animation: fade-ticket-type-in var(--fade-in-animation-duration) ease-out forwards;
                animation-delay: calc(var(--index) * 0.1s);

                display: flex;
                flex-direction: column;
                gap: 0.5rem;
                align-items: center;

                /* @media screen and (min-width: 768px) {
                    display: grid;
                    grid-template-columns: repeat(3, 1fr);

                    & td {
                        &:first-child {
                            grid-column: 1 / -1;

                            & > p {
                                margin: unset;
                            }
                        }

                        &.td-count {
                            grid-column: 3;
                            justify-self: end;
                        }
                    }
                } */

                & small {
                    display: none;
                }

                & .ticketType-title ~ br {
                    display: none;
                }

                & .ticket-info-row {
                    display: none !important;

                    & ~ p {
                        display: none;
                    }
                }

                & .td-count {
                    font-size: unset;
                    width: fit-content;
                    & .visible-xs-block {
                        display: none !important;
                    }
                }

                & p.mobileBadgeSpace {
                    padding: unset;
                    margin: unset;
                }

                & .input-group {
                    display: inline-flex;
                    align-items: center;
                    place-content: center;
                    gap: 1rem;

                    /* background-color: rgba(0, 0, 0, 0.25); */
                    background-color: rgb(from var(--color-primary) r g b / 0.25);
                    padding: 0.5rem 1rem;
                    border-radius: 2rem;
                    width: 100%;

                    @media screen and (min-width: 768px) {
                        width: unset;
                    }

                    & .input-group-btn {
                        width: unset;
                        line-height: unset;
                    }

                    & button {
                        padding: unset !important;
                        border: unset !important;
                        line-height: 1 !important;
                        margin: unset;
                        background-color: unset;

                        &:hover {
                            background: unset !important;
                        }
                    }

                    & select {
                        box-shadow: unset !important;
                        border: unset;
                        width: unset;
                        height: unset;
                        padding: unset !important;
                        background-color: white !important;
                        border-radius: inherit !important;
                        width: 4rem;
                        text-align-last: center;
                    }

                    & .minus-wrapper {
                        padding: unset;
                    }
                }

                & .ticketType-description {
                    text-align: center;
                }

                & .ticketSinglePrice, .ticketTypeSum {
                    display: flex;
                    place-content: center;
                    gap: 1rem;
                    font: unset !important;

                    @media screen and (min-width: 768px) {
                        gap: 2rem;
                        justify-content: space-between;
                        margin-bottom: unset;
                    }
                }

                & .ticketSinglePrice .visible-xs-block {
                    display: none !important;
                }

                & .ticketTypeSum {
                    display: none !important;
                    font-family: var(--font-secondary);

                    &::before {
                        width: unset;
                        font-family: var(--font-primary);
                    }

                    &:has(.sr-only) {
                        display: none;
                    }
                }
            }
        }
    }

    & .action-bar {
        display: flex;
        flex-direction: column;
        place-content: center;
        gap: 0.5rem;

        & .btn {
            font-family: var(--font-secondary) !important;
            background: var(--gradient);
            color: white !important;
            transition: all var(--transition-regular);

            &:has(.empty) {
                opacity: 0.5;
                pointer-events: none;
                background: white;
                color: black !important;
            }

            & div {
                display: flex;
                gap: 1rem;
            }
        }

        &>* {
            margin: auto;
        }

        & #additional-cart-information {
            font-size: 0.8rem;
            text-align: center;
        }
    }
}

.details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    & details {
        border-radius: var(--border-radius-regular);

        @supports selector(::details-content) {
            &::details-content {
                margin-top: 0;
                block-size: 0;
                opacity: 0;
                transition: all 0.2s;
                transition-behavior: allow-discrete;
            }

            &[open]::details-content {
                margin-top: 1rem;
                block-size: auto;
                opacity: 1;
            }
        }

        @supports not selector(::details-content) {
            &[open] p {
                margin-top: 1rem;
            }
        }

        & summary,
        >div {
            --padding: 2rem;
            padding-left: var(--padding);
            padding-right: var(--padding);
        }

        &>div {
            padding-bottom: 1rem;

            &:has(.address)>.row {
                display: flex;
                flex-direction: column;
                gap: 2rem;

                &>div {
                    width: 100%;
                }
            }
        }

        &[open] summary span::before {
            rotate: 90deg;
        }

        & summary {
            --padding: 0;
            padding-top: var(--padding);
            padding-bottom: var(--padding);
            cursor: pointer;
            transition: opacity var(--transition-regular);
            font-size: 0.8rem;

            & span::before {
                content: var(--expand-marker);
                font-family: "Secondary";
                display: inline-flex;
                place-content: center;
                font-weight: 800;
                border-radius: 0;
                margin-right: 0.5rem;
                transition: rotate var(--transition-regular);
            }

            &:hover {
                opacity: 0.5;
            }
        }

        & summary::-webkit-details-marker {
            display: none;
        }

        &::marker {
            content: "";
            display: none;
        }

        & h3,
        h4 {
            font-size: 1rem !important;
            color: inherit !important;
            font-family: inherit !important;
        }
    }
}

@keyframes fade-ticket-type-in {
    from {
        opacity: 0;
        transform: var(--loading-offset);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.container-purchasecomplete {
    margin-top: unset !important;

    & .button-custom {
        margin: 2rem 0;
    }
}