/* BAUSTEINE.CSS — Standalone-Styling für server-gerenderte bk-* Bausteine
 * Geladen NUR im Generator-Modus (isGeneratorMode=true, PageRenderer.php).
 * Kein globaler Reset — Selektoren auf bk-*/vl-baustein-Container gescopt.
 * Alle CSS-Variablen mit Fallback-Werten, da Datei statisch ausgeliefert wird.
 *
 * Abgedeckte Bausteine (BausteinResolver.php):
 *   kalender · kontakt · oeffnungszeiten · nachrichten · galerie
 */

/* ── Box-Model-Reset innerhalb der Bausteine ─────────────────────────── */
.vl-baustein *,
.vl-baustein *::before,
.vl-baustein *::after,
.bk-lightbox *,
.bk-lightbox *::before,
.bk-lightbox *::after {
  box-sizing: border-box;
}

/* ── Äußerer Baustein-Container (<section class="vl-baustein …">) ──────── */
.vl-baustein {
  padding: 64px 24px;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

/* ── Zentrierender Innen-Wrapper ─────────────────────────────────────── */
.vl-baustein .bk-wrap {
  max-width: 1180px;
  margin: 0 auto;
}

/* ── Sektions-Kopf (Eyebrow + H2) ────────────────────────────────────── */
.vl-baustein .bk-section-head {
  margin-bottom: 40px;
}

.vl-baustein .bk-section-head h2 {
  font-size: clamp(24px, 3vw, 36px);
  margin: 0;
  font-weight: 600;
  color: var(--ink, #111827);
  line-height: 1.2;
}

.vl-baustein .bk-eyebrow {
  display: block;
  color: var(--muted, #6b7280);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  margin-bottom: 10px;
}

/* ── Button ──────────────────────────────────────────────────────────── */
.vl-baustein .bk-btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius, 6px);
  background: var(--primary, #2563eb);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.15s;
  font-family: inherit;
  line-height: 1.4;
}

.vl-baustein .bk-btn:hover {
  filter: brightness(0.9);
}

/* ═══════════════════════════════════════════════════════════════════════
   ÖFFNUNGSZEITEN
   Struktur: .bk-info-card > .bk-hours-row × 7
   Jede Zeile: .bk-hours-day (Tag-Kürzel) + span (Zeiten / "geschlossen")
   ═══════════════════════════════════════════════════════════════════════ */

.vl-baustein--oeffnungszeiten .bk-info-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 8px);
  padding: 8px 0;
  background: var(--card, var(--bg, #fff));
  max-width: 480px;
}

.bk-hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--ink, #111827);
  border-radius: 4px;
}

.bk-hours-row:nth-child(even) {
  background: rgba(0, 0, 0, 0.03);
}

.bk-hours-row.closed {
  opacity: 0.38;
}

.bk-hours-day {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--muted, #6b7280);
  font-weight: 600;
  min-width: 28px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════
   KONTAKT-FORMULAR
   Struktur: .bk-content-card > .bk-form.vl-contact-form
             > .bk-field × n (label + input/textarea) + .bk-btn
   ═══════════════════════════════════════════════════════════════════════ */

.vl-baustein--kontakt .bk-content-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 8px);
  padding: 32px 36px;
  background: var(--card, var(--bg, #fff));
  max-width: 660px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .vl-baustein--kontakt .bk-content-card {
    padding: 20px 16px;
  }
}

.bk-form {
  display: grid;
  gap: 16px;
}

.bk-field {
  display: grid;
  gap: 6px;
}

.bk-field label {
  display: block;
  font-size: 13px;
  color: var(--muted, #6b7280);
  font-weight: 500;
  letter-spacing: 0.4px;
  line-height: 1.4;
}

.bk-field input,
.bk-field textarea {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: var(--radius, 6px);
  font-family: inherit;
  font-size: 15px;
  background: var(--bg, #fff);
  color: var(--ink, #111827);
  transition: border-color 0.15s, outline-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

.bk-field input:focus,
.bk-field textarea:focus {
  outline: 2px solid var(--primary, #2563eb);
  outline-offset: -1px;
  border-color: var(--primary, #2563eb);
}

.bk-field textarea {
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════
   GALERIE
   Struktur: .bk-gallery > .bk-gallery-tile × n (button > img)
   ═══════════════════════════════════════════════════════════════════════ */

.vl-baustein--galerie .bk-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 700px) {
  .vl-baustein--galerie .bk-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

.bk-gallery-tile {
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #ddd;
  border-radius: var(--radius, 6px);
  padding: 0;
  border: 0;
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.bk-gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

.bk-gallery-tile:hover img {
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════
   KALENDER
   Struktur: .bk-content-card > #vl-booking[data-slug][data-privacy-url]
   Das Booking-Widget stylt sich selbst via booking-widget.js + CSS-Variablen.
   .bk-content-card-Styling gilt allgemein (s. Kontakt oben), hier Alias:
   ═══════════════════════════════════════════════════════════════════════ */

.vl-baustein--kalender .bk-content-card {
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius, 8px);
  padding: 32px 36px;
  background: var(--card, var(--bg, #fff));
  max-width: 660px;
  margin: 0 auto;
}

@media (max-width: 600px) {
  .vl-baustein--kalender .bk-content-card {
    padding: 20px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   NACHRICHTEN
   Struktur: zentrierter CTA-Button (scrollt zur Kontakt-Sektion)
   ═══════════════════════════════════════════════════════════════════════ */

.vl-baustein--nachrichten .bk-section-head {
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════
   LIGHTBOX (von BausteinResolver::lightboxOverlayHtml(), Galerie-Baustein)
   Struktur: .vl-lb.bk-lightbox > .bk-lb-close + .bk-lb-prev +
             .bk-lb-figure(.bk-lb-img + .bk-lb-caption) + .bk-lb-next +
             .bk-lb-counter
   ═══════════════════════════════════════════════════════════════════════ */

.vl-lb.bk-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
}

.vl-lb.bk-lightbox.open {
  display: flex;
}

.bk-lb-figure {
  margin: 0;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.bk-lb-img {
  max-width: 92vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  display: block;
}

.bk-lb-caption {
  color: #fff;
  font-size: 14px;
  text-align: center;
  max-width: 80vw;
  opacity: 0.9;
  margin: 0;
}

.bk-lb-close,
.bk-lb-prev,
.bk-lb-next {
  position: absolute;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  padding: 0;
}

.bk-lb-close:hover,
.bk-lb-prev:hover,
.bk-lb-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.bk-lb-close {
  top: 16px;
  right: 16px;
  font-size: 32px;
}

.bk-lb-prev {
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.bk-lb-next {
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
}

.bk-lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 13px;
  opacity: 0.7;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .bk-lb-close,
  .bk-lb-prev,
  .bk-lb-next {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }
  .bk-lb-close {
    font-size: 26px;
    top: 10px;
    right: 10px;
  }
  .bk-lb-prev {
    left: 8px;
  }
  .bk-lb-next {
    right: 8px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   COOKIE-BANNER (frontend/public/js/cookie-banner.js)
   Existierte bisher nur in base.css (Legacy-Pfad) — im Generator-Modus lädt
   base.css nicht, der Banner war dadurch komplett unstyled (nackter Browser-
   Default statt Theme-Look).
   ═══════════════════════════════════════════════════════════════════════ */

.bk-cookie-banner {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 200;
  background: var(--ink, #111827);
  color: #fff;
  padding: 16px 20px;
  border-radius: var(--radius, 6px);
  display: flex;
  gap: 16px;
  align-items: center;
  font-size: 14px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.bk-cookie-banner.hidden {
  display: none;
}

.bk-cookie-banner button {
  padding: 8px 16px;
  background: var(--primary, #2563eb);
  color: #fff;
  border: none;
  border-radius: var(--radius, 4px);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
