/*
 * Gestaltung der Website (T054).
 *
 * - Mobile first, nutzbar ab 360 px Breite (SC-009). Ab 48rem steht die Navigation als Leiste da.
 * - Sichtbarer Fokus für die Bedienung per Tastatur.
 * - Kalenderfarben (FR-016) nie allein: Jeder Status hat zusätzlich ein Zeichen oder eine Linie, und
 *   der Status steht für Screenreader als Text im Link (.visually-hidden).
 * - Schrift: Roboto (SIL Open Font License, assets/fonts/OFL.txt), selbst gehostet als variable
 *   WOFF2-Schrift aus assets/fonts/ (Stärken 400 bis 700, auch 600). Nichts kommt von fremden
 *   Servern (FR-116). Je Stil gibt es eine Datei für Westeuropa (latin) und eine für weitere
 *   europäische Zeichen (latin-ext); der Browser lädt nur, was die Seite braucht. Bis die Schrift
 *   geladen ist, steht der Text in der Systemschrift (font-display: swap).
 * - Keine Inline-Styles in Vorlagen (Content-Security-Policy style-src 'self').
 */

/* Schrift */

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/roboto-normal-latin-ext-A4Xa4gb.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Roboto";
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/roboto-normal-latin-EEph2sr.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/roboto-italic-latin-ext-FEKB2xP.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Roboto";
    font-style: italic;
    font-weight: 400 700;
    font-display: swap;
    src: url("../fonts/roboto-italic-latin-7a1tPIG.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --color-text: #1b1f1c;
    --color-muted: #4d5650;
    --color-background: #ffffff;
    --color-surface: #f3f5f2;
    --color-border: #c9cfc8;
    --color-primary: #24603a;
    --color-primary-dark: #17442a;
    --color-on-primary: #ffffff;
    --color-error: #a4201b;
    --color-focus: #1a4fb5;

    /* Kalender: Kontrast des Texts auf jeder Fläche mindestens 4,5 : 1 */
    --day-free: #d9efdd;
    --day-few: #fbe7b5;
    --day-booked: #f4d3d1;
    --day-closed: #e6e8e6;

    --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --radius: 0.375rem;
    --space: 1rem;
    --page-width: 72rem;
}

/* Grundlage */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 20rem;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img {
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3 {
    line-height: 1.25;
    margin: 1.5em 0 0.5em;
}

h1 {
    font-size: 1.75rem;
    margin-top: 0.5em;
}

h2 {
    font-size: 1.375rem;
}

a {
    color: var(--color-primary);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--color-primary-dark);
}

:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: var(--space);
    top: -10rem;
    z-index: 10;
    padding: 0.5rem 1rem;
    background: var(--color-background);
    border: 2px solid var(--color-focus);
}

.skip-link:focus {
    top: var(--space);
}

.page {
    flex: 1;
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: var(--space);
}

/* Schaltflächen */

.button {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.button:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: var(--color-on-primary);
}

/* Kopfzeile und Navigation (FR-112) */

.site-header {
    border-bottom: 1px solid var(--color-border);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem var(--space);
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0.75rem var(--space);
}

.site-header__brand {
    color: var(--color-text);
    font-size: 1.25rem;
    font-weight: 700;
    text-decoration: none;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a:not(.button) {
    display: block;
    padding: 0.5rem 0;
    color: var(--color-text);
    text-decoration: none;
}

.site-nav a:not(.button):hover,
.site-nav a[aria-current="page"] {
    color: var(--color-primary);
    text-decoration: underline;
}

.site-nav__menu > summary {
    padding: 0.5rem 1rem;
    border: 2px solid var(--color-text);
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.site-nav__menu > summary::-webkit-details-marker {
    display: none;
}

.site-nav__menu > summary::after {
    content: " ▾";
}

.site-nav__menu[open] > summary::after {
    content: " ▴";
}

.site-nav__menu[open] .site-nav__list {
    position: absolute;
    left: 0;
    right: 0;
    z-index: 5;
    padding: 0.5rem var(--space) var(--space);
    background: var(--color-background);
    border-bottom: 1px solid var(--color-border);
}

.site-nav__list .button {
    margin-top: 0.5rem;
}

.site-nav__bar {
    display: none;
}

.nav-count {
    display: inline-block;
    min-width: 1.5em;
    padding: 0 0.4em;
    border-radius: 1em;
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 0.875rem;
    text-align: center;
}

@media (min-width: 48rem) {
    .site-nav__menu {
        display: none;
    }

    .site-nav__bar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 1.25rem;
    }
}

/* Fußzeile */

.site-footer {
    margin-top: 3rem;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

.site-footer__inner {
    display: grid;
    gap: var(--space);
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 1.5rem var(--space);
}

.site-footer h2 {
    margin: 0 0 0.5rem;
    font-size: 1.0625rem;
}

.site-footer address {
    font-style: normal;
}

.site-footer__links ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer__links a {
    display: inline-block;
    padding: 0.25rem 0;
}

.tax-note {
    margin: 0;
    color: var(--color-muted);
}

@media (min-width: 48rem) {
    .site-footer__inner {
        grid-template-columns: 1fr 1fr;
    }

    .tax-note {
        grid-column: 1 / -1;
    }
}

/* Listen von Links, etwa auf Fehlerseiten */

.link-list {
    padding-left: 1.25rem;
}

.link-list li {
    margin: 0.25rem 0;
}

/* Formulare (Theme: templates/form/theme.html.twig) */

.form-row {
    margin: 0 0 var(--space);
}

.form-row label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.form-row label.required::after {
    content: " *";
    color: var(--color-error);
}

input:not([type="checkbox"], [type="radio"]),
select,
textarea {
    display: block;
    width: 100%;
    max-width: 30rem;
    padding: 0.5rem 0.625rem;
    border: 2px solid var(--color-muted);
    border-radius: var(--radius);
    background: var(--color-background);
    color: var(--color-text);
    font: inherit;
}

input[type="checkbox"],
input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.help-text {
    margin-top: 0.25rem;
    color: var(--color-muted);
    font-size: 0.9375rem;
}

.form-errors {
    margin: 0 0 0.25rem;
    padding: 0;
    list-style: none;
    color: var(--color-error);
    font-weight: 600;
}

.form-errors li::before {
    content: "⚠ ";
}

.form-row--error input,
.form-row--error select,
.form-row--error textarea {
    border-color: var(--color-error);
}

.search-form {
    display: grid;
    gap: 0 var(--space);
    max-width: 40rem;
}

@media (min-width: 36rem) {
    .search-form {
        grid-template-columns: 1fr 1fr;
    }

    .search-form .button {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

/* Ergebnis der Verfügbarkeitssuche (FR-021 bis FR-024) */

.offer-list {
    display: grid;
    gap: var(--space);
    margin: 0 0 calc(var(--space) * 1.5);
    padding: 0;
    list-style: none;
}

@media (min-width: 48rem) {
    .offer-list {
        grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    }
}

.offer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    height: 100%;
    padding: var(--space);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.offer > * {
    margin: 0;
}

.offer__name {
    font-size: 1.25rem;
}

.offer__price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 0.5rem;
}

.offer__base,
.offer__daily {
    color: var(--color-muted);
}

.offer__final {
    font-size: 1.5rem;
}

.offer__discount {
    align-self: flex-start;
    padding: 0.125rem 0.5rem;
    border-radius: var(--radius);
    background: var(--color-primary);
    color: var(--color-on-primary);
    font-size: 0.875rem;
    font-weight: 600;
}

.offer__rent {
    align-self: flex-start;
    margin-top: auto;
}

.search-empty {
    font-size: 1.125rem;
}

.search-share {
    margin: 0 0 calc(var(--space) * 1.5);
}

/*
 * Monatskalender (FR-016). Jeder Tag ist ein Link oder, wenn nicht wählbar, ein <span>. Der Status
 * steht als Text in .visually-hidden; Farbe und Zeichen sind nur die sichtbare Ergänzung.
 */

.calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(2.5rem, 1fr));
    gap: 0.25rem;
    max-width: 28rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.calendar__weekday {
    color: var(--color-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
}

.calendar__day > a,
.calendar__day > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--color-text);
    text-decoration: none;
}

.calendar__day > a:hover {
    border-color: var(--color-text);
}

.calendar__day--free > * {
    background: var(--day-free);
}

.calendar__day--few > * {
    background: var(--day-few);
}

.calendar__day--few > *::after {
    content: "•";
    line-height: 1;
}

.calendar__day--booked > * {
    background: var(--day-booked);
    text-decoration: line-through;
}

.calendar__day--closed > * {
    background: var(--day-closed);
    color: var(--color-muted);
}

.calendar__day--closed > *::after {
    content: "–";
    line-height: 1;
}

.calendar__day--outside > * {
    color: var(--color-muted);
}

.calendar__day--selected > * {
    border: 2px solid var(--color-primary-dark);
    font-weight: 700;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.875rem;
}

.calendar-legend__swatch {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
    border: 1px solid var(--color-border);
    vertical-align: middle;
}

.calendar-legend__swatch--free {
    background: var(--day-free);
}

.calendar-legend__swatch--few {
    background: var(--day-few);
}

.calendar-legend__swatch--booked {
    background: var(--day-booked);
}

.calendar-legend__swatch--closed {
    background: var(--day-closed);
}

/* Startseite (FR-111) */

.home-section {
    margin: 0 0 calc(var(--space) * 2);
}

.home-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.savings-tip,
.article-discounts {
    margin: 0 0 var(--space);
    padding-left: 1.25rem;
}

.home-steps {
    display: grid;
    gap: 0.5rem;
    margin: 0 0 var(--space);
    padding-left: 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
}

@media (min-width: 48rem) {
    .home-steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.home-arrival {
    font-weight: 600;
}

.home-cta {
    margin: 0 0 calc(var(--space) * 2);
    text-align: center;
}

/* Artikelseite (FR-001, FR-016, FR-040) */

.article-lead {
    font-size: 1.125rem;
}

/* Das erste Foto steht groß über den übrigen, die als quadratische Kacheln folgen. */
.article-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--space) / 2);
    margin: 0 0 var(--space);
    padding: 0;
    list-style: none;
}

.article-gallery li:first-child {
    grid-column: 1 / -1;
}

.article-gallery img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    background: var(--color-surface);
}

.article-gallery li:first-child img {
    max-height: 28rem;
    object-fit: contain;
}

.article-gallery li:not(:first-child) img {
    aspect-ratio: 1;
    object-fit: cover;
}

.article-price {
    margin: 0;
    font-size: 1.5rem;
}

.article-deposit {
    margin: 0 0 var(--space);
    color: var(--color-muted);
}

.article-booking {
    display: grid;
    gap: calc(var(--space) * 1.5);
    margin: 0 0 calc(var(--space) * 1.5);
}

@media (min-width: 48rem) {
    .article-booking {
        grid-template-columns: minmax(0, 1fr) minmax(0, 22rem);
        align-items: start;
    }
}

.article-specs dt {
    font-weight: 600;
}

.article-specs dd {
    margin: 0 0 0.5rem;
}

.article-faq {
    margin: 0 0 0.5rem;
}

.article-guides {
    margin: 0 0 var(--space);
    padding: 0;
    list-style: none;
}

.article-guides li {
    margin: 0 0 0.75rem;
}

.article-guides p {
    margin: 0;
    color: var(--color-muted);
}

.article-neighbours ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem var(--space);
    margin: calc(var(--space) * 1.5) 0 0;
    padding: 0;
    list-style: none;
}

.article-faq summary {
    cursor: pointer;
    font-weight: 600;
}

.calendar-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.25rem var(--space);
    max-width: 28rem;
    margin-bottom: 0.5rem;
}

.calendar-nav h3 {
    flex: 1 1 auto;
    margin: 0;
    text-align: center;
}

.calendar-nav a[rel="prev"] {
    order: -1;
}

/* Buchungsbox */

.booking-box {
    padding: var(--space);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.booking-box > h2 {
    margin-top: 0;
}

.button--secondary {
    background: var(--color-background);
    color: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
}

.button:disabled,
.quantity__button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.booking-summary {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem var(--space);
    margin: 0 0 var(--space);
}

.booking-summary dt {
    font-weight: 600;
}

.booking-summary dd {
    margin: 0;
}

.quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 var(--space);
}

.quantity > span {
    margin-right: 0.5rem;
    font-weight: 600;
}

.quantity__button {
    min-width: 2.75rem;
    min-height: 2.75rem;
    border: 2px solid var(--color-primary);
    border-radius: var(--radius);
    background: var(--color-background);
    color: var(--color-primary-dark);
    font: inherit;
    font-size: 1.25rem;
    cursor: pointer;
}

.quantity__value {
    min-width: 2rem;
    text-align: center;
    font-weight: 700;
}

.booking-price p {
    margin: 0 0 0.25rem;
}

.booking-price strong {
    font-size: 1.5rem;
}

.button--secondary:hover {
    border-color: var(--color-primary-dark);
    background: var(--color-surface);
    color: var(--color-primary-dark);
}

/* Meine Auswahl und Buchungsabschluss (templates/checkout/show.html.twig) */

.notice {
    margin: 0 0 var(--space);
    padding: 0.75rem var(--space);
    border: 2px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.notice--error {
    border-color: var(--color-error);
    color: var(--color-error);
    font-weight: 600;
}

.checkout-table {
    width: 100%;
    border-collapse: collapse;
}

.checkout-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.checkout-line {
    display: block;
    margin: 0 0 var(--space);
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.checkout-line > * {
    display: block;
    padding: 0.125rem 0;
    text-align: left;
}

.checkout-line > td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
}

.checkout-line--unavailable {
    border-color: var(--color-error);
    background: var(--day-booked);
}

.checkout-line__flag {
    display: block;
    color: var(--color-error);
}

.checkout-line__action {
    padding-top: 0.5rem;
}

.checkout-totals {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem var(--space);
    margin: 0 0 var(--space);
}

.checkout-totals dt {
    font-weight: 600;
}

.checkout-totals dd {
    margin: 0;
}

@media (min-width: 48rem) {
    .checkout-table thead {
        position: static;
        width: auto;
        height: auto;
        overflow: visible;
        clip-path: none;
    }

    .checkout-table th,
    .checkout-table td {
        padding: 0.5rem;
        border-bottom: 1px solid var(--color-border);
        text-align: left;
        vertical-align: top;
    }

    .checkout-line {
        display: table-row;
        margin: 0;
        padding: 0;
        border: 0;
    }

    .checkout-line > * {
        display: table-cell;
        padding: 0.5rem;
    }

    .checkout-line > td[data-label]::before {
        content: none;
    }

    .checkout-line__action {
        padding-top: 0.5rem;
    }
}

/* Kundenkonto (templates/account/) */

.account-menu ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem var(--space);
    align-items: center;
    margin: 0 0 var(--space);
    padding: 0;
    list-style: none;
}

.account-menu form {
    margin: 0;
}

.account-booking {
    margin: 0 0 var(--space);
    padding: 0.75rem var(--space);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.account-booking h3 {
    margin-top: 0;
}

.account-booking dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem var(--space);
    margin: 0 0 var(--space);
}

.account-booking dt {
    font-weight: 600;
}

.account-booking dd {
    margin: 0;
}

.account-booking dd ul {
    margin: 0;
    padding-left: 1.25rem;
}

/* Inhaltsseiten, Ratgeber und Kontakt (FR-110, FR-113) */

.prose {
    max-width: 48rem;
}

.prose img {
    max-width: 100%;
    height: auto;
}

.guide-list {
    display: grid;
    gap: var(--space);
    margin: 0;
    padding: 0;
    list-style: none;
}

.guide-teaser {
    padding: var(--space);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
}

.guide-teaser h2 {
    margin-top: 0;
}

.guide-teaser__date {
    margin: 0 0 0.5rem;
    color: var(--color-muted);
}

.contact__list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem var(--space);
    margin: 0 0 var(--space);
}

.contact__list dt {
    font-weight: 600;
}

.contact__list dd {
    margin: 0;
}
