/* ==========================================================================
   kinderbasar-online.de – App-Stylesheet 2026
   Mobile-first, ohne Framework, ohne externe Ressourcen (DSGVO).
   Markenfarbe: #00a6e1 · Schrift: Nunito (selbst gehostet, variable)
   --------------------------------------------------------------------------
   Inhalt:
   01  Schriften (@font-face)
   02  Design-Tokens (:root)
   03  Reset & Basis
   04  Utilities (.container, .visually-hidden, .icon)
   05  Buttons (.btn …)
   06  Header (.site-header, .brand, .site-nav, Burger .nav-toggle)
   07  Such-Band & Suchformular (.search-band, .search-form)
   08  Flash-Meldungen (.flash …)
   09  Startseite (.hero, .search-panel, .section-title, .city-chips)
   10  Karten & Listen (.card-grid, .event-card, .badge, .empty-state,
       .pagination)
   11  Detailseite (.detail-card, .detail-list)
   12  Formulare (.form-card, .field, .actions)
   13  Fließtext (.prose)
   14  Footer (.site-footer)
   15  Reduced Motion
   ========================================================================== */


/* ==========================================================================
   01 Schriften
   ========================================================================== */

@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/nunito-latin.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: 'Nunito';
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
    src: url('../fonts/nunito-latin-ext.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-1EFF,
        U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}


/* ==========================================================================
   02 Design-Tokens
   ========================================================================== */

:root {
    --primary: #00a6e1;
    --primary-600: #008fc4;
    --primary-050: #e6f6fd;

    --accent: #ff9f1c;
    --accent-600: #e88c0a;
    --accent-ink: #3a2a00;   /* dunkle Schrift auf Accent (Kontrast!) */

    --ink: #16324a;
    --muted: #5e7a90;

    --bg: #f5f9fc;
    --surface: #fff;
    --line: #dfeaf2;

    --success: #1e7a46;
    --success-bg: #e9f7ef;
    --error: #b3312b;
    --error-bg: #fdeeed;
    --warning: #9a6b00;
    --warning-bg: #fff6e3;

    --radius: 14px;
    --radius-pill: 999px;
    --shadow: 0 2px 12px rgba(22, 50, 74, .08);
    --shadow-lift: 0 10px 28px rgba(22, 50, 74, .16);
}


/* ==========================================================================
   03 Reset & Basis
   ========================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
}

img,
svg {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

a {
    color: var(--primary-600);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3, h4 {
    margin: 0 0 .6em;
    font-weight: 800;
    line-height: 1.2;
    color: var(--ink);
    text-wrap: balance;
}

h1 {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
}

h2 {
    font-size: clamp(1.3rem, 3vw, 1.6rem);
}

h3 {
    font-size: 1.15rem;
}

p {
    margin: 0 0 1em;
}

input,
select,
textarea,
button {
    font: inherit;
    color: inherit;
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

::selection {
    background: var(--primary-050);
    color: var(--ink);
}

main.site-main {
    min-height: 55vh;
    padding-top: 20px;
    padding-bottom: 48px;
}


/* ==========================================================================
   04 Utilities
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1080px;
    margin-inline: auto;
    padding-inline: 16px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}


/* ==========================================================================
   05 Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 20px;
    border: 2px solid transparent;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 1rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, border-color .15s ease,
        color .15s ease, transform .15s ease, box-shadow .15s ease;
}

.btn:hover {
    text-decoration: none;
}

.btn:active {
    transform: translateY(1px);
}

.btn--primary {
    background: var(--primary);
    color: #fff;
}

.btn--primary:hover {
    background: var(--primary-600);
    color: #fff;
}

/* Accent-CTA: dunkle Schrift wegen Kontrast auf #ff9f1c */
.btn--accent {
    background: var(--accent);
    color: var(--accent-ink);
    box-shadow: var(--shadow);
}

.btn--accent:hover {
    background: var(--accent-600);
    color: var(--accent-ink);
    box-shadow: var(--shadow-lift);
}

.btn--ghost {
    background: transparent;
    color: var(--primary-600);
    border-color: var(--line);
}

.btn--ghost:hover {
    background: var(--primary-050);
    border-color: var(--primary);
    color: var(--primary-600);
}

.btn--sm {
    padding: 7px 14px;
    font-size: .9rem;
}


/* ==========================================================================
   06 Header
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-block: 10px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: none;
}

.brand img {
    height: 64px;            /* Mobil */
    width: auto;
    display: block;
}

/* Mobiler Accent-CTA neben dem Burger */
.header-cta {
    margin-left: auto;
}

/* Burger (Checkbox-Hack, kein JavaScript nötig) */
#nav-toggle {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
    padding: 0;
}

.nav-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    flex: none;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
}

.nav-toggle__bar {
    display: block;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}

#nav-toggle:checked ~ .nav-toggle .nav-toggle__bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

#nav-toggle:checked ~ .nav-toggle .nav-toggle__bar:nth-child(2) {
    opacity: 0;
}

#nav-toggle:checked ~ .nav-toggle .nav-toggle__bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

#nav-toggle:focus-visible ~ .nav-toggle {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* Nav: mobil als ausklappendes Panel unterm Header */
.site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    padding: 14px 16px 18px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-lift);
}

#nav-toggle:checked ~ .site-nav {
    display: flex;
}

.site-nav a {
    color: var(--ink);
    font-weight: 700;
}

.site-nav a:not(.btn) {
    padding: 10px 12px;
    border-radius: 10px;
}

.site-nav a:not(.btn):hover {
    background: var(--primary-050);
    color: var(--primary-600);
    text-decoration: none;
}

.site-nav .btn {
    width: 100%;
}

@media (min-width: 900px) {
    .brand img {
        height: 96px;         /* Desktop (Kundenwunsch) */
    }

    .header-cta,
    .nav-toggle,
    #nav-toggle {
        display: none;
    }

    .site-nav {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        margin-left: auto;
        padding: 0;
        background: transparent;
        border-bottom: 0;
        box-shadow: none;
    }

    .site-nav .btn {
        width: auto;
        margin-left: 6px;
    }
}


/* ==========================================================================
   07 Such-Band & Suchformular
   ========================================================================== */

.search-band {
    background: var(--primary-050);
    border-bottom: 1px solid var(--line);
    padding-block: 12px;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 10px;
}

.search-form input[type="text"],
.search-form select {
    padding: 10px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 0;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.search-form input[type="text"] {
    flex: 1 1 180px;
}

.search-form select {
    flex: 0 1 auto;
    cursor: pointer;
}

.search-form input[type="text"]:focus,
.search-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 225, .2);
}

.search-form .btn {
    flex: 0 0 auto;
}

@media (max-width: 639.98px) {
    .search-form .btn {
        flex: 1 1 100%;
    }
}


/* ==========================================================================
   08 Flash-Meldungen
   ========================================================================== */

.flash,
.message {
    margin: 16px 0;
    padding: 13px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 5px solid var(--primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-weight: 600;
    cursor: pointer;
}

.flash--success,
.message.success {
    border-left-color: var(--success);
    background: var(--success-bg);
    color: var(--success);
}

.flash--error,
.message.error {
    border-left-color: var(--error);
    background: var(--error-bg);
    color: var(--error);
}

.flash--warning,
.message.warning {
    border-left-color: var(--warning);
    background: var(--warning-bg);
    color: var(--warning);
}

.flash.hidden,
.message.hidden {
    display: none;
}


/* ==========================================================================
   09 Startseite: Hero, Suchpanel, Abschnitte, Städte-Chips
   ========================================================================== */

.hero {
    background: linear-gradient(180deg, var(--primary-050) 0%, #fff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(36px, 7vw, 72px) 16px clamp(32px, 5vw, 56px);
    margin-bottom: 32px;
}

.hero-inner {
    max-width: 800px;
    margin-inline: auto;
    text-align: center;
}

.hero-inner h1 {
    margin-bottom: .4em;
}

.hero-inner p {
    color: var(--muted);
    font-size: clamp(1rem, 2vw, 1.15rem);
    max-width: 620px;
    margin: 0 auto 1.4em;
}

/* Großes Suchformular als weiße Karte */
.search-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lift);
    padding: 16px;
    text-align: left;
}

.search-panel .search-form input[type="text"],
.search-panel .search-form select {
    padding: 14px 16px;
    font-size: 1.05rem;
}

.search-panel .search-form .btn {
    padding: 14px 24px;
    font-size: 1.05rem;
}

/* Suchpanel: .field-Blöcke (sichtbares Label über dem Input) im Flex-Layout */
.search-panel .search-form {
    align-items: flex-end;
}

.search-panel .search-form .field {
    flex: 0 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.search-panel .search-form .field:has(input[type="text"]) {
    flex: 1 1 200px;
}

@media (min-width: 640px) {
    .search-panel {
        padding: 20px;
    }

    .search-panel .search-form .btn {
        flex: 0 0 auto;
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 40px 0 18px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* Beliebte Städte */
.city-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 32px;
    padding: 0;
    list-style: none;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--primary-600);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease,
        transform .15s ease, box-shadow .15s ease;
}

.chip:hover {
    background: var(--primary-050);
    border-color: var(--primary);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}


/* ==========================================================================
   10 Karten & Listen
   ========================================================================== */

.card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 0 28px;
}

@media (min-width: 900px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.event-card {
    position: relative;             /* Bezugsrahmen für Stretched-Link */
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease,
        border-color .15s ease;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lift);
    border-color: var(--primary);
}

/* Datumsblock links */
.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 64px;
    height: 64px;
    background: var(--primary-050);
    border-radius: 12px;
    line-height: 1.1;
}

.event-date__day {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-600);
}

.event-date__month {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
}

.event-body {
    min-width: 0;
    flex: 1;
}

.event-title {
    display: block;
    margin: 0 0 4px;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
}

/* Titel-Link (Klasse sitzt in den Templates direkt auf dem <a>) */
a.event-title,
.event-title a {
    color: var(--ink);
    text-decoration: none;
}

a.event-title:hover,
.event-title a:hover {
    color: var(--primary-600);
    text-decoration: none;
}

/* Stretched-Link: ganze Karte klickbar */
a.event-title::after,
.event-title a::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
}

.event-meta {
    display: grid;
    gap: 4px;
    margin: 0;
}

.meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;                      /* p-Standardabstand aufheben */
    color: var(--muted);
    font-size: .95rem;
    min-width: 0;
}

.meta-row .icon {
    color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Top-Termin */
.event-card--top {
    border-color: var(--accent);
}

.event-card--top .event-title {
    padding-right: 56px;            /* Platz für das TOP-Badge */
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 11px;
    border-radius: var(--radius-pill);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.5;
}

.badge--top {
    background: var(--accent);
    color: var(--accent-ink);
}

.event-card--top .badge--top {
    position: absolute;
    top: 14px;
    right: 14px;
}

.badge--expired {
    display: block;                 /* Banner: Text darf umbrechen (Mobil) */
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid rgba(179, 49, 43, .25);
    border-radius: var(--radius);
    text-transform: none;
    letter-spacing: 0;
    font-size: .95rem;
    font-weight: 600;
    padding: 12px 16px;
    margin-bottom: 16px;
}

/* Leere Trefferliste */
.empty-state {
    padding: 44px 24px;
    text-align: center;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    font-size: 1.05rem;
    margin: 0 0 28px;
}

.empty-state strong {
    color: var(--ink);
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 28px 0;
    padding: 0;
    list-style: none;
}

.page-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-pill);
    color: var(--primary-600);
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease;
}

.page-link:hover {
    background: var(--primary-050);
    border-color: var(--primary);
    text-decoration: none;
}

.page-link[aria-disabled="true"],
.page-link.is-disabled {
    color: var(--muted);
    background: transparent;
    pointer-events: none;
    opacity: .6;
}


/* ==========================================================================
   11 Detailseite
   ========================================================================== */

.detail-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin: 0 0 24px;
}

@media (min-width: 640px) {
    .detail-card {
        padding: 28px 32px;
    }
}

.detail-list {
    margin: 0;
    display: grid;
    gap: 14px;
}

.detail-list > div {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.detail-list > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.detail-list .icon {
    color: var(--primary);
    margin-top: 3px;
}

.detail-list dt {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.detail-list dd {
    margin: 0;
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

/* Aufrufe-Zähler unter der Detail-Liste */
.detail-visitors {
    margin: 18px 0 0;
    color: var(--muted);
    font-size: .9rem;
}


/* ==========================================================================
   12 Formulare (Login, Registrierung, Eintragen …)
   ========================================================================== */

.form-card {
    max-width: 440px;
    margin: 24px auto 40px;
    padding: 24px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .form-card {
        padding: 32px;
    }
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 6px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--ink);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="url"],
.field input[type="tel"],
.field select,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 166, 225, .2);
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.field input[type="checkbox"],
.field input[type="radio"] {
    width: auto;
    margin-right: 8px;
    accent-color: var(--primary);
}

/* Validierungsfehler (CakePHP FormHelper) */
.field input.form-error,
.field select.form-error,
.field textarea.form-error {
    border-color: var(--error);
}

.field .error-message,
.error-message {
    display: block;
    margin-top: 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--error);
}

.actions {
    margin-top: 22px;
}

.form-card .actions .btn {
    width: 100%;
}

/* Dezente Querverweise unterm Formular */
.form-card .form-links,
.form-links {
    margin-top: 18px;
    text-align: center;
    font-size: .95rem;
    color: var(--muted);
}


/* ==========================================================================
   13 Fließtext (statische Seiten, SEO-Text)
   ========================================================================== */

.prose {
    max-width: 760px;
}

.prose h1 {
    margin-top: .5em;
}

.prose h2 {
    margin-top: 1.6em;
}

.prose h3 {
    margin-top: 1.4em;
}

.prose p,
.prose ul,
.prose ol,
.prose dl {
    margin: 0 0 1.1em;
    color: var(--ink);
}

.prose ul,
.prose ol {
    padding-left: 1.4em;
}

.prose li {
    margin-bottom: .35em;
}

.prose dt {
    font-weight: 800;
    margin-top: 1em;
}

.prose dd {
    margin: .2em 0 .8em;
}

.prose a {
    text-decoration: underline;
}

.prose a:hover {
    color: var(--primary);
}


/* ==========================================================================
   14 Footer
   ========================================================================== */

.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, .85);
    padding: 40px 0 0;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 32px;
}

@media (min-width: 640px) {
    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 24px;
    }
}

.footer-brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 6px;
}

.footer-claim {
    font-size: .95rem;
    color: rgba(255, 255, 255, .7);
    margin: 0;
}

.footer-title {
    font-size: .85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #fff;
    margin: 0 0 12px;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-grid li {
    margin-bottom: 8px;
}

.site-footer a {
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
}

.site-footer a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .15);
    padding: 18px 0 24px;
    font-size: .85rem;
    color: rgba(255, 255, 255, .6);
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom a {
    color: rgba(255, 255, 255, .8);
    text-decoration: underline;
}


/* ==========================================================================
   15 Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}


/* ===== Phase 4 ===== */

/* Breite Formular-Karte (Kinderbasar eintragen/bearbeiten) */
.form-card--wide {
    max-width: 720px;
}

/* Dezente Untermenü-Zeile im Account-Bereich (Passwort ändern / Konto löschen) */
.account-subnav {
    margin: -6px 0 18px;
    font-size: .92rem;
    color: var(--muted);
}

.account-subnav a {
    color: var(--muted);
    text-decoration: underline;
}

.account-subnav a:hover {
    color: var(--primary-600);
}

/* Ghost-Button in Fehlerfarbe (Löschen-Aktionen im Account-Bereich) */
.btn--danger-ghost {
    background: transparent;
    color: var(--error);
    border-color: var(--line);
}

.btn--danger-ghost:hover {
    background: var(--error-bg);
    border-color: var(--error);
    color: var(--error);
}

/* Orts-Autocomplete: Dropdown-Karte absolut unter dem Eingabefeld
   (Markup: .field.autocomplete > input + .autocomplete-list > button) */
.autocomplete {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    margin-top: 4px;
    padding: 6px;
    max-height: 260px;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    box-shadow: var(--shadow-lift);
}

.autocomplete-list[hidden] {
    display: none;
}

.autocomplete-item {
    display: block;
    width: 100%;
    padding: 9px 12px;
    background: transparent;
    border: 0;
    border-radius: 8px;
    font: inherit;
    text-align: left;
    color: var(--ink);
    cursor: pointer;
}

.autocomplete-item:hover,
.autocomplete-item--active {
    background: var(--primary-050);
    color: var(--primary-600);
}


/* ===== Phase 5 ===== */

/* Kompakte Erinnerungs-Karte unter der Termin-Detailkarte
   (Markup: .reminder-card > h2 + p + Formular mit .field/.actions) */
.reminder-card {
    max-width: 480px;
    margin: 0 0 24px;
    padding: 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .reminder-card {
        padding: 24px 32px;
    }
}

.reminder-card h2 {
    font-size: 1.15rem;
}

.reminder-card p {
    color: var(--muted);
    font-size: .95rem;
}

.reminder-card .actions {
    margin-top: 16px;
}

.reminder-card .actions .btn {
    width: 100%;
}


/* ===== Phase 6 ===== */

/* Produktauswahl 'Termin hervorheben' (templates/Accounts/highlight.php):
   drei Produkt-Karten nebeneinander ab Desktop-Breite */
.product-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 0 0 24px;
}

@media (min-width: 900px) {
    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.product-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Bereits gebuchte Hervorhebung: grün markiert, keine Checkbox */
.product-card--active {
    border-color: var(--success);
    background: var(--success-bg);
}

.product-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.product-card__name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
}

/* Ohne Checkbox (aktives Produkt) kein Zeige-Cursor */
p.product-card__name {
    cursor: default;
}

.product-card__name input[type="checkbox"] {
    flex: none;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--primary);
}

.product-card__desc {
    flex: 1;
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

.product-card__status {
    margin: 0;
}

/* Preisauszeichnung (Produktkarten) */
.price-tag {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--primary-600);
    white-space: nowrap;
}

/* Grünes Status-Badge 'aktiv bis …' / aktive Hervorhebungen */
.badge--active {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid rgba(30, 122, 70, .3);
    text-transform: none;
    letter-spacing: 0;
}

/* Badge-Zeile an der Termin-Karte (Mein-Account-Dashboard) */
.event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 8px;
}

/* Warenkorb-Karte (templates/Accounts/shopping_cart.php) */
.order-card {
    max-width: 720px;
    margin: 24px 0 40px;
    padding: 24px 20px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

@media (min-width: 640px) {
    .order-card {
        padding: 32px;
    }
}

.order-meta {
    margin: 0 0 16px;
    color: var(--muted);
    font-size: .95rem;
}

/* Tabelle scrollt bei schmalen Viewports im eigenen Container */
.order-table-wrap {
    overflow-x: auto;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .98rem;
}

.order-table th,
.order-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.order-table th:last-child,
.order-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.order-table thead th {
    font-size: .8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
}

.order-table tfoot th {
    border-bottom: 0;
    font-size: 1.05rem;
}

.order-table small {
    color: var(--muted);
}

/* Aktionszeile unter Warenkorb/Produktauswahl (Buttons + postLink-Formulare) */
.cart-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
}

.cart-actions form {
    margin: 0;
}

/* Offene Bestellungen im Mein-Account-Dashboard */
.order-list {
    display: grid;
    gap: 10px;
    margin: 0 0 28px;
    padding: 0;
    list-style: none;
}

.order-list__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


/* ===== Phase 7 ===== */

/* Aufklappbare Veranstalter-Kontakt-Karte auf der Termin-Detailseite
   (templates/Events/details.php, <details class="reminder-card contact-card">
   — Karten-Optik kommt von .reminder-card, hier nur das summary-Styling) */
.contact-card summary {
    cursor: pointer;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}

.contact-card summary::marker {
    color: var(--primary);
}

.contact-card[open] summary {
    margin-bottom: 10px;
}


/* ===== Werbung ===== */

/* Werbeplätze (templates/element/ad.php): Container mit gesetzlicher
   Kennzeichnung 'Anzeige' und reservierter Mindesthöhe als CLS-Schutz.
   Gerendert nur bei AdSense.enabled=true (echte Unit) bzw. im
   Debug-Modus als Platzhalter (.ad-slot--placeholder). */
.ad-slot {
    margin: 0 0 20px;
}

/* Gesetzliche Kennzeichnung über der Anzeige */
.ad-slot__label {
    margin: 0 0 4px;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.ad-slot .adsbygoogle {
    display: block;
    width: 100%;
}

/* 'top' sitzt im Layout zwischen Such-Band und <main> — eigener Abstand
   nach oben; 'detail' folgt der .detail-card auf der Termin-Detailseite */
.ad-slot--top {
    margin-top: 20px;
}

/* CLS-Schutz: Mindesthöhen der responsiven Units */
.ad-slot--top,
.ad-slot--detail {
    min-height: 90px;
}

@media (min-width: 900px) {
    .ad-slot--top,
    .ad-slot--detail {
        min-height: 120px;
    }
}

/* Infeed-Werbeplatz: fügt sich als Grid-Item in .card-grid ein und
   übernimmt die Karten-Optik der .event-card */
.ad-slot--infeed {
    margin: 0;
    padding: 16px;
    min-height: 160px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Platzhalter-Optik (nur debug=true bei AdSense.enabled=false):
   dezenter gestrichelter Rahmen, damit das Layout auf dev beurteilbar
   ist, ohne dass ein Google-Skript lädt */
.ad-slot--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: transparent;
    border: 2px dashed var(--line);
    border-radius: var(--radius);
    box-shadow: none;
}

.ad-slot--placeholder .ad-slot__label {
    margin: 0;
}

/* ===== Breadcrumb ===== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin: 0 0 .75rem;
    font-size: .85rem;
    color: var(--muted);
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary-600); text-decoration: underline; }
.breadcrumb__sep { color: var(--line); }
.breadcrumb [aria-current="page"] {
    color: var(--ink);
    max-width: 60vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
