/* ==========================================================================
   Eigener Zeitraum-Kalender (range-picker.js): groß, gut antippbar,
   Anreise und Abreise in Tanne, der Zeitraum dazwischen hell hinterlegt.
   ========================================================================== */

.rp { position: relative; color: var(--torf); }
.rp__nav {
  position: absolute;
  top: -0.35rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.rp__arrow {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--wiese);
  cursor: pointer;
  pointer-events: auto;
}
.rp__arrow:hover { background: var(--himmel); }
.rp__arrow:disabled { opacity: 0.25; cursor: default; background: transparent; }
.rp__arrow svg { width: 20px; height: 20px; }

.rp__months { display: grid; grid-template-columns: repeat(var(--months, 1), minmax(0, 1fr)); gap: var(--space-6); }
.rp__title { margin: 0 0 var(--space-3); text-align: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; line-height: 30px; max-width: none; }
.rp__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 4px; }
.rp__wd { padding-bottom: 0.35rem; text-align: center; font-size: 0.75rem; font-weight: 700; color: var(--torf-leise); }
.rp__day {
  position: relative;
  aspect-ratio: 1;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--torf);
  font: 500 0.95rem/1 var(--font-text);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  z-index: 0;
}
.rp__day::before {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  z-index: -1;
  transition: background-color 120ms ease;
}
.rp__day:hover::before { background: var(--himmel); }
.rp__day:disabled { color: #b9bfb6; cursor: default; }
.rp__day:disabled::before { background: transparent; }
.rp__day.is-today { font-weight: 800; text-decoration: underline; text-underline-offset: 0.25em; }
.rp__day.is-in,
.rp__day.is-preview { background: rgb(63 106 90 / 0.14); }
.rp__day.is-preview { background: rgb(63 106 90 / 0.08); }
.rp__day.is-start,
.rp__day.is-end { color: #fff; font-weight: 700; }
.rp__day.is-start::before,
.rp__day.is-end::before { background: var(--wiese); }
/* Band hinter Start und Ende, damit der Zeitraum durchgehend wirkt */
.rp__day.band-r { background: linear-gradient(to right, transparent 50%, rgb(63 106 90 / 0.14) 50%); }
.rp__day.band-l { background: linear-gradient(to left, transparent 50%, rgb(63 106 90 / 0.14) 50%); }
.rp__day:focus-visible { outline: 3px solid var(--focus); outline-offset: -2px; border-radius: 50%; }

.rp__summary { margin: var(--space-4) 0 0; text-align: center; font-size: var(--fs-sm); color: var(--torf-leise); max-width: none; }
.rp__summary strong { color: var(--torf); }

/* Feld mit aufklappendem Kalender (Preisrechner) */
.rp-field { position: relative; }
.rp-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  min-height: 48px;
  padding: 0 0.9rem;
  border: 1.5px solid #9aa79f;
  border-radius: var(--radius-s);
  background: #fff;
  color: var(--torf);
  font: 500 1rem/1.3 var(--font-text);
  text-align: left;
  cursor: pointer;
}
.rp-trigger:hover,
.rp-trigger[aria-expanded="true"] { border-color: var(--wiese); }
.rp-trigger svg { width: 20px; height: 20px; flex: none; color: var(--wiese); }
.rp-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 20;
  width: min(42rem, calc(100vw - 2 * var(--gutter)));
  padding: var(--space-5);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 60px -20px rgb(36 33 28 / 0.45), 0 0 0 1px rgb(36 33 28 / 0.06);
}
.rp-pop[hidden] { display: none; }
@media (max-width: 600px) {
  .rp-pop { width: 100%; padding: var(--space-4) var(--space-3); }
  .rp__day { min-height: 38px; }
}
