:root {
    --restaurant-primary: #202020;
    --restaurant-background: #f5f5f2;
    --restaurant-surface: #ffffff;
    --restaurant-border: #deded8;
    --restaurant-text: #1f1f1d;
    --restaurant-muted: #70706b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    background: var(--restaurant-background);
    color: var(--restaurant-text);

    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

a {
    color: inherit;
}


/* ============================================================
   HEADER
============================================================ */

.site-header {
    background: var(--restaurant-primary);
    color: #ffffff;
}

.site-header__inner,
.site-content {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header__inner {
    min-height: 72px;

    display: flex;
    align-items: center;
}

.site-brand {
    font-size: 1.2rem;
    font-weight: 700;

    text-decoration: none;
}

.site-brand__logo {
    display: block;

    max-width: 180px;
    height: auto;
}


/* ============================================================
   MAIN CONTENT
============================================================ */

.site-main {
    min-height: 70vh;
}

.site-content {
    padding-block: 48px;
}

.site-main--portal {
    padding-block: 0;
}

.site-content--below-portal {
    padding-top: 24px;
}


/* ============================================================
   KUNDENPORTAL: ANMELDUNG
============================================================ */

.rm-login {
    min-height: 70vh;

    display: flex;
    justify-content: center;
    align-items: center;

    padding: 40px 16px;
}

/* Demo-Seite: Warnschild + Zugangsdaten über dem Login */
.rm-login:has(.rm-demo-login) {
    flex-direction: column;
    gap: 20px;
}

.rm-demo-login {
    width: 100%;
    max-width: 560px;

    padding: 22px 24px;

    border: 2px solid #c8452f;
    border-radius: 12px;

    background: #fdf0ec;
    color: #3b1d15;
}

.rm-demo-login__warning strong:first-child {
    display: block;

    margin-bottom: 8px;

    color: #a3321f;

    font-size: 1.15rem;
}

.rm-demo-login__warning p {
    margin: 0 0 8px;

    line-height: 1.5;
}

.rm-demo-login__credentials {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;

    margin: 14px 0;
}

.rm-demo-login__credentials div {
    padding: 10px 12px;

    border: 1px solid rgb(200 69 47 / 35%);
    border-radius: 8px;

    background: #fff;
}

.rm-demo-login__credentials dt {
    color: #7a4a3e;

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rm-demo-login__credentials dd {
    margin: 2px 0 0;

    font-size: 1.05rem;
    font-weight: 700;
    word-break: break-all;
}

.rm-demo-login__credentials code {
    color: inherit;

    font-family: inherit;
}

.rm-demo-login__fill {
    padding: 8px 16px;

    border: 1px solid #a3321f;
    border-radius: 999px;

    background: #fff;
    color: #a3321f;

    font: inherit;
    font-weight: 700;

    cursor: pointer;
}

.rm-login__card {
    width: 100%;
    max-width: 420px;

    padding: 40px;

    border: 1px solid var(--restaurant-border);
    border-radius: 12px;

    background: var(--restaurant-surface);

    box-shadow:
        0 10px 40px
        rgb(0 0 0 / 8%);
}

.rm-login__header {
    margin-bottom: 28px;

    text-align: center;
}

.rm-login__header h1 {
    margin: 0 0 6px;

    font-size: 1.75rem;
}

.rm-login__header p {
    margin: 0;

    color: var(--restaurant-muted);

    font-size: 0.9rem;
}

.rm-login__card > h3,
.rm-login__card > h3 + p {
    display: none;
}

.rm-login .felogin-hidden {
    display: none;
}

.rm-login fieldset {
    margin: 0;
    padding: 0;

    border: 0;
}

.rm-login legend {
    display: none;
}

.rm-login fieldset > div {
    margin-bottom: 18px;
}

.rm-login label {
    display: block;

    margin-bottom: 7px;

    font-size: 0.8rem;
    font-weight: 700;
}

.rm-login input[type="text"],
.rm-login input[type="password"] {
    width: 100%;
    min-height: 42px;

    padding: 9px 11px;

    border: 1px solid var(--restaurant-border);
    border-radius: 8px;

    background: var(--restaurant-surface);
    color: inherit;

    font: inherit;
}

.rm-login input[type="text"]:focus,
.rm-login input[type="password"]:focus {
    outline: 2px solid var(--restaurant-primary);
    outline-offset: 1px;
}

.rm-login input[type="submit"] {
    width: 100%;
    min-height: 42px;

    margin-top: 4px;

    border: 0;
    border-radius: 8px;

    background: var(--restaurant-primary);
    color: #ffffff;

    font-size: 0.95rem;
    font-weight: 600;

    cursor: pointer;
}

.rm-login input[type="submit"]:hover {
    background: #3a3a36;
}

.rm-login .typo3-messages,
.rm-login [class*="alert"] {
    margin-bottom: 18px;
    padding: 12px 15px;

    border: 1px solid #f0cfc5;
    border-radius: 8px;

    background: #fbe8e1;
    color: #6c302b;

    font-size: 0.95rem;

    list-style: none;
}

.rm-login > .rm-login__card > a {
    display: block;

    margin-top: 20px;
    padding-top: 18px;

    border-top: 1px solid var(--restaurant-border);

    color: var(--restaurant-muted);

    font-size: 0.85rem;
    text-align: center;
}


/* ============================================================
   FOOTER
============================================================ */

.site-footer {
    margin-top: 80px;

    border-top: 0;

    background: #20201e;
    color: #f5f5f1;
}
.site-main--portal + .site-footer {
    margin-top: 0;
}

.site-footer__inner {
    width: min(1180px, calc(100% - 48px));

    margin: 0 auto;
    padding: 56px 0 24px;

    /*
     * Wichtig:
     * Hier kein display:flex.
     * Grid und Bottom stehen untereinander.
     */
    display: block;

    min-height: 0;
}

.site-footer__grid {
    display: grid;

    grid-template-columns:
        minmax(260px, 0.85fr)
        minmax(440px, 1.5fr);

    gap: clamp(48px, 7vw, 90px);

    align-items: start;
}

.site-footer__section {
    min-width: 0;
}


/* ============================================================
   FOOTER BRAND
============================================================ */

.site-footer__brand {
    display: block;

    margin-bottom: 24px;

    color: #ffffff;

    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.3;

    letter-spacing: -0.02em;
}

.site-footer__logo {
    display: block;

    max-width: 140px;
    height: auto;
}


/* ============================================================
   FOOTER ADRESSE
============================================================ */

.site-footer__address {
    margin-bottom: 22px;

    color: #bdbdb7;

    font-size: 0.9rem;
    line-height: 1.65;
}

.site-footer__address > div {
    min-height: 1.4em;
}


/* ============================================================
   FOOTER KONTAKT
============================================================ */

.site-footer__contact {
    display: grid;

    gap: 7px;

    margin-bottom: 24px;
}

.site-footer__link {
    width: fit-content;

    color: #c9c9c3;

    text-decoration: none;

    font-size: 0.91rem;
    line-height: 1.5;

    transition:
        color 150ms ease,
        opacity 150ms ease;
}

.site-footer__link:hover {
    color: #ffffff;
}

.site-footer__link:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;

    border-radius: 3px;
}


/* ============================================================
   SOCIAL MEDIA
============================================================ */

.site-footer__socials {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;
}

.site-footer__socials .site-footer__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 32px;

    padding: 6px 11px;

    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.035);

    color: #bdbdb7;

    font-size: 0.76rem;
    font-weight: 650;
    line-height: 1;

    transition:
        color 150ms ease,
        background-color 150ms ease,
        border-color 150ms ease;
}

.site-footer__socials .site-footer__link:hover {
    border-color: rgba(255, 255, 255, 0.32);

    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}


/* ============================================================
   ÖFFNUNGSZEITEN
============================================================ */

.opening-hours {
    min-width: 0;
}

.opening-hours__title {
    margin: 0 0 20px;

    color: #ffffff;

    font-size: 0.77rem;
    font-weight: 800;
    line-height: 1;

    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.opening-hours__list {
    display: grid;
}

.opening-hours__day {
    display: grid;

    grid-template-columns:
        125px
        minmax(0, 1fr);

    gap: 22px;

    padding: 11px 0;

    border-top: 1px solid
    rgba(255, 255, 255, 0.085);
}

.opening-hours__day:first-child {
    padding-top: 0;

    border-top: 0;
}

.opening-hours__weekday {
    color: #f3f3ef;

    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.5;
}

.opening-hours__content {
    min-width: 0;

    /* Uhrzeiten, Küchenzeit und Hinweis in einer Zeile */
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 14px;

    color: #bdbdb7;

    font-size: 0.87rem;
    line-height: 1.5;
}

.opening-hours__times {
    display: flex;
    flex-wrap: wrap;

    gap: 5px 20px;
}

.opening-hours__times span {
    white-space: nowrap;
}

.opening-hours__closed {
    color: #85857f;

    font-style: italic;
}

.opening-hours__kitchen {

    color: #8f8f89;

    font-size: 0.77rem;
}

.opening-hours__notice {
    margin: 0;

    color: #a4a49e;

    font-size: 0.78rem;
    line-height: 1.45;
}


/* ============================================================
   FOOTER BOTTOM
============================================================ */

.site-footer__bottom {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-top: 46px;
    padding-top: 19px;

    border-top: 1px solid
    rgba(255, 255, 255, 0.085);

    color: #777771;

    font-size: 0.74rem;
    line-height: 1.4;
}


/* ============================================================
   TABLET
============================================================ */

@media (max-width: 850px) {

    .site-footer__grid {
        grid-template-columns: 1fr;

        gap: 44px;
    }

    .site-footer__section,
    .opening-hours {
        max-width: 650px;
    }
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 560px) {

    .site-footer {
        margin-top: 56px;
    }

    .site-footer__inner {
        width: min(
            100% - 32px,
            1180px
        );

        padding-top: 40px;
    }

    .site-footer__grid {
        gap: 38px;
    }

    .site-footer__brand {
        margin-bottom: 20px;
    }

    .site-footer__address {
        margin-bottom: 18px;
    }

    .site-footer__contact {
        margin-bottom: 20px;
    }

    .opening-hours__day {
        grid-template-columns:
            105px
            minmax(0, 1fr);

        gap: 14px;

        padding: 9px 0;
    }

    .opening-hours__times {
        display: grid;

        gap: 2px;
    }

    .site-footer__bottom {
        margin-top: 36px;
    }
}


/* ============================================================
   SMALL MOBILE
============================================================ */

@media (max-width: 380px) {

    .opening-hours__day {
        grid-template-columns: 1fr;

        gap: 3px;
    }

    .opening-hours__weekday {
        font-size: 0.82rem;
    }

    .site-footer__socials {
        gap: 6px;
    }
}

/* Hinweis nach Scan eines Gutschein-QR-Codes (ausgeloggt) */
.rm-login__header .rm-login__hint {
    margin-top: 10px;
    padding: 8px 12px;

    border-radius: 8px;

    background: #f4f4ef;
    color: #20201e;

    font-weight: 600;
}


/* ============================================================
   KUNDENPORTAL: ANMELDUNG – Fehler und Sicherheitsprüfung (Altcha)
============================================================ */

.rm-login__error {
    margin: 0 0 16px;
    padding: 12px 14px;

    border: 1px solid rgb(200 69 47 / 35%);
    border-radius: 10px;

    background: #fdf0ec;
    color: #8a2a1a;

    font-size: 0.92rem;
    line-height: 1.45;
}

.rm-login__altcha {
    margin: 4px 0 14px;
}

.rm-login__altcha altcha-widget {
    display: block;
    max-width: 100%;
}
