:root {
  /* Airbnb-artiges Design-System: großzügige Rundungen, weiche mehrstufige
     Schatten, warme neutrale Grautöne — statt Airbnbs Korallrot hier ein
     helles, freundliches Blau als Akzentfarbe. */
  --color-bg: #ffffff;
  --color-surface: #f7f6f4;
  --color-border: #e4e1db;
  --color-text: #22201d;
  --color-text-muted: #6b6660;
  --color-accent: #1e9dff;
  --color-accent-dark: #0b7fd9;
  --color-accent-light: #eaf6ff;
  --color-success: #2f7a4d;
  --color-success-bg: #eaf5ee;
  --color-warning: #b6790a;
  --color-warning-bg: #fdf3e0;
  --color-danger: #b3261e;
  --color-danger-bg: #fbeae9;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;
  --radius-full: 999px;
  --shadow-sm: 0 2px 8px rgba(20, 18, 15, 0.06), 0 1px 2px rgba(20, 18, 15, 0.04);
  --shadow-md: 0 12px 32px rgba(20, 18, 15, 0.1);
  --max-width: 1120px;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

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

p {
  margin: 0 0 1em;
}

a {
  color: var(--color-accent);
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 2rem 0;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

/* Airbnb-artiges Listing-Layout: Titel, breite Galerie, dann zwei Spalten
   (Beschreibung/Ausstattung links, sticky Buchungs-Karte rechts). */
.listing-header {
  padding-bottom: 1rem;
}

.listing-header h1 {
  margin: 0;
}

.listing-gallery {
  margin: 0 auto;
  max-width: var(--max-width);
  padding: 0 1.25rem;
}

.listing-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

.listing-block h2 {
  font-size: 1.15rem;
}

.listing-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 1.75rem 0;
}

.amenities-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.6rem 1.5rem;
}

.amenities-grid li {
  position: relative;
  padding-left: 1.4em;
}

.amenities-grid li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-accent);
  font-weight: 700;
}

.amenities-card {
  padding: 1.25rem 1.5rem;
}

#apartment-price {
  margin-bottom: 1rem;
}

/* Kompakte "Fakten"-Zeile (Personenzahl, Endreinigungspreis) unter der
   Beschreibung — wird nur eingeblendet, wenn der Admin diese Werte gepflegt hat. */
.fact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 1.25rem 0;
}

.fact-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.fact-item strong {
  font-size: 1.05rem;
}

.fact-item span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.imprint-card {
  margin-top: 1rem;
}

.imprint-card h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.imprint-card p {
  margin: 0;
  white-space: pre-line;
  color: var(--color-text-muted);
}

.booking-card-hint {
  font-size: 0.8rem;
  margin: 0.75rem 0 0;
}

/* Formular klappt erst auf, sobald im Kalender ein vollständiger Zeitraum
   gewählt ist (app.js togglet is-expanded). Grid-Trick statt max-height, damit
   die Höhe nicht geraten werden muss und der Inhalt sauber rein-/rauswächst. */
.booking-request-reveal {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.booking-request-reveal.is-expanded {
  grid-template-rows: 1fr;
}

.booking-request-reveal-inner {
  overflow: hidden;
}

@media (min-width: 860px) {
  .listing-layout {
    grid-template-columns: 1.6fr 1fr;
  }

  .listing-sidebar {
    position: sticky;
    top: 1.5rem;
  }
}

/* Beschreibung auf wenige Zeilen kürzen, mit "Mehr anzeigen"-Toggle
   (apartment-info.js blendet den Button nur ein, wenn wirklich gekürzt wurde). */
.description-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
}

.description-text.is-expanded {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.description-toggle {
  display: block;
  margin-top: 0.5rem;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  color: var(--color-text);
  cursor: pointer;
}

/* Sticky Preis-/CTA-Leiste am unteren Bildschirmrand, wie bei Airbnb mobil —
   auf Desktop unsichtbar, da dort die Buchungs-Karte ohnehin sticky sichtbar ist. */
.mobile-book-bar {
  display: none;
}

@media (max-width: 859px) {
  .mobile-book-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border);
    padding: 0.8rem 1.25rem calc(0.8rem + env(safe-area-inset-bottom));
    box-shadow: 0 -4px 16px rgba(20, 18, 15, 0.08);
  }

  .mobile-book-bar strong {
    font-size: 0.95rem;
    font-weight: 700;
  }

  body {
    padding-bottom: 4.5rem;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7em 1.4em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.05s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-accent-dark);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--color-surface);
}

.btn-danger {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--color-danger);
  color: #fff;
}

.btn-sm {
  padding: 0.4em 0.9em;
  font-size: 0.85rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Einheitliches Aussehen für alle Texteingaben, nicht nur innerhalb von
   .field — betrifft z. B. auch die per JS erzeugten Tabellenzeilen im Admin
   (Preisstufen, Saisonzeiten, Rabattcodes), die vorher ohne eigene Klasse mit
   reinem Browser-Standardstil dastanden. Checkbox/Radio/File bewusst nicht
   erfasst, die bleiben nativ. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="url"],
input[type="search"],
textarea,
select {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.65em 0.8em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--color-accent);
  outline-offset: 1px;
}

.field-checkbox {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.25em 0.6em;
  border-radius: 999px;
}

.badge-requested {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.badge-confirmed {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.badge-cancelled {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.notice {
  border-radius: var(--radius-md);
  padding: 0.9em 1.1em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.notice-success {
  background: var(--color-success-bg);
  color: var(--color-success);
}

.notice-error {
  background: var(--color-danger-bg);
  color: var(--color-danger);
}

.notice-warning {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}

.muted {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

footer.site-footer {
  padding: 2rem 0;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

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

.skip-link {
  position: absolute;
  top: -3rem;
  left: 0.5rem;
  z-index: 100;
  background: var(--color-accent);
  color: #fff;
  padding: 0.6em 1em;
  border-radius: var(--radius-sm);
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0.5rem;
}

.btn-link {
  display: inline-block;
  margin: 0 0 1rem;
  padding: 0;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 400;
  text-decoration: underline;
  color: var(--color-accent);
  cursor: pointer;
}

/* Gleicher Grid-Trick wie .booking-request-reveal — generisch für einzelne
   Formularfelder, die erst nach Klick auf einen Text-Button erscheinen sollen. */
.field-reveal {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease;
}

.field-reveal.is-expanded {
  grid-template-rows: 1fr;
}

.field-reveal-inner {
  overflow: hidden;
}

.location-map {
  margin: 0.75rem 0;
}

.location-map iframe {
  width: 100%;
  height: 260px;
  border: 0;
  border-radius: var(--radius-md);
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1.25rem;
  margin-top: 0.75rem;
  font-size: 0.82rem;
}

.legal-nav a {
  color: var(--color-text-muted);
}

.legal-content {
  max-width: 720px;
}

.guestbook-form {
  max-width: 480px;
  margin: 1.25rem 0 2rem;
}

.guestbook-teaser {
  text-align: center;
}

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

.guestbook-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.guestbook-entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
}

.guestbook-entry-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.4rem;
}

.guestbook-entry-header strong {
  font-size: 0.95rem;
}

.guestbook-entry-header time {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.guestbook-entry p {
  margin: 0;
  white-space: pre-line;
}

/* Coming-Soon/Passwort-Seite (coming-soon.html) — zentrierte Karte, unabhängig
   vom sonstigen Listing-Layout. */
.gate-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.gate-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
}

.gate-card h1 {
  margin-top: 0;
}

.gate-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1.25rem;
}

.gate-card form {
  text-align: left;
  margin-top: 1rem;
}
