@import url("../../shared/assets/styles/reset.css");

@font-face {
    font-family: "Montserrat";
    src: url("../../shared/assets/fonts/Montserrat-Thin.ttf") format("truetype");
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../../shared/assets/fonts/Montserrat-ExtraLight.ttf") format("truetype");
    font-weight: 200;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../../shared/assets/fonts/Montserrat-Light.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../../shared/assets/fonts/Montserrat-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../../shared/assets/fonts/Montserrat-SemiBold.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Montserrat";
    src: url("../../shared/assets/fonts/Montserrat-Bold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

:root {
    --font-primary: "Montserrat";
    --color-yellow: #e4a24a;
    --color-brown: #a89e92;
    --color-brown-dark: #1b1815;
    --color-light: white;
    --color-yellow-dimmed: rgba(from var(--color-yellow) r g b / 0.2);
    --border-radius-s: 0.2rem;
    --border-radius-m: 1rem;
    --border-radius-l: 1.5rem;
    --transition-regular: 0.1s ease-in-out;
    --box-shadow-regular: 0px 0px 10px 2px rgba(0,0,0,0.025);
}

body {
    color: white;
    background-color: var(--color-brown-dark);

    & > footer {
        font-size: 0.8rem;
    }

    & .modal-body .bootbox-body {
        color: var(--color-brown-dark);
    }
}

/* Icons standardmäßig unsichtbar halten */
.material-symbols-outlined {
    visibility: hidden;
}

/* Sichtbar schalten, sobald die Klasse gesetzt wird */
.fonts-loaded .material-symbols-outlined {
    visibility: visible;
}

ul.unset {
    list-style-type: none;
    padding: unset;
}

[disabled] {
    cursor: not-allowed !important;
    opacity: 0.2;
}

#custom-shop {
    display: flex;
    height: 100dvh;
    width: 100dvw;
    position: relative;
    overflow: hidden;

    & .foreground {
        width: min(1000px, 90vw);
        max-height: 90%;
        overflow: hidden;
        margin: auto;
    }

    &[data-view="event-overview"] {
        place-content: center;
        align-items: center;

        & .foreground {
            display: flex;
            flex-direction: column;
            gap: 2rem;
            overflow-y: scroll;
            scrollbar-width: none;

            & img {
                height: 8rem;
                object-fit: contain;
            }

            & h1 {
                margin: unset;
                font-size: 2rem;
            }

            & #eventoverview .container {
                margin: unset;
                padding: unset;
                color: inherit;
                width: unset;

                & .fc-view {
                    border-radius: var(--border-radius-m);
                    border: 1px solid var(--color-light);
                    overflow: hidden;
                }

                & .fc-day-header, .fc-day-header * {
                    font-size: 1rem;
                    font-weight: bold;
                }

                & .fc-unthemed .fc-content, .fc-unthemed .fc-divider, .fc-unthemed .fc-list-heading td, .fc-unthemed .fc-list-view, .fc-unthemed .fc-popover, .fc-unthemed .fc-row, .fc-unthemed tbody, .fc-unthemed td, .fc-unthemed th, .fc-unthemed thead {
                    border-color: var(--color-brown) !important;
                }

                & .fc-toolbar {
                    display: grid;
                    grid-template-columns: auto 1fr;
                    gap: 2rem;
                    align-items: center;

                    & .fc-clear {
                        display: none;
                        clear: unset;
                    }

                    & .fc-left {
                        grid-column: 1;
                    }

                    & .fc-center {
                        grid-column: 2;
                    }

                    & .fc-right {
                        display: none;
                    }

                    & h2 {
                        color: inherit;
                        margin: unset;
                    }

                    & .fc-button-group {
                        display: flex;
                        flex-direction: row;
                        gap: 1rem;

                        & button {
                            margin: unset;
                            text-shadow: unset;
                            color: inherit;
                            line-height: 1;

                            &.fc-state-active {
                                border: unset;
                                background-color: var(--color-yellow);
                                border-radius: var(--border-radius-m);
                                padding: 0.5rem 1rem;
                            }
                        }
                    }

                }

                & table {
                    & .fc-row {
                        display: flex;
                        align-items: center;
                    }

                    & .fc-content-skeleton {
                        padding: unset;
                        height: 100%;
                        display: flex;
                        align-items: center;

                        & thead {
                            display: none;
                        }

                        & .fc-event-container a {
                            display: none;
                        }
                    }
                    & td {
                        &[style*="background-color:"] {
                            background-color: unset !important;
                        }

                        &.fc-event-container {
                            &::after {
                                content: "";
                            }
                        }

                        &[data-day] {
                            &::after {
                                display: flex;
                                place-content: center;
                                align-items: center;
                                width: 2.5rem;
                                aspect-ratio: 1;
                                content: attr(data-day) ".";
                                border-radius: 50%;
                                background-color: var(--color-yellow);
                                margin: auto;
                            }
                            &:not(.fc-event-container)::after {
                                background-color: var(--color-yellow-dimmed);
                                cursor: not-allowed;
                            }
                            &.fc-event-container {
                                cursor: pointer;
                                transition: opacity var(--transition-regular);

                                &:hover {
                                    opacity: 0.5;
                                }
                            }
                        }
                    }
                }
            }
        }
    }

    &[data-view="event-details"] {
        & .foreground {
            display: grid;
            grid-template-rows: 1fr auto;
            gap: 1rem;

            @media screen and (min-width: 768px) {
                grid-template-rows: minmax(0, 1fr) auto;
                height: 90%;
                max-height: 900px;
            }

            & #slides {
                height: 100%;
                width: 100%;
                position: relative;
                overflow-y: auto;

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

                & .slide {
                    width: 100%;

                    &:not(.active) {
                        display: none !important;
                    }

                    @media screen and (min-width: 768px) {
                        position: absolute;
                        top: 0;
                        left: 0;
                        height: 100%;

                        &:not(.active) {
                            display: block !important;
                            opacity: 0;
                            pointer-events: none;
                        }
                    }
                }

                & > #tickets {
                    display: grid;
                    grid-template-rows: auto auto;
                    gap: 2rem;

                    @media screen and (min-width: 768px) {
                        grid-template-rows: auto minmax(0, 1fr);
                    }
                    /* padding: 2rem;
                    border-radius: var(--border-radius-m);
                    backdrop-filter: blur(20px);
                    background-color: rgba(from var(--color-brown-dark) r g b / 0.2); */

                    & .information {
                        padding: 1rem;
                        border-radius: var(--border-radius-m);
                        background-color: var(--color-brown);
                        font-size: 0.8rem;
                        margin: unset;
                    }

                    &>header {
                        display: grid;
                        grid-template-rows: 20vh auto auto;
                        gap: 1rem;
                        position: relative;
                        border-bottom: 2px solid var(--color-brown);
                        padding-bottom: 2rem;

                        & .event-name {
                            font-size: 1rem;
                            margin: unset;
                            grid-row: 2;
                        }

                        & .event-meta {
                            display: grid;
                            grid-template-columns: auto 1fr;
                            gap: 0.5rem 2rem;
                            font-size: 0.8rem;
                            grid-row: 3;

                            &>* {
                                display: flex;
                                flex-direction: row;
                                gap: 1rem;
                                align-items: center;
                            }

                            & .location {
                                grid-column: 1 / -1;
                                grid-row: 1;
                            }
                        }

                        & .event-image {
                            position: absolute;
                            height: 20vh;
                            width: 100%;
                            object-fit: cover;
                            border-radius: var(--border-radius-m);
                            opacity: 0;
                            transition: opacity var(--transition-regular);
                            grid-row: 1;

                            &.active {
                                opacity: 1;
                            }
                        }

                        @media screen and (min-width: 768px) {
                            grid-template-columns: repeat(2, 1fr);
                            grid-template-rows: repeat(2, auto);
                            align-items: center;
                            gap: 2rem;

                            & .event-image {
                                grid-column: 2;
                                grid-row: 1 / -1;
                                height: 100%;
                            }

                            & .event-name {
                                grid-column: 1;
                                grid-row: 1;
                                font-size: 2rem;
                                margin-top: 2rem;
                            }

                            & .event-meta {
                                grid-column: 1;
                                grid-row: 2;
                            }
                        }
                    }

                    &>main {
                        display: flex;
                        flex-direction: column;

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

                        &>#tab-toggles {
                            flex-shrink: 0;
                            display: flex;
                            flex-direction: row;
                            gap: 1rem;
                            margin-bottom: 2rem;

                            & .tab-toggle {
                                border-radius: var(--border-radius-l);
                                padding: 0.5rem 2rem;
                                font-size: 0.8rem;
                                font-weight: bold;
                                cursor: pointer;
                                transition: all var(--transition-regular);

                                &:hover {
                                    opacity: 0.5;
                                }

                                &.active {
                                    background-color: var(--color-yellow);
                                }
                            }
                        }

                        &>#tabs {
                            position: relative;

                            @media screen and (min-width: 768px) {
                                flex: 1 1 0;
                                min-height: 0;
                                overflow: hidden;
                            }

                            & .tab {
                                &:not(.active) {
                                    display: none !important;
                                }

                                @media screen and (min-width: 768px) {
                                    position: absolute;
                                    top: 0;
                                    left: 0;
                                    height: 100%;
                                    width: 100%;
                                    overflow-y: scroll;
                                    scrollbar-width: none;
                                    transition: opacity var(--transition-regular);

                                    &:not(.active) {
                                        display: block !important;
                                        opacity: 0;
                                        pointer-events: none;
                                    }
                                }
                            }

                            & .tab[data-tab-identifier="buy-tickets"] {
                                display: flex;
                                flex-direction: column;
                                gap: 2rem;
                                counter-reset: indicator;

                                & .section-heading {
                                    display: flex;
                                    flex-direction: row;
                                    gap: 1rem;
                                    margin-bottom: 1rem;

                                    & .indicator {
                                        display: flex;
                                        align-items: center;
                                        place-content: center;
                                        height: 2rem;
                                        aspect-ratio: 1;
                                        background-color: var(--color-yellow);
                                        border-radius: 50%;
                                        font-weight: bold;
                                        color: black;

                                        &:not(.hidden) {
                                            counter-increment: indicator;

                                            &::before {
                                                content: counter(indicator) ".";
                                            }
                                        }
                                    }

                                    & .title {
                                        font-weight: bold;
                                    }
                                }

                                & #categories {
                                    & ul {
                                        display: flex;
                                        flex-direction: column;
                                        gap: 1rem;

                                        @media screen and (min-width: 768px) {
                                            display: grid;
                                            grid-auto-flow: column;
                                            grid-auto-columns: 1fr;
                                        }

                                        & .category {
                                            display: grid;
                                            grid-template-columns: auto 1fr;
                                            grid-template-rows: repeat(3, auto);
                                            gap: 0.5rem 1rem;
                                            border: 2px solid var(--color-brown);
                                            border-radius: var(--border-radius-m);
                                            padding: 1rem;
                                            cursor: pointer;
                                            transition: opacity var(--transition-regular);

                                            &:hover {
                                                opacity: 0.5;
                                            }

                                            &.active {
                                                background-color: var(--color-yellow-dimmed);
                                                border-color: var(--color-yellow);
                                            }

                                            & .icon {
                                                grid-column: 1;
                                                grid-row: 1;
                                            }

                                            & .title,
                                            .description,
                                            .price {
                                                grid-column: 2;
                                            }

                                            & .title {
                                                grid-row: 1;
                                                font-weight: bold;
                                                font-size: 1.2rem;
                                            }

                                            & .description {
                                                grid-row: 2;
                                                font-size: 0.8rem;
                                            }

                                            & .price {
                                                grid-row: 3;
                                                color: var(--color-yellow);
                                                font-weight: bold;
                                            }
                                        }
                                    }
                                }

                                & #timeslots {
                                    & ul {
                                        display: grid;
                                        grid-template-columns: repeat(2, 1fr);
                                        gap: 0.5rem;

                                        @media screen and (min-width: 768px) {
                                            display: flex;
                                            flex-direction: row;
                                            flex-wrap: wrap;
                                            grid-template-columns: unset;
                                        }

                                        & .timeslot {
                                            padding: 0.25rem 1rem;
                                            border-radius: var(--border-radius-m);
                                            border: 2px solid var(--color-brown);
                                            cursor: pointer;
                                            transition: all var(--transition-regular);
                                            text-align: center;

                                            @media screen and (min-width: 768px) {
                                                padding: 0.25rem 3rem;
                                            }

                                            &:not(.outdated):hover {
                                                opacity: 0.5;
                                            }

                                            &.active {
                                                border-color: var(--color-yellow);
                                                background-color: var(--color-yellow-dimmed);
                                            }
                                        }
                                    }
                                }

                                & #tickets {
                                    &>ul {
                                        display: flex;
                                        flex-direction: column;
                                        padding: 1rem 2rem;
                                        background-color: var(--color-yellow);
                                        color: var(--color-brown-dark);
                                        border-radius: var(--border-radius-m);

                                        @media screen and (min-width: 768px) {
                                            display: grid;
                                            grid-template-columns: 1fr auto auto;
                                            grid-template-rows: repeat(2, auto);
                                            gap: 0 2rem;
                                        }

                                        &>li.ticket-type {
                                            display: grid;
                                            grid-template-rows: repeat(4, auto);
                                            grid-template-columns: 1fr auto;
                                            align-items: center;
                                            gap: 0.5rem;

                                            @media screen and (min-width: 768px) {
                                                display: grid;
                                                grid-template-columns: subgrid;
                                                grid-template-rows: repeat(3, auto);
                                                grid-column: 1 / -1;
                                                align-items: start;
                                                gap: 1rem;

                                                &:not(:has(.ticketType-description)) {
                                                    grid-template-rows: repeat(2, auto);
                                                }
                                            }

                                            &:not(.hidden):has(~ :not(.hidden))::after  {
                                                content: "";
                                                display: block;
                                                grid-column: 1 / -1;
                                                grid-row: 4;
                                                height: 1px;
                                                width: 100%;
                                                background-color: var(--color-light);
                                                margin: 1rem 0;
                                            }

                                            &.upselling-origin.upselling-visible::after {
                                                background-color: transparent;
                                            }

                                            & .name {
                                                display: flex;
                                                font-weight: bold;
                                                grid-column: 1 / -1;
                                                grid-row: 1;

                                                & .material-symbols-outlined {
                                                    margin-right: 1rem;
                                                }
                                            }

                                            & .price {
                                                grid-column: 1;
                                                grid-row: 3;
                                            }

                                            & .ticket-amount-input {
                                                display: flex;
                                                flex-direction: row;
                                                gap: 1rem;
                                                grid-row: 3;
                                                grid-column: 2;
                                                border-radius: var(--border-radius-l);
                                                background-color: var(--color-light);
                                                overflow: hidden;
                                                color: var(--color-brown-dark);

                                                & button {
                                                    width: 2rem;
                                                    aspect-ratio: 1;
                                                    background-color: unset;
                                                    box-shadow: var(--box-shadow-regular);
                                                    border: unset;
                                                    border-radius: 50%;
                                                    font-weight: bold;
                                                }

                                                & select {
                                                    background-color: inherit;
                                                    border: unset;
                                                    appearance: none;
                                                }
                                            }

                                            & .ticketType-description {
                                                font-size: 0.8rem;
                                                grid-column: 1 / -1;
                                                grid-row: 2;

                                                & * {
                                                    font-weight: unset;
                                                    color: inherit !important;
                                                }

                                                & p:empty {
                                                    display: none;
                                                }
                                            }

                                            @media screen and (min-width: 768px) {
                                                .name {
                                                    grid-column: 1;
                                                    grid-row: 1;
                                                }
                                                .ticketType-description {
                                                    grid-column: 1;
                                                    grid-row: 2;
                                                }
                                                .price {
                                                    grid-column: 2;
                                                    grid-row: 1 / -1;
                                                }
                                                .ticket-amount-input {
                                                    grid-column: 3;
                                                    grid-row: 1 / -1;
                                                }

                                                &:not(.hidden):has(~ :not(.hidden))::after {
                                                    grid-row: 3;
                                                }
                                            }
                                        }
                                    }
                                }
                            }

                            & .tab[data-tab-identifier="info"] {
                                display: flex;
                                flex-direction: column;
                                gap: 2rem;

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

                                &>* {
                                    padding: unset;
                                    width: unset;
                                }

                                & .list-eventinfos {
                                    color: inherit;
                                }
                            }
                        }
                    }
                }

                & #summary {
                    display: flex;
                    flex-direction: column;
                    gap: 2rem;

                    @media screen and (min-width: 768px) {
                        display: grid;
                        grid-template-columns: repeat(2, 1fr);
                        overflow-y: scroll;
                        scrollbar-width: none;
                    }

                    & input, select {
                        border-radius: var(--border-radius-m) !important;
                    }

                    & #page3 {
                        & label, .radio > label small {
                            color: inherit !important;
                        }

                        & label, .radio, .checkbox {
                            font-family: inherit !important;
                        }

                        & .insuranceDiv {
                            & .highlight-card {
                                background-color: var(--color-yellow);
                                border-color: var(--color-brown);

                                & h3 {
                                    font-weight: 800;
                                }

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

                    & #cart {
                        position: sticky;
                        top: 0;
                        align-self: start;
                        font-size: 1rem;

                        & .couponDiv {
                            & input[type="text"] {
                                border-radius: var(--border-radius-s);
                            }
                            & input[type="button"] {
                                background-color: var(--color-yellow) !important;
                                border-radius: var(--border-radius-m) !important;
                                border-color: var(--color-yellow) !important;
                            }
                        }

                        & .help-block {
                            color: inherit;
                            font-size: 0.8rem;
                        }

                        & .table.overview tr {
                            & td {
                                font-size: inherit;
                            }
                            & td:first-child {
                                background-color: unset !important;

                                & small {
                                    color: inherit !important;
                                    font-size: 0.8rem;
                                }
                            }

                            & .mobile-table-highlight {
                                background-color: unset !important;
                            }

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

                        & .tioNotOrganizer {
                            background-color: unset !important;
                            color: inherit !important;
                            font-family: inherit;
                            font-size: 0.8rem;
                        }
                    }
                }
            }

            & > nav {
                display: grid;
                grid-template-columns: 1fr auto auto;
                gap: 1rem;
                align-items: center;

                & .price-preview {
                    display: flex;
                    flex-direction: column;

                    & .net {
                        font-weight: bold;
                        font-size: 1.2rem;
                    }
                    & .information {
                        font-size: 0.8rem;
                        font-weight: 200;

                        & .tickets {
                            display: none;
                        }

                        @media screen and (min-width: 768px) {
                            .tickets {
                                display: inline-block;

                                &::after {
                                    content: "-";
                                    display: inline-block;
                                    margin: 0 0.5rem;
                                    color: inherit;
                                }
                            }
                        }
                    }
                }

                & button {
                    display: flex;
                    flex-direction: row;
                    align-items: center;
                    gap: 1rem;
                    border: unset;
                    border-radius: var(--border-radius-m);
                    background-color: var(--color-yellow);
                    padding: 0.5rem 1rem;
                    font-size: 0.8rem;
                    font-weight: bold;
                    transition: all var(--transition-regular);

                    & span:not(.material-symbols-outlined) {
                        display: none;

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

    & .background {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: -1;
        scale: 1.05;
        filter: blur(20px) brightness(0.8);
        
        & img {
            position: absolute;
            top: 0;
            left: 0;
            height: 100%;
            width: 100%;
            object-fit: cover;
            opacity: 0;
            transition: opacity var(--transition-regular);

            &.active {
                opacity: 1;
            }
        }
    }

}