@font-face {
    font-family: "Open Sans";
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/OpenSans-Regular.ttf') format('truetype');
}


/* Allgemeine Styles */
body {
    font-family: "Open Sans", sans-serif;
    margin: 0;
    padding: 0;
    background: white;
    width: 100%;
    /* min-height: calc(100vh - 150px); */
    height: fit-content;
    padding-top: 105px;
    /* Platz für den Header */
    /* Höhe des Footers anpassen */
    justify-self: center;
}

body:has(.login-container) {
    padding: 0;
    overflow: hidden;
    /* Verhindert Scrollen, wenn Login-Formular angezeigt wird */
}

body:has(.orte-auswahl-grid) {
    padding-bottom: 150px;
}

body:has(.kalender-form) {
    padding-top: 105px;

    .ort-header::after {
        top: 430px;
        height: 70px;
        transform: scaleY(1);
    }

    footer {
        position: static;
        bottom: unset;
        left: unset;
        width: 100%;
        z-index: 100;
        margin-top: 100px;
    }
}

header {
    color: white;
    padding: 0;
    text-align: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: 100px;

    .white-header {
        background: white;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 105px;
        z-index: -9999;

        border-bottom: #8d1a14 2px solid;
    }

    nav {
        margin-top: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 100%;
        /* Höhe des Headers */

        img {
            height: 100%;
            width: auto;

            padding: 10px;
            margin-left: 8vw;
            background: white;
            border-radius: 100%;
            z-index: 9999;

            border-bottom: #8d1a14 3px solid;
        }

        ul {
            width: 100%;
            display: flex;
            justify-content: space-evenly;
            align-items: center;
            list-style: none;
            padding: 0;
            margin: 0;
            margin-bottom: 35px;

            a {
                display: block;
                color: rgb(0, 0, 0);
                text-transform: uppercase;
                font-weight: 700;
                font-size: 18px;
                text-decoration: none;

                padding: 15px 20px;
            }

            a:hover {
                color: white;
                background-color: #8d1a14;
                border-radius: 10px;
            }
        }
    }
}

.ort-header {
    background: linear-gradient(90deg, rgb(145, 54, 29) 0%, rgb(199, 120, 62) 32%, rgb(166, 71, 29) 66%, rgb(170, 96, 35) 100%);
    z-index: 9998;
    margin-bottom: 100px;
}

.ort-header::after {
    content: "";
    display: block;
    width: 100%;
    height: 30px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-image: url('../img/welle.png');
    transform: scaleY(-1);
    /* Spiegeln der Welle */
    position: relative;
    top: 20px;
    /* Abstand nach unten */
}

footer>* {
    background: linear-gradient(90deg, rgb(145, 54, 29) 0%, rgb(199, 120, 62) 32%, rgb(166, 71, 29) 66%, rgb(170, 96, 35) 100%);
    color: white;
    margin: 0;
    padding: 1vh 0;
    text-align: center;
}

footer::before {
    content: "";
    display: block;
    width: 100%;
    height: 30px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-image: url('../img/welle.png');
}

footer {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 100;
    margin-top: 60px;
}

footer div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;

    p {
        margin: 0;
    }
}

a {
    color: white;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.margin-inline {
    margin-inline: 8vw;
}

/* Login-Formular Styles */


.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    font-family: "Open Sans", sans-serif;

    .error-message {
        color: red;
        margin-bottom: 10px;
        font-size: 15px;
        font-weight: bold;
        text-align: center;
        width: 100%;
    }

    form {
        width: 300px;
        background-color: rgba(255, 255, 255, 0.9);
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }
}

/* Input Styles */
input {
    width: 93%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

select {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
}


/* Button Styles */
button {
    width: 100%;
    padding: 10px;
    background-color: #8d1a14;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;

    &:hover {
        background-color: #c1703a;
    }
}


/* Orte Auswahl */
.orte-auswahl-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 32px;
    justify-content: space-evenly;
    margin-bottom: 40px;
}

.ort-card {
    position: relative;
    width: 45%;
    height: 300px;
    border-radius: 18px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.10);
    transition: box-shadow 0.2s, transform 0.2s;
    background: #eee;
}

.ort-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
    transform: scale(1.03);
}

.ort-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.ort-card:hover img {
    opacity: 0.95;
}

.ort-card-info {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    background: linear-gradient(0deg, rgb(166 71 29 / 75%) 80%, rgba(0, 0, 0, 0.0) 100%);
    color: #fff;
    padding: 18px 16px 10px 16px;
    box-sizing: border-box;
}

.ort-card-name {
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 4px;
    text-shadow: 0 2px 8px #000;
}

.ort-card-beschreibung {
    font-size: 0.98em;
    text-shadow: 0 1px 6px #000;
}

.ort-card form {
    display: none;
}

/* Kalender */

.kalender-form {
    margin-bottom: 20px;

    h1 {
        text-align: center;
    }

    .kal-filter {
        display: flex;
        margin-inline: 8vw;
        justify-content: space-around;

        select {
            width: 40%;
        }
    }
}

.kalender {
    border-collapse: collapse;
    width: 100%;
    margin-block: 20px;
}



.kalender tbody {
    margin-inline: 8vw;
}

.kalender td {
    border: 1px solid #ccc;
    width: 14%;
    height: 100px;
    vertical-align: top;
    position: relative;
    padding-bottom: 27px;
}

.kalender th {
    background: #eee;
}

.kalender .tage {
    height: 40px;
}

.kalender .tagnummer {
    font-weight: bold;
    margin: 3px 10px;
}

.reservierung {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px 5px;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.95em;
    text-align: center;
}

.reservierung:hover {
    cursor: default;
}

.status-angefragt {
    background: #fff3cd;
    color: #856404;
}

.status-bestätigt {
    background: #d4edda;
    color: #155724;
}

.status-abgelehnt {
    background: #f8d7da;
    color: #721c24;
}

.status-storniert {
    background: #e2e3e5;
    color: #383d41;
}

.status-gesperrt {
    background: #8d1a14;
    color: white;
}

.reservierung.editierbar {
    border: #000 1px solid;
}

.reservierung.editierbar:hover {
    cursor: pointer;
}

.status-angefragt.editierbar:hover {
    background-color: #ffe796;
}

.status-bestätigt.editierbar:hover {
    background-color: #92daa2;
}

.status-abgelehnt.editierbar:hover {
    background-color: #ffa6ad;
}


.plus-btn {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: #8d1a14;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
}

.plus-btn:hover {
    background: #c1703a;
}

.verein-logo {
    height: 18px;
    vertical-align: middle;
    margin-right: 4px;
}

.teil-name {
    font-size: 0.8em;
    color: #555;
    margin-right: 4px;
}


/* Kalender Navigation */
.kalender-navigation {
    display: grid;
    grid-template-columns: auto auto;
    gap: 10px;
    margin-block: 10px;
}

/* Admin-Section */
.admin-section {
    margin-top: 40px;
    margin-inline: 4vw;
    border-top: 2px solid #ccc;
    padding-top: 20px;

    >button {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    #exportBtn {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
    }
}

/* Reservierung PopUp */
#popup,
#ablehnungs-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    align-items: center;
    justify-content: center;

    >div {
        background: #fff;
        padding: 24px;
        border-radius: 8px;
        min-width: 320px;
        position: relative;
    }

    .close-btn {
        width: 13%;
        position: absolute;
        top: 8px;
        right: 8px;
        font-size: 24px;
        cursor: pointer;
    }

    #popup-error {
        color: red;
        font-weight: bold;
        margin-bottom: 10px;
    }

    #new_res_rechnung {
        display: flex;
        align-items: center;
        text-align: center;
        justify-content: space-between;
        margin-bottom: 10px;
    }

}


/* Anfragen-Tabelle */
#anfragen-table {
    tbody tr:first-of-type {
        height: 40px;
    }

    tr td {
        width: auto;
        align-content: center;
        text-align: center;
        padding: 0;

        button {
            width: 96%;
            margin: 5px;
        }

        .btn-accept {
            background-color: green;
        }

        .btn-decline {
            background-color: red;
        }

        .btn:hover {
            background-color: #c1703a;
        }
    }
}


/* Reservierung bearbeiten PopUp */
#edit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

#edit-popup>div {
    background: #fff;
    padding: 2em;
    border-radius: 8px;
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

#edit-popup h3 {
    margin-top: 0;
    font-size: 1.5em;
}

#edit-popup label {
    display: block;
    margin: 1em 0 0.5em;
}

#edit-popup input,
#edit-popup select,
#edit-popup button {
    width: 100%;
    padding: 0.5em;
    margin-bottom: 0.5em;
    font-size: 1em;
}

#edit-popup input {
    width: 96%;
}

#edit-popup .close-btn {
    position: absolute;
    top: 1em;
    right: 1em;
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: white;
    background-color: #8d1a14;
    width: 40px;
    height: 40px;
    padding: 0;
}

#edit-popup button[type="submit"] {
    background-color: #35af1c;
    color: white;
    border: none;
    cursor: pointer;
}

#edit-popup button[type="button"] {
    background-color: #e74c3c;
    color: white;
    border: none;
    margin-top: 0.5em;
    cursor: pointer;
}

#edit-popup .modus {
    display: grid;
    grid-template-columns: 10% auto;
    align-items: center;
    justify-content: center;

}


/* Passwort selbst ändern */

body:has(#chPW) {
    height: 100vh;
    padding: 0;
    position: absolute;
    align-content: center;
    background-color: white;

    .ort-header {
        width: 100%;
        position: absolute;
        top: 105px;
        z-index: 0;
    }
}

#chPW {
    width: 60%;
    max-width: 400px;
    justify-self: center;
    padding: 20px;
    border: #000 2px solid;
    border-radius: 10px;
    background-color: white;

    h2 {
        margin-top: 0;
    }
}

#meldung {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
}


#optionen-popup {
    z-index: 9999;

    input {
        width: auto;
    }
}

#popup_optionen_checkboxes label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 0.95em;
    cursor: pointer;
}