/* ============================================================
   Reservierung — Kalender-Styles
   ============================================================ */

.reservierung-intro {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 2rem 0;
  color: #555;
  font-size: 1rem;
  line-height: 1.6;
}

.reservierung-section {
  padding: 1.5rem 2rem 4rem;
  max-width: 1100px;
  margin: 0 auto;
}

.reservierung-after {
  padding-top: 0;
  padding-bottom: 3rem;
}

/* --- Wochen-Navigation --- */
.week-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  position: sticky;
  top: 68px; /* same as fixed site-nav height */
  background: #fff;
  z-index: 5;
}

.week-nav button {
  background: none;
  border: 2px solid #ddd;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  color: #555;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.week-nav button:hover {
  border-color: #EB504B;
  color: #EB504B;
}

#week-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: #333;
}

/* --- Scrollbarer Wrapper für schmale Viewports --- */
.calendar-scroll-wrapper {
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 6px;
}

/* --- Kalender-Grid --- */
#calendar-grid {
  display: grid;
  grid-template-columns: 48px repeat(7, 1fr);
  gap: 1px;
  background: #e0e0e0;
  min-width: 560px;
  position: relative;
  user-select: none;
}

/* --- Kopfzeile (Wochentage) --- */
.cal-header-time {
  background: #f5f5f5;
}

.cal-header-day {
  background: #f5f5f5;
  text-align: center;
  padding: 6px 2px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #444;
  line-height: 1.4;
}

.cal-header-day.is-today {
  color: #EB504B;
  background: #fff5f5;
}

.cal-header-day.is-past {
  color: #bbb;
}

/* --- Zeitzeilen --- */
.cal-time {
  background: #fafafa;
  font-size: 0.62rem;
  color: #999;
  text-align: right;
  padding: 0 4px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 2px;
  white-space: nowrap;
  height: 20px;
  box-sizing: border-box;
}

/* --- Kalender-Zellen --- */
.cal-cell {
  height: 20px;
  background: #fff;
  box-sizing: border-box;
}

.cal-cell.is-past {
  background: #f8f8f8;
}

.cal-cell.is-beyond-cutoff {
  background: #f0f4f8;
  cursor: crosshair;
}

.cal-header-day.is-beyond-cutoff {
  color: #89a;
}

.cal-cell.is-today {
  background: #fff5f5;
}

/* Stundenlinie alle 2 Blöcke */
.cal-cell.hour-start {
  border-top: 1px solid #e8e8e8;
}

.cal-time.hour-start {
  border-top: 1px solid #e8e8e8;
}

/* --- Booking-Overlays --- */
.booking-overlay {
  position: absolute;
  border-radius: 5px;
  overflow: hidden;
  z-index: 2;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3px 6px;
  pointer-events: none;
}

.booking-overlay--confirmed {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.booking-overlay--provisional {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.booking-overlay--provisional::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0px,
    transparent 4px,
    rgba(255, 255, 255, 0.3) 4px,
    rgba(255, 255, 255, 0.3) 8px
  );
  pointer-events: none;
  border-radius: inherit;
}

.booking-overlay__label {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 1px;
  width: 100%;
}

.bol-title {
  font-size: 0.63rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.bol-time {
  font-size: 0.57rem;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  line-height: 1.2;
}

/* --- Legende --- */
.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: #555;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-dot.confirmed  { background: #444; }
.legend-dot.provisional {
  background: #0078D4;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0px,
    transparent 3px,
    rgba(255, 255, 255, 0.45) 3px,
    rgba(255, 255, 255, 0.45) 5px
  );
}
.legend-dot.recurring  { background: #78909C; }
.legend-dot.free       { background: #fff; border: 1px solid #ccc; }

/* --- Lade-Zustand --- */
.calendar-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #999;
  font-size: 0.9rem;
}

/* ── Layout: Kalender + Slot-Panel ────────────────────────────────────── */

.reservierung-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
}

.reservierung-cal-col {
  min-width: 0;
}

.reservierung-panel-col {
  display: flex;
  flex-direction: column;
  padding-top: calc(36px + 1rem);
  position: sticky;
  top: 120px; /* 68px nav + 36px week-nav + 16px week-nav margin */
  align-self: start;
}

/* The backoffice "Erfassen" tab runs in an iframe without the public 68px
   site-nav, so the sticky offsets (week-nav top:68px, panel top:120px) would
   leave the calendar scrolling *above* the date row. Reset them to the iframe top. */
.reservierung-admin .week-nav {
  top: 0;
}

.reservierung-admin .reservierung-panel-col {
  top: 52px; /* 36px week-nav + 16px week-nav margin */
}

/* ── Auswahl-Overlay (Drag-to-Select) ─────────────────────────────────── */

.cal-selection {
  position: absolute;
  border-radius: 5px;
  border: 2px solid rgb(235, 80, 75);
  background: rgba(235, 80, 75, 0.12);
  z-index: 3;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.cal-selection__label {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgb(235, 80, 75);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
}

/* Cursor auf freien Zellen */
.cal-cell:not(.is-past) {
  cursor: crosshair;
}

/* ── Slot-Panel ────────────────────────────────────────────────────────── */

.slot-panel {
  border: 1.5px solid #d0d0d0;
  border-radius: 8px;
  padding: 1.5rem;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

#slot-panel-hint {
  color: #777;
  font-size: 0.88rem;
  line-height: 1.6;
  text-align: center;
  padding: 1.5rem 0.5rem;
  border: 1.5px dashed #d0d0d0;
  border-radius: 6px;
  background: #f9f9f9;
}

#slot-panel-hint::before {
  content: '↖';
  display: block;
  font-size: 2rem;
  color: rgb(235, 80, 75);
  margin-bottom: 0.5rem;
  opacity: 0.6;
}

#slot-panel-detail h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #1a1a1a;
  margin: 0 0 0.75rem;
}

.slot-panel__date {
  font-weight: 700;
  color: #333;
  font-size: 0.95rem;
  margin: 0 0 1rem;
}

.slot-panel__times {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.slot-panel__time-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.slot-panel__time-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #aaa;
}

.slot-panel__time-val {
  font-size: 1.35rem;
  font-weight: 800;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1;
}

.slot-panel__time-dash {
  font-size: 0.8rem;
  color: #bbb;
  padding-bottom: 0.2rem;
}

.slot-panel__meta {
  font-size: 0.85rem;
  color: #555;
  margin: 0 0 1.25rem;
  min-height: 1.2em;
}

.btn-buchen {
  width: 100%;
  padding: 0.8rem 1rem;
  background: rgb(235, 80, 75);
  color: #fff;
  border: none;
  border-radius: 5px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-buchen:hover {
  background: #c03030;
}

.slot-panel__notice {
  font-size: 0.82rem;
  color: #555;
  line-height: 1.5;
  margin-bottom: 0.9rem;
}

.slot-panel__notice--warn {
  background: #fff8e6;
  border: 1px solid #f5c842;
  border-radius: 6px;
  padding: 0.75rem 0.9rem;
}

.slot-panel__notice--warn p {
  margin: 0 0 0.4rem;
  font-weight: 500;
  color: #6b5500;
}

.slot-panel__notice a {
  color: rgb(235, 80, 75);
  text-decoration: none;
  font-weight: 600;
}

.slot-panel__notice a:hover {
  text-decoration: underline;
}

/* ── Preis-Panel ─────────────────────────────────────────────────────────── */

.preis-panel {
  margin-top: 1rem;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.2rem 1.5rem;
  background: #fafafa;
}

.preis-panel h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #555;
}

.preis-panel p {
  margin: 0;
  font-size: 0.9rem;
  color: #333;
  line-height: 1.6;
  white-space: pre-wrap;
}

.preis-panel--static { margin-top: 1rem; }

/* RichText-Inhalt im Preis-Panel (WYSIWYG) */
.preis-panel__richtext {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.6;
}

.preis-panel__richtext > :first-child { margin-top: 0; }
.preis-panel__richtext > :last-child { margin-bottom: 0; }

.preis-panel__richtext p { margin: 0 0 0.6em; }

.preis-panel__richtext ul,
.preis-panel__richtext ol {
  margin: 0 0 0.6em;
  padding-left: 1.3em;
}

.preis-panel__richtext li { margin-bottom: 0.2em; }

.preis-panel__richtext table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 0.6em;
}

.preis-panel__richtext th,
.preis-panel__richtext td {
  border: 1px solid #e0e0e0;
  padding: 0.35rem 0.5rem;
  text-align: left;
}

.preis-panel__richtext a {
  color: var(--dust, rgb(235,80,75));
  text-decoration: underline;
}

.preis-panel__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dust, rgb(235,80,75));
  margin-bottom: 0.35rem;
}

/* ── Nutzungsvereinbarung-Link (unter den Preisen) ───────────────────────── */
.nv-link-wrap { margin-top: 0.9rem; }

.nv-link {
  display: inline-block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dust, rgb(235,80,75));
  text-decoration: underline;
}

.nv-link:hover { text-decoration: none; }

/* ── Nutzungsvereinbarung-Checkbox (Buchungsmodal) ───────────────────────── */
.bm-nv-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  line-height: 1.5;
  cursor: pointer;
}

.bm-nv-check input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
  accent-color: var(--dust, rgb(235,80,75));
  cursor: pointer;
}

.bm-nv-check a {
  color: var(--dust, rgb(235,80,75));
  text-decoration: underline;
}

/* ── Buchungs-Modal ────────────────────────────────────────────────────── */

.bm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}

.bm-overlay[hidden] {
  display: none;
}

.bm-card {
  background: #fff;
  border-radius: 10px;
  max-width: 540px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.bm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem 1rem;
  border-bottom: 1px solid #eee;
  flex-shrink: 0;
}

.bm-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #1a1a1a;
}

.bm-close {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #888;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  transition: color 0.15s;
}

.bm-close:hover { color: #333; }

.bm-slot-summary {
  padding: 0.75rem 1.5rem;
  background: #f8f8f8;
  border-bottom: 1px solid #eee;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgb(235, 80, 75);
  flex-shrink: 0;
}

.bm-body {
  padding: 1.25rem 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.bm-body h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.bm-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.bm-field {
  display: flex;
  flex-direction: column;
}

.bm-field[hidden] {
  display: none;
}

.bm-field--2col {
  grid-column: 1 / -1;
}

.bm-field--plz {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 0.75rem;
}

.bm-label-row {
  display: block;
}

.bm-field-hint {
  font-size: 0.68rem;
  font-weight: 400;
  color: #888;
  margin-top: 0.2rem;
}

.bm-field label {
  display: flex;
  flex-direction: column;
  font-size: 0.8rem;
  font-weight: 700;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  gap: 0.3rem;
  width: 100%;
}

.bm-field input,
.bm-field select,
.bm-field textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1.5px solid #ccc;
  border-radius: 5px;
  font-size: 0.95rem;
  font-family: 'Manrope', sans-serif;
  color: #333;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.bm-field input:focus,
.bm-field select:focus,
.bm-field textarea:focus {
  outline: none;
  border-color: rgb(235, 80, 75);
}

.bm-field textarea { resize: vertical; min-height: 70px; }

.bm-turnstile {
  grid-column: 1 / -1;
  margin: 0.25rem 0;
}

.bm-error {
  grid-column: 1 / -1;
  background: #fdecea;
  border: 1.5px solid rgb(235, 80, 75);
  color: #b71c1c;
  border-radius: 5px;
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
  margin-top: 0.25rem;
}

.bm-error[hidden] { display: none; }

.bm-footer {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding: 1rem 1.5rem;
  border-top: 1px solid #eee;
  flex-shrink: 0;
}

.bm-footer[hidden] { display: none; }

.bm-btn-secondary {
  background: none;
  border: 1.5px solid #ccc;
  border-radius: 5px;
  padding: 0.6rem 1.25rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  transition: border-color 0.15s;
}

.bm-btn-secondary:hover { border-color: #888; color: #333; }

.bm-btn-primary {
  background: rgb(235, 80, 75);
  border: none;
  border-radius: 5px;
  padding: 0.6rem 1.5rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.05rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}

.bm-btn-primary:hover { background: #c03030; }
.bm-btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.bm-color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.1s, transform 0.1s;
}
.bm-color-swatch:hover { transform: scale(1.15); }
.bm-color-swatch--active { border-color: #fff; box-shadow: 0 0 0 2px #333; }

.bm-success {
  padding: 2rem 1.5rem;
  text-align: center;
}

.bm-success[hidden] { display: none; }

.bm-success-icon {
  width: 56px;
  height: 56px;
  background: #e8f5e9;
  border: 2px solid #4caf50;
  border-radius: 50%;
  font-size: 1.6rem;
  color: #2e7d32;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.bm-success h3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.4rem;
  text-transform: uppercase;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
}

.bm-success p {
  color: #555;
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

/* ── Session / auth alerts ─────────────────────────────────────────────── */

.session-alert {
  max-width: 1100px;
  margin: 1rem auto 0;
  padding: 0.85rem 1.1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
}

.session-alert--success {
  background: #eaf7ef;
  border: 1px solid #5dba7d;
  color: #1a5c32;
}

.session-alert--error {
  background: #fff0f0;
  border: 1px solid #e05252;
  color: #7a1515;
}

/* ── Admin member search ───────────────────────────────────────────────── */

.bm-search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1.5px solid #ccc;
  border-top: none;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 200;
  max-height: 220px;
  overflow-y: auto;
}

.bm-search-results[hidden] { display: none; }

.bm-search-result {
  padding: 0.55rem 0.8rem;
  cursor: pointer;
  font-size: 0.88rem;
  color: #333;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.1s;
}

.bm-search-result:last-child { border-bottom: none; }

.bm-search-result:hover,
.bm-search-result:focus {
  background: #f5f5f5;
  outline: none;
}

.bm-search-result--empty {
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  color: #999;
  font-style: italic;
}

.bm-member-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: #f0f7ff;
  border: 1.5px solid #bedaf7;
  border-radius: 5px;
  font-size: 0.88rem;
}

.bm-member-badge__name {
  font-weight: 700;
  color: #1a1a1a;
}

.bm-member-badge__email {
  color: #555;
}

.bm-member-badge__clear {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #888;
  cursor: pointer;
  padding: 0 0.2rem;
  line-height: 1;
}

.bm-member-badge__clear:hover { color: #333; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .reservierung-layout {
    grid-template-columns: 1fr;
  }

  .reservierung-panel-col {
    position: static;
  }

  .bm-card {
    border-radius: 12px 12px 0 0;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 100%;
    max-height: 88vh;
    border-radius: 12px 12px 0 0;
  }

  .bm-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .bm-form {
    grid-template-columns: 1fr;
  }

  .bm-field--plz {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .reservierung-section {
    padding: 1rem 0.75rem 3rem;
  }

  .week-nav {
    gap: 0.5rem;
  }

  #week-label {
    font-size: 0.82rem;
  }
}


/* ── Member search in edit dialog ── */
.ec-member-results {
  border: 1px solid #dee2e6;
  border-radius: 4px;
  max-height: 160px;
  overflow-y: auto;
  margin-top: 0.25rem;
}

.ec-member-result {
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-size: 0.85rem;
}

.ec-member-result:hover {
  background: #f0f7ff;
}

/* ── Datepicker ─────────────────────────────────────────────────────────── */

.week-nav-center {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1;
  justify-content: center;
}

/* specificity matches .week-nav button (0,1,1) so later-in-file wins */
button.dp-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #aaa;
  border-radius: 5px;
  background: none;
  color: #444;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

button.dp-toggle-btn:hover,
button.dp-toggle-btn.dp-active {
  border-color: #EB504B;
  color: #EB504B;
  background: #fff5f5;
}

.dp-popup {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.14), 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 0.9rem;
  min-width: 254px;
}

.dp-popup.dp-open {
  display: block;
}

.dp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.dp-month-label {
  font-weight: 700;
  font-size: 0.88rem;
  color: #222;
}

/* .dp-popup .dp-nav-btn has specificity (0,2,0) > .week-nav button (0,1,1) */
.dp-popup .dp-nav-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
  color: #EB504B;
  padding: 2px 5px;
  border-radius: 4px;
  width: auto;
  height: auto;
  transition: background 0.12s;
}

.dp-popup .dp-nav-btn:hover {
  background: rgba(235, 80, 75, 0.1);
  border: none;
  color: #EB504B;
}

.dp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dp-weekday {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #aaa;
  padding: 2px 0 4px;
}

.dp-day {
  text-align: center;
  padding: 5px 1px;
  border-radius: 4px;
  font-size: 0.78rem;
  line-height: 1.2;
  cursor: default;
  min-width: 0;
  box-sizing: border-box;
  border: none;
  background: none;
  font-family: inherit;
  outline: none;
}

.dp-day--empty {
  visibility: hidden;
}

.dp-day--bookable {
  color: #333;
  cursor: pointer;
}

.dp-day--bookable:hover {
  background: #EB504B;
  color: #fff;
}

.dp-day--past {
  color: #d0d0d0;
}

.dp-day--short-notice {
  background: rgba(251, 191, 36, 0.18);
  color: #7a5000;
  cursor: pointer;
}

.dp-day--short-notice:hover {
  background: rgba(251, 191, 36, 0.42);
}

.dp-day--beyond-cutoff {
  color: #c0c0c0;
}

.dp-day--in-week.dp-day--bookable,
.dp-day--in-week.dp-day--short-notice {
  background: rgba(235, 80, 75, 0.1);
}

.dp-day--in-week.dp-day--bookable:hover {
  background: #EB504B;
  color: #fff;
}

.dp-day--in-week.dp-day--short-notice:hover {
  background: rgba(251, 191, 36, 0.42);
}

.dp-day--today.dp-day--bookable {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px #EB504B;
}

.dp-day--today.dp-day--short-notice {
  font-weight: 700;
  box-shadow: inset 0 0 0 1.5px rgba(251, 191, 36, 0.8);
}

.dp-legend {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  border-top: 1px solid #f0f0f0;
}

.dp-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: #777;
}

.dp-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  flex-shrink: 0;
}

.dp-legend-dot--sn {
  background: rgba(251, 191, 36, 0.55);
}

.dp-legend-dot--bc {
  background: #d8d8d8;
}

@media (max-width: 600px) {
  .dp-popup {
    left: auto;
    right: 0;
    transform: none;
  }
}

/* ===== DateInputComponent (Blazor) ===== */
.date-input-nav {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  position: relative;
}

.date-nav-btn {
  background: none;
  border: 1.5px solid #ccc;
  border-radius: 4px;
  color: #555;
  cursor: pointer;
  font-size: 1.4rem;
  line-height: 1;
  padding: 1px 7px 3px;
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.date-nav-btn:hover {
  border-color: #EB504B;
  color: #EB504B;
}

.date-nav-label {
  font-size: 0.9rem;
  font-weight: 500;
  min-width: 88px;
  text-align: center;
  padding: 0 2px;
}

.date-nav-empty {
  font-size: 0.85rem;
  color: #aaa;
  padding: 0 4px;
}

.date-nav-clear {
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 1.1rem;
  padding: 2px 4px;
  line-height: 1;
}

.date-nav-clear:hover {
  color: #EB504B;
}

.date-nav-dp-btn {
  width: 32px !important;
  height: 32px !important;
}

button.dp-toggle-btn:focus,
button.dp-toggle-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

/* din-popup: overrides dp-popup's centering transform; anchored right so it doesn't overflow modal */
.din-popup {
  position: absolute;
  top: calc(100% + 4px);
  left: auto;
  right: 0;
  transform: none;
}

/* Blazor component uses dp-nav / dp-weekdays / dp-days / dp-wday
   (JS datepicker uses dp-header / dp-grid / dp-weekday) */
.dp-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.dp-weekdays,
.dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.dp-wday {
  text-align: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #aaa;
  padding: 2px 0 4px;
}

