/*
 * Styles für "Mein Bereich" (Login, Mitarbeiter- & Kunden-Dashboard).
 * Angelehnt an die bestehenden Farben/Schriften aus style.css
 * ($colorPrimary: #87b726, $colorText: #575756, Schrift: 'PT Sans').
 */

.bereich {
    max-width: 640px;
    margin: 0 auto;
    padding: 40px 0 80px;
    font-family: 'PT Sans', sans-serif;
    color: #575756;
}

.bereich h1 {
    color: #87b726;
    margin-bottom: 1em;
}

.bereich h2 {
    color: #87b726;
    font-size: 20px;
    margin: 1.5em 0 0.75em;
}

.bereich__intro {
    margin-bottom: 1.5em;
}

.bereich__message {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 1.5em;
    font-size: 15px;
}

.bereich__message--error {
    background: #fce8e8;
    color: #a12525;
    border: 1px solid #eeb9b9;
}

.bereich__message--success {
    background: #eaf5db;
    color: #4c6b1a;
    border: 1px solid #cfe5ac;
}

.login-form,
.buchung-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 360px;
}

.login-form__field,
.buchung-form__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-form label,
.buchung-form label {
    font-size: 14px;
    color: #575756;
}

.login-form input,
.buchung-form input,
.buchung-form textarea {
    padding: 10px 12px;
    border: 1px solid #b8b8b7;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
}

.login-form button,
.buchung-form button {
    align-self: flex-start;
    padding: 10px 24px;
    background: #87b726;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
}

.login-form button:hover,
.buchung-form button:hover {
    background: #729c20;
}

.bereich-tabelle {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2em;
    font-size: 15px;
}

.bereich-tabelle th,
.bereich-tabelle td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e2e1;
}

.bereich-tabelle th {
    color: #87b726;
    font-weight: bold;
}

.bereich__logout {
    margin-top: 2em;
}

.bereich__logout a {
    color: #575756;
    text-decoration: underline;
}

/*
 * Mietobjekt-Auswahl (Karten)
 */
.mietobjekt-liste {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.mietobjekt-karte {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 160px;
    padding: 16px;
    border: 1px solid #e2e2e1;
    border-radius: 6px;
    text-decoration: none;
    color: #575756;
    background: #ffffff;
    text-align: center;
}

.mietobjekt-karte:hover {
    border-color: #87b726;
}

.mietobjekt-karte img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 4px;
}

/*
 * Monatskalender
 */
.kalender {
    max-width: 420px;
}

.kalender__kopf {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

.kalender__kopf a {
    color: #87b726;
    text-decoration: none;
    font-size: 20px;
}

.kalender__wochentage,
.kalender__tage {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.kalender__wochentage span {
    font-size: 12px;
    color: #b8b8b7;
    padding: 4px 0;
}

.kalender__form {
    display: contents;
}

.kalender__tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    width: 100%;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}

.kalender__tag--frei {
    background: #eaf5db;
    color: #4c6b1a;
    cursor: pointer;
}

.kalender__tag--frei:hover {
    background: #d6ecb8;
}

.kalender__tag--gebucht {
    background: #f1f1f0;
    color: #b8b8b7;
}

.kalender__tag--leer {
    background: transparent;
}

.kalender__tag--puffer-vormittag {
    /* Vormittag (obere Hälfte) gesperrt, Nachmittag frei */
    background: linear-gradient(to bottom, #f1f1f0 50%, #ffffff 50%);
    color: #b8b8b7;
}

.kalender__tag--puffer-nachmittag {
    /* Nachmittag (untere Hälfte) gesperrt, Vormittag frei */
    background: linear-gradient(to bottom, #ffffff 50%, #f1f1f0 50%);
    color: #b8b8b7;
}

.kalender__tag--puffer-beide {
    /* Zwischen zwei Buchungen eingeklemmt - beide Hälften gesperrt */
    background: #f1f1f0;
    color: #b8b8b7;
}

.kalender__tag--admin.kalender__tag--gebucht,
.kalender__tag--admin.kalender__tag--puffer-beide {
    background: #fce8e8;
    color: #a12525;
    font-size: 10px;
    line-height: 1.2;
    padding: 2px;
}

.kalender__tag--admin.kalender__tag--puffer-vormittag {
    background: linear-gradient(to bottom, #fce8e8 50%, #ffffff 50%);
    font-size: 10px;
}

.kalender__tag--admin.kalender__tag--puffer-nachmittag {
    background: linear-gradient(to bottom, #ffffff 50%, #fce8e8 50%);
    font-size: 10px;
}

.kalender__tag-info {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.kalender__legende {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    font-size: 12px;
    color: #575756;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.kalender__legende-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 6px;
    vertical-align: middle;
}

/*
 * Admin-Bereich
 */
.bereich-admin__hinweis {
    font-size: 14px;
    background: #f3f6ee;
    padding: 10px 14px;
    border-radius: 4px;
}

.bereich-admin__hinweis a {
    color: #87b726;
}

.bereich-admin__auswahl select {
    padding: 8px 10px;
    border: 1px solid #b8b8b7;
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
}

/*
 * Stornieren-Button in den Buchungstabellen
 */
.stornieren-form {
    display: inline;
}

.stornieren-btn {
    background: none;
    border: 1px solid #eeb9b9;
    color: #a12525;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
}

.stornieren-btn:hover {
    background: #fce8e8;
}

/*
 * Ausgewählter Tag im Kalender (Kunde) & Hinweistext / Buchungsbestätigung
 */
.kalender__tag--ausgewaehlt {
    outline: 2px solid #4c6b1a;
    outline-offset: -2px;
}

.kalender__hinweis {
    font-size: 13px;
    color: #b8b8b7;
    margin: 10px 0 0;
}

.buchung-bestaetigen {
    margin-top: 20px;
    padding: 16px;
    background: #f3f6ee;
    border-radius: 6px;
}

.buchung-bestaetigen h3 {
    margin-top: 0;
}
