/* Rentable Daterange Picker controls layout */
.rdp-controls-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 6px;
}

/* Make native field wrappers share the row nicely */
.rdp-controls-row > .form-item,
.rdp-controls-row > .form-datetime-wrapper,
.rdp-controls-row > .js-form-wrapper.form-wrapper {
  flex: 1 1 240px;
  min-width: 240px;
}

/* Reset button appearance and spacing */
.rdp-controls-row .rdp-reset.button {
  flex: 0 0 auto;
}

/* Error message consistency */
.form-item__error-message {
  color: var(--color-error, #e55353);
}

/* Hover-/Focus-Feedback für verfügbare Kalendertage (grauer Kreis) */
.rdp-day {
  position: relative;
  display: grid;           /* Zahl mittig zentrieren */
  place-items: center;     /* sowohl horizontal als auch vertikal */
  text-align: center;      /* Fallback */
}
.rdp-day:hover, .rdp-day:focus { outline: none; }

/* Nur für wirklich wählbare Tage einblenden: nicht disabled, nicht gebucht, nicht Start/Ende */
.rdp-day:not(.rdp-day--disabled):not(.rdp-day--booked):not(.rdp-day--start):not(.rdp-day--end):hover::before,
.rdp-day:not(.rdp-day--disabled):not(.rdp-day--booked):not(.rdp-day--start):not(.rdp-day--end):focus-visible::before,
/* Kanten von Buchungen sollen ebenfalls wählbar sein: erlauben Hover auf booked-start/-end */
.rdp-day.rdp-day--booked-start:not(.rdp-day--disabled):not(.rdp-day--start):not(.rdp-day--end):hover::before,
.rdp-day.rdp-day--booked-start:not(.rdp-day--disabled):not(.rdp-day--start):not(.rdp-day--end):focus-visible::before,
.rdp-day.rdp-day--booked-end:not(.rdp-day--disabled):not(.rdp-day--start):not(.rdp-day--end):hover::before,
.rdp-day.rdp-day--booked-end:not(.rdp-day--disabled):not(.rdp-day--start):not(.rdp-day--end):focus-visible::before {
  content: '';
  position: absolute;
  inset: 2px; /* kleiner Innenabstand, damit der Kreis nicht anstößt */
  border-radius: 999px;
  background-color: transparent;  /* Zahl nicht verdecken */
  border: 2px solid #cfd4da;      /* grauer Kreis als Rand */
  pointer-events: none;
}

/* Optional: aktives Drücken etwas dunkler */
.rdp-day:not(.rdp-day--disabled):not(.rdp-day--booked):not(.rdp-day--start):not(.rdp-day--end):active::before,
.rdp-day.rdp-day--booked-start:not(.rdp-day--disabled):not(.rdp-day--start):not(.rdp-day--end):active::before,
.rdp-day.rdp-day--booked-end:not(.rdp-day--disabled):not(.rdp-day--start):not(.rdp-day--end):active::before {
  border-color: #bfc6cc;  /* etwas dunkler beim Drücken */
}

/* Zentrierte Jahresnavigation oberhalb der Monate */
.rdp-yearbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 4px;
  width: 100%;
}
.rdp-year-title {
  font-weight: 600;
  font-size: 1.1rem;
}
.rdp-year-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: #e0e0e0;
  color: #000;
  border: 0;
  cursor: pointer;
}
.rdp-year-nav:hover,
.rdp-year-nav:focus-visible {
  background: #000;
  color: #fff;
}
.rdp-year-nav[disabled] {
  visibility: hidden; /* wie gefordert: bei aktuellem Jahr keinen Zurück-Button zeigen */
}

/* Zeile für Monate + seitliche Monatsnavigation */
.rdp-months-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Haupt-Container der Widget-Mount: spaltenweise, zentriert, mit Abstand */
.rdp-mount {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* Container für die Monate */
.rdp-months-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Einheitliche Monatsnavigation (Seitenpfeile) analog zur Jahresnavigation */
.rdp-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  border-radius: 999px;
  background: #e0e0e0;
  color: #000;
  border: 0;
  cursor: pointer;
}
.rdp-nav:hover,
.rdp-nav:focus-visible {
  background: #000;
  color: #fff;
}
.rdp-nav[disabled],
.rdp-nav[aria-disabled="true"] {
  cursor: default;
  opacity: .6;
}
