/* Storefront-Struktur-CSS - themeunabhaengig, analog panel.css fuer das Backend.
   Enthaelt NUR Layout/Struktur, keine Farben/Schriften direkt - alles laeuft
   ueber die CSS-Variablen (--sf-*), die jedes Theme in seiner eigenen
   theme.css definiert (siehe Modules/Storefront/resources/views/themes/{theme}/theme.css). */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--sf-font-body, system-ui, sans-serif);
    background: var(--sf-color-bg, #fff);
    color: var(--sf-color-text, #1f2937);
}

a { color: var(--sf-color-accent, #2563eb); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--sf-font-heading, inherit); }

.sf-header-inner, .sf-footer-inner, .sf-main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Admin-only Hinweis waehrend aktivem Wartungsmodus - bewusst NICHT
   themeabhaengig (kein Kunden-/Besucherinhalt, sondern eine interne
   Admin-Randnotiz), daher feste Farben statt --sf-color-*-Variablen. */
.sf-maintenance-admin-notice {
    background: #fef3c7; border-bottom: 3px solid #d97706; color: #78350f;
    padding: .85rem 1.5rem; font-size: 1rem; font-weight: 600; text-align: center;
}

.sf-header {
    border-bottom: 1px solid var(--sf-color-border, #e5e7eb);
    background: var(--sf-color-surface, #fff);
}
.sf-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.sf-logo { font-weight: 700; font-size: 1.25rem; color: var(--sf-color-text, #1f2937); display: inline-flex; align-items: center; }
.sf-logo-img { max-height: 36px; max-width: 220px; }
.sf-slogan { font-size: .85rem; color: var(--sf-color-text-muted, #6b7280); margin-left: .5rem; }
.sf-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.sf-main { padding-top: 2rem; padding-bottom: 3rem; min-height: 60vh; }

.sf-status {
    background: var(--sf-color-surface, #f4f5f7);
    border: 1px solid var(--sf-color-border, #e5e7eb);
    border-radius: var(--sf-radius, 8px);
    padding: .75rem 1rem;
    margin-bottom: 1.5rem;
}

.sf-footer {
    border-top: 1px solid var(--sf-color-border, #e5e7eb);
    padding: 1.5rem 0;
    margin-top: 2rem;
}
.sf-footer-inner { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .9rem; align-items: center; }
.sf-lang-switch { margin-left: auto; }
.sf-lang-switch a { color: var(--sf-color-text-muted, #6b7280); }
.sf-lang-switch a.sf-lang-active { color: var(--sf-color-text, #1f2937); font-weight: 700; text-decoration: none; }

/* Cookie-Consent-Banner (DSGVO/TDDDG) - Buttons "Akzeptieren"/"Ablehnen" bewusst
   optisch gleichwertig gestalten (VG Hannover, 19.03.2025: unwirksame Einwilligung
   bei visueller Bevorzugung des Zustimmungs-Buttons). */
.sf-cookie-banner {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 1000;
    background: var(--sf-color-surface, #fff);
    border-top: 1px solid var(--sf-color-border, #e5e7eb);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .12);
    padding: 1.25rem 1.5rem;
}
.sf-cookie-banner[hidden] { display: none; }
.sf-cookie-banner-inner { max-width: 1100px; margin: 0 auto; }
.sf-cookie-banner-intro { font-size: .9rem; margin-bottom: 1rem; }
.sf-cookie-banner-categories { display: grid; gap: .75rem; margin-bottom: 1rem; }
.sf-cookie-banner-categories[hidden] { display: none; }
.sf-cookie-category { display: flex; gap: .6rem; align-items: flex-start; font-size: .85rem; }
.sf-cookie-category input { margin-top: .2rem; }
.sf-cookie-category-name { font-weight: 700; margin-right: .4rem; }
.sf-cookie-category-desc { color: var(--sf-color-text-muted, #6b7280); }
.sf-cookie-banner-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.sf-cookie-btn {
    flex: 1 1 auto;
    min-width: 9rem;
    padding: .65rem 1.1rem;
    font-size: .9rem;
    font-weight: 700;
    border-radius: var(--sf-radius, 8px);
    border: 1px solid var(--sf-color-border, #e5e7eb);
    cursor: pointer;
}
.sf-cookie-btn-accept, .sf-cookie-btn-reject {
    background: var(--sf-color-accent, #2563eb);
    color: var(--sf-color-accent-contrast, #fff);
    border-color: transparent;
}
.sf-cookie-btn-settings, .sf-cookie-btn-save {
    background: var(--sf-color-surface, #fff);
    color: var(--sf-color-text, #1f2937);
}

.sf-hero {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--sf-color-surface, #f4f5f7);
    border-radius: var(--sf-radius, 8px);
    margin-bottom: 2rem;
}
.sf-hero h1 { font-size: 2rem; margin: 0 0 .75rem; }

.sf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.sf-card {
    border: 1px solid var(--sf-color-border, #e5e7eb);
    border-radius: var(--sf-radius, 8px);
    background: var(--sf-color-surface, #fff);
    padding: 1.25rem;
}
.sf-card img { max-width: 100%; border-radius: var(--sf-radius, 8px); margin-bottom: .75rem; }
.sf-card h3 { margin: 0 0 .5rem; }
.sf-price { font-weight: 700; font-size: 1.1rem; margin: .5rem 0; }

.sf-btn {
    display: inline-block;
    background: var(--sf-color-primary, #1f2937);
    color: var(--sf-color-primary-contrast, #fff);
    border: none;
    border-radius: var(--sf-radius, 8px);
    padding: .6rem 1.2rem;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
}
.sf-btn:hover { opacity: .9; text-decoration: none; }
.sf-btn-secondary {
    background: transparent;
    color: var(--sf-color-primary, #1f2937);
    border: 1px solid var(--sf-color-border, #e5e7eb);
}

.sf-form label { display: block; margin-top: 1rem; font-weight: 600; }
.sf-form input[type="text"], .sf-form input[type="email"], .sf-form input[type="password"],
.sf-form input[type="number"], .sf-form select, .sf-form textarea {
    width: 100%;
    max-width: 420px;
    padding: .5rem .6rem;
    border: 1px solid var(--sf-color-border, #e5e7eb);
    border-radius: var(--sf-radius, 6px);
    font-size: 1rem;
    margin-top: .25rem;
}
.sf-error { color: #b91c1c; font-size: .85rem; margin-top: .25rem; }

.sf-stepper {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    list-style: none;
    padding: 0;
}
.sf-stepper li {
    padding: .4rem .9rem;
    border-radius: 999px;
    border: 1px solid var(--sf-color-border, #e5e7eb);
    font-size: .85rem;
    color: var(--sf-color-text-muted, #6b7280);
}
.sf-stepper li.sf-step-active {
    background: var(--sf-color-primary, #1f2937);
    color: var(--sf-color-primary-contrast, #fff);
    border-color: transparent;
}

.sf-table { width: 100%; border-collapse: collapse; }
.sf-table th, .sf-table td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid var(--sf-color-border, #e5e7eb); }

.sf-summary-box {
    border: 1px solid var(--sf-color-border, #e5e7eb);
    border-radius: var(--sf-radius, 8px);
    padding: 1.25rem;
    background: var(--sf-color-surface, #fff);
}

.sf-payment-method {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border: 1px solid var(--sf-color-border, #e5e7eb);
    border-radius: var(--sf-radius, 8px);
    padding: 1rem;
    margin-bottom: .75rem;
}
.sf-payment-method img { max-height: 40px; }

.sf-pagination { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: 1.5rem; }
.sf-pagination-arrow, .sf-pagination-page {
    display: inline-flex;
    align-items: center;
    padding: .4rem .7rem;
    font-size: .9rem;
    line-height: 1;
    border: 1px solid var(--sf-color-border, #e5e7eb);
    border-radius: var(--sf-radius, 8px);
    color: var(--sf-color-text, #1f2937);
    text-decoration: none;
}
.sf-pagination-arrow:hover, .sf-pagination-page:hover { background: var(--sf-color-border, #e5e7eb); text-decoration: none; }
.sf-pagination-disabled { color: var(--sf-color-text-muted, #6b7280); cursor: not-allowed; }
.sf-pagination-disabled:hover { background: none; }
.sf-pagination-current {
    background: var(--sf-color-primary, #1f2937);
    color: var(--sf-color-primary-contrast, #fff);
    border-color: var(--sf-color-primary, #1f2937);
}
.sf-pagination-dots { padding: .4rem .2rem; color: var(--sf-color-text-muted, #6b7280); }

/* Seitenmenues (Seitenmenue 1/2, siehe /admin/menuestruktur) - wird nur
   gerendert, wenn mindestens eines der beiden Seitenmenues befuellt ist
   (siehe @if in den Theme-Layouts), daher hier bewusst kein "unsichtbar,
   falls leer"-Sonderfall noetig. .sf-content-with-sidebar uebernimmt die
   Breiten-/Zentrierungsrolle von .sf-main (s.o.) - .sf-main selbst wird
   innerhalb dieses Wrappers auf volle verfuegbare Breite zurueckgesetzt,
   behaelt aber seinen vertikalen Abstand (padding-top/bottom oben). */
.sf-content-with-sidebar {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    gap: 2.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}
.sf-content-with-sidebar .sf-main {
    max-width: none;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
    flex: 1 1 0;
    min-width: 0;
}
.sf-sidebar {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 2rem;
}
.sf-sidebar-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.sf-sidebar-menu a {
    display: block;
    padding: .5rem .75rem;
    border-radius: var(--sf-radius, 8px);
    color: var(--sf-color-text, #1f2937);
}
.sf-sidebar-menu a:hover { background: var(--sf-color-surface, #f4f5f7); text-decoration: none; }

@media (max-width: 720px) {
    .sf-content-with-sidebar { flex-direction: column; gap: 1.5rem; }
    .sf-sidebar { flex: 1 1 auto; width: 100%; padding-top: 0; }
}
