/* ==========================================================================
   Räume & Flächen — page-specific styles.
   Reuses --pg-bg/--pg-ink, fonts and the pgBlob animation already defined
   in playground.css (loaded first — see functions.php dependency).
   The pop-booking plugin owns the JS behaviour; this file is presentation
   only, per "Theme bekommt Page-Templates und CSS, kein Buchungscode im
   Theme".
   ========================================================================== */

/* Several elements below (calendar panels, the sheet, its states) are
   toggled via the `hidden` attribute and also carry an explicit
   `display:flex`/`display:grid` rule for when they ARE shown. Without
   this, the class rule's `display` wins over the browser's own
   `[hidden]{display:none}` default (same specificity trap as a plain
   class beating an attribute selector) and the element stays visible
   regardless of `hidden`. One global override fixes all of them. */
[hidden] { display: none !important; }

.pop-raeume {
  font-family: "BasisMono", ui-monospace, monospace;
  padding: clamp(118px,17svh,190px) clamp(20px,4vw,56px) clamp(60px,10vh,120px);
  display: flex;
  flex-direction: column;
  gap: clamp(34px,6vh,64px);
  align-items: center;
}

.pop-hero { width: 100%; max-width: 1240px; }
.pop-hero-title {
  font-family: "NeueMontreal", ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: max(46px, min(8.5vw, 12vh, 96px));
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0;
}
.pop-hero-intro {
  font-size: clamp(12.5px,1.4vmin,13px);
  letter-spacing: .045em;
  line-height: 1.6;
  margin-top: clamp(18px,3vh,34px);
  max-width: 660px;
}

/* Area detail cards */
.pop-area {
  width: 100%;
  max-width: 1240px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%,340px),1fr));
  gap: clamp(20px,3vw,48px);
  align-items: start;
  border-top: 1px solid var(--pg-ink);
  padding-top: clamp(24px,4vh,46px);
}
.pop-photo-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 14px;
  border: 1px dashed var(--pg-ink);
  opacity: .55;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  letter-spacing: .08em;
  gap: 6px;
}
.pop-photo-placeholder span { font-size: 10px; opacity: .7; }

.pop-area-text { display: flex; flex-direction: column; gap: clamp(14px,2.2vh,22px); }
.pop-area-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 10.5px;
  letter-spacing: .2em;
}
.pop-area-kind { opacity: .65; }
.pop-area-title {
  font-family: "NeueMontreal", ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: clamp(26px,3.6vw,48px);
  line-height: 1.03;
  letter-spacing: -.02em;
  margin: 0;
}
.pop-area-desc {
  font-size: clamp(12.5px,1.4vmin,13px);
  line-height: 1.7;
  letter-spacing: .035em;
  max-width: 46em;
}
.pop-area-note {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11.5px;
  letter-spacing: .08em;
  line-height: 1.55;
  border-top: 1px solid var(--pg-ink);
  border-bottom: 1px solid var(--pg-ink);
  padding: clamp(12px,1.8vh,18px) 0;
}
.pop-label { opacity: .6; }

.pop-blob-link {
  display: inline-block;
  border: 1.5px solid var(--pg-ink);
  border-radius: 52% 48% 43% 57% / 57% 42% 58% 43%;
  animation: pgBlob 10s ease-in-out infinite;
  padding: clamp(15px,2.4vh,20px) clamp(22px,3.4vw,34px);
  font-size: clamp(11.5px,1.3vmin,12px);
  letter-spacing: .2em;
  transition: background .3s ease, color .3s ease;
}
.pop-blob-link:hover { background: var(--pg-ink); color: var(--pg-bg); opacity: 1; }
.pop-area-cta { align-self: flex-start; }

/* Generic section */
.pop-section { width: 100%; max-width: 1240px; display: flex; flex-direction: column; gap: clamp(16px,2.6vh,26px); }
.pop-section-title {
  font-family: "NeueMontreal", ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: clamp(28px,5vw,64px);
  line-height: 1.02;
  letter-spacing: -.02em;
  margin: 0;
}
.pop-section-intro { font-size: clamp(12.5px,1.4vmin,13px); line-height: 1.65; letter-spacing: .045em; max-width: 50em; }
#kalender { border-top: 1px solid var(--pg-ink); padding-top: clamp(34px,6vh,70px); }

.pop-step-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; }
.pop-step-title {
  font-family: "NeueMontreal", ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: clamp(20px,2.4vw,30px);
  line-height: 1;
  letter-spacing: -.015em;
  margin: 0;
}

/* Area chips */
.pop-chips { display: flex; flex-wrap: wrap; gap: clamp(8px,1.4vw,14px); }
.pop-chip {
  font-family: "BasisMono", ui-monospace, monospace;
  font-size: clamp(11.5px,1.3vmin,12px);
  letter-spacing: .14em;
  cursor: pointer;
  min-height: 44px;
  padding: clamp(11px,1.5vh,13px) clamp(16px,2.1vw,21px);
  border: 1.5px solid var(--pg-ink);
  border-radius: 52% 48% 43% 57% / 57% 42% 58% 43%;
  display: flex;
  align-items: baseline;
  gap: 10px;
  background: transparent;
  color: var(--pg-ink);
  transition: background .25s ease, color .25s ease;
}
.pop-chip:hover { opacity: .75; }
.pop-chip.is-active { background: var(--pg-ink); color: var(--pg-bg); }
.pop-chip-rate { font-size: 9px; letter-spacing: .1em; opacity: .7; }

/* Week grid */
.pop-week-nav { display: flex; align-items: center; gap: 10px; }
.pop-week-nav button {
  background: transparent;
  border: 1px solid var(--pg-ink);
  color: var(--pg-ink);
  font-family: "BasisMono", ui-monospace, monospace;
  font-size: 12px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.pop-week-nav button:hover { background: var(--pg-ink); color: var(--pg-bg); }
.pop-week-nav button:disabled { opacity: .35; cursor: default; }
#pop-week-label { font-size: clamp(11.5px,1.25vmin,12px); letter-spacing: .12em; min-width: 11em; text-align: center; }
.pop-calendar-note { font-size: clamp(11.5px,1.25vmin,12px); letter-spacing: .06em; line-height: 1.6; opacity: .75; max-width: 52em; margin: 0; }

.pop-calendar-hourly { overflow-x: auto; }
.pop-week-table { min-width: 560px; display: flex; flex-direction: column; gap: 3px; }
.pop-week-row { display: grid; grid-template-columns: 46px repeat(7,minmax(0,1fr)); gap: 3px; }
.pop-week-day { text-align: center; padding-bottom: 6px; font-size: 10.5px; letter-spacing: .1em; line-height: 1.35; }
.pop-week-day.is-dim { opacity: .5; }
.pop-week-daynum { font-family: "NeueMontreal", ui-sans-serif, sans-serif; font-weight: 500; font-size: clamp(13px,1.6vw,17px); letter-spacing: 0; }
.pop-week-hour-label { font-size: 9px; letter-spacing: .06em; opacity: .5; display: flex; align-items: center; }
.pop-week-cell {
  height: clamp(28px,2.4vh,30px);
  border: 1px solid var(--pg-ink);
  border-radius: 4px;
  font-family: "BasisMono", ui-monospace, monospace;
  font-size: 8px;
  padding: 0;
  background: transparent;
  color: var(--pg-ink);
  transition: background .15s ease;
}
.pop-week-cell.is-free { cursor: pointer; opacity: .55; }
.pop-week-cell.is-free:hover { opacity: .85; }
.pop-week-cell.is-selected { cursor: pointer; background: var(--pg-ink); color: var(--pg-bg); opacity: 1; }
.pop-week-cell.is-booked { background: var(--pg-ink); opacity: .5; cursor: not-allowed; }
.pop-week-cell.is-buffer { border-style: dashed; opacity: .4; cursor: not-allowed; }
.pop-week-cell.is-outside,
.pop-week-cell.is-leadtime { opacity: .12; cursor: not-allowed; }

.pop-legend { display: flex; flex-wrap: wrap; gap: clamp(12px,2.4vw,26px); font-size: 9px; letter-spacing: .1em; opacity: .65; margin-top: clamp(12px,2vh,18px); }
.pop-legend-item { display: flex; align-items: center; gap: 7px; }
.pop-legend-swatch { width: 12px; height: 12px; border: 1px solid var(--pg-ink); border-radius: 3px; display: inline-block; }
.pop-legend-swatch.is-free { opacity: .55; }
.pop-legend-swatch.is-selected { background: var(--pg-ink); opacity: 1; }
.pop-legend-swatch.is-booked { background: var(--pg-ink); opacity: .5; }
.pop-legend-swatch.is-buffer { border-style: dashed; opacity: .4; }
.pop-legend-swatch.is-outside { opacity: .12; }

/* Month picker */
.pop-calendar-monthly,
.pop-variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,145px),1fr)); gap: 10px; }
.pop-month-card,
.pop-variant-card {
  text-align: left;
  cursor: pointer;
  font-family: "BasisMono", ui-monospace, monospace;
  border: 1px solid var(--pg-ink);
  border-radius: 12px;
  min-height: 66px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: transparent;
  color: var(--pg-ink);
  transition: background .25s ease, color .25s ease;
}
.pop-month-card span:first-child,
.pop-variant-card span:first-child { font-size: 11px; letter-spacing: .14em; }
.pop-month-state,
.pop-variant-price { font-size: 14px; font-family: "NeueMontreal", ui-sans-serif, sans-serif; font-weight: 500; }
.pop-month-card.is-selected,
.pop-variant-card.is-selected { background: var(--pg-ink); color: var(--pg-bg); }
.pop-month-card.is-taken { opacity: .35; cursor: not-allowed; }

/* Summary bar */
.pop-summary {
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(16px,3vw,32px);
}
.pop-summary-text { display: flex; flex-direction: column; gap: 7px; }
.pop-summary-label { font-size: 10.5px; letter-spacing: .2em; opacity: .65; }
.pop-summary-note { font-size: clamp(12.5px,1.4vmin,13px); letter-spacing: .05em; line-height: 1.6; max-width: 32em; }
.pop-summary-total {
  font-family: "NeueMontreal", ui-sans-serif, sans-serif;
  font-weight: 500;
  font-size: clamp(30px,4.4vw,56px);
  line-height: 1;
  letter-spacing: -.02em;
  margin-top: 6px;
}
.pop-cta-error { width: 100%; max-width: 1240px; font-size: 11px; letter-spacing: .08em; color: var(--pg-ink); opacity: .85; margin: -12px 0 0; }

.pop-blob-btn {
  font-family: "BasisMono", ui-monospace, monospace;
  font-size: clamp(11.5px,1.3vmin,12px);
  letter-spacing: .2em;
  border: 1.5px solid var(--pg-ink);
  border-radius: 52% 48% 43% 57% / 57% 42% 58% 43%;
  animation: pgBlob 9s ease-in-out infinite;
  padding: clamp(16px,2.6vh,22px) clamp(24px,3.8vw,38px);
  cursor: pointer;
  background: transparent;
  color: var(--pg-ink);
  opacity: .55;
  transition: background .3s ease, color .3s ease, opacity .2s ease;
}
.pop-blob-btn:hover { opacity: 1; }
.pop-blob-btn.is-active { background: var(--pg-ink); color: var(--pg-bg); opacity: 1; }

/* Host CTA + footer */
.pop-host-links { display: flex; flex-wrap: wrap; gap: clamp(10px,1.6vw,16px); }
.pop-page-footer {
  width: 100%;
  max-width: 1240px;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(18px,4vw,56px);
  font-size: clamp(12.5px,1.4vmin,13px);
  letter-spacing: .045em;
  line-height: 1.6;
  border-top: 1px solid var(--pg-ink);
  padding-top: clamp(24px,4vh,44px);
}

/* Booking sheet */
body.pop-sheet-open { overflow: hidden; }
.pop-sheet-overlay { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.pop-sheet-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.pop-sheet {
  position: relative;
  width: 100%;
  max-width: 720px;
  max-height: 92svh;
  overflow: auto;
  background: var(--pg-bg);
  border: 1.5px solid var(--pg-ink);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: clamp(22px,3.4vh,38px) clamp(18px,3.4vw,44px) calc(clamp(28px,4vh,44px) + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: clamp(14px,2.2vh,22px);
  color: var(--pg-ink);
  font-family: "BasisMono", ui-monospace, monospace;
}
.pop-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.pop-sheet-step { font-size: 10.5px; letter-spacing: .2em; opacity: .65; }
.pop-sheet-title { font-family: "NeueMontreal", ui-sans-serif, sans-serif; font-weight: 500; font-size: clamp(24px,3.4vw,40px); line-height: 1.05; letter-spacing: -.015em; margin: 8px 0 0; }
.pop-sheet-close {
  flex: 0 0 auto;
  background: transparent;
  border: 1.5px solid var(--pg-ink);
  color: var(--pg-ink);
  font-family: "BasisMono", ui-monospace, monospace;
  font-size: 14px;
  width: 44px;
  height: 44px;
  border-radius: 52% 48% 43% 57% / 57% 42% 58% 43%;
  cursor: pointer;
}
.pop-sheet-close:hover { background: var(--pg-ink); color: var(--pg-bg); }

.pop-sheet-meta {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(14px,3vw,34px);
  font-size: clamp(11.5px,1.25vmin,12px);
  letter-spacing: .08em;
  line-height: 1.5;
  border-top: 1px solid var(--pg-ink);
  border-bottom: 1px solid var(--pg-ink);
  padding: clamp(12px,1.8vh,18px) 0;
}

.pop-sheet-form { display: flex; flex-direction: column; gap: clamp(12px,1.8vh,16px); }
.pop-sheet-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%,220px),1fr)); gap: clamp(10px,1.6vw,14px); }
.pop-sheet-fields input {
  background: transparent;
  color: var(--pg-ink);
  border: 1px solid var(--pg-ink);
  border-radius: 12px;
  padding: 15px 16px;
  font-size: 16px;
  letter-spacing: .04em;
  outline: none;
  width: 100%;
  min-height: 52px;
  font-family: "BasisMono", ui-monospace, monospace;
}
.pop-sheet-fields input::placeholder { color: var(--pg-ink); opacity: .45; }

.pop-agb-row { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: clamp(11.5px,1.2vmin,11.5px); letter-spacing: .06em; line-height: 1.55; }
.pop-agb-row input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }

.pop-form-error { font-size: 11px; letter-spacing: .06em; color: var(--pg-ink); margin: 0; }
.pop-sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(12px,2vw,20px); }
.pop-sheet-actions .pop-blob-btn { opacity: 1; background: var(--pg-ink); color: var(--pg-bg); }
.pop-sheet-actions .pop-blob-btn:disabled { opacity: .5; cursor: default; }

.pop-sheet-done { display: flex; flex-direction: column; gap: 14px; border: 1px solid var(--pg-ink); border-radius: 14px; padding: clamp(16px,2.4vh,24px); }
.pop-sheet-done h3 { font-family: "NeueMontreal", ui-sans-serif, sans-serif; font-weight: 500; font-size: clamp(18px,2.2vw,26px); line-height: 1.15; margin: 0; }
.pop-sheet-done p { font-size: clamp(12.5px,1.4vmin,13px); line-height: 1.7; letter-spacing: .035em; margin: 0; }
.pop-done-note { font-size: 10.5px; letter-spacing: .06em; opacity: .6; }

@media (max-width: 640px) {
  .pop-week-table { min-width: 480px; }
}
