/* =========================================
   STEP 5: DATUM & ZEIT (FINAL)
   - Desktop/Tablet: zeigt "ab xx" (cal-from)
   - Mobile: zeigt nur Preis (cal-from-mobile) ohne "ab"
   - Kein doppeltes Label möglich
   ========================================= */

/* ---------- Allgemein ---------- */
.step[data-step="5"]{
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
}

/* Headline Hinweis */
.step[data-step="5"] .dt-note{
  margin: var(--space-1) 0 var(--space-2);
  color:#657497;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0;
}

/* ---------- KALENDER ---------- */
.step[data-step="5"] .cal{
  --cal-row-h: 68px;
  --cal-gap: 12px;

  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: 0 12px 30px rgba(2,8,23,.10);
  padding: 18px;
}

/* Kopfzeile */
.step[data-step="5"] .cal-header{
  display:grid;
  grid-template-columns: 52px 1fr 52px;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.step[data-step="5"] .cal-month{
  grid-column:2;
  text-align:center;
  font-weight: 800;
  font-size: 1.28rem;
  letter-spacing: 0;
}

/* Pfeilbuttons */
.step[data-step="5"] .cal-btn{
  width:52px;
  height:52px;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;

  font-weight: 900;
  font-size:22px;
  cursor:pointer;
  color:black;

  transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease;
}

.step[data-step="5"] .cal-btn:hover{
  box-shadow: 0 10px 26px rgba(2,8,23,.12);
  transform: translateY(-1px);
}

.step[data-step="5"] .cal-btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
  box-shadow:none;
}

/* Wochentage + Grid */
.step[data-step="5"] .cal-weekdays,
.step[data-step="5"] .cal-grid{
  display:grid;
  grid-template-columns: repeat(7, minmax(64px, 1fr));
  gap: var(--cal-gap);
}

.step[data-step="5"] .cal-weekdays{
  margin-bottom: var(--cal-gap);
  color:#6B7280;
  font-size: 1.02rem;
  font-weight: 700;
  text-align:center;
  user-select:none;
}

/* Tageszelle */
.step[data-step="5"] .cal-day{
  height: var(--cal-row-h);
  padding: 10px 8px;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 6px;

  border:1px solid #E8EFFB;
  border-radius:16px;
  background:#F8FBFF;
  color: var(--text);

  cursor:pointer;
  transition: box-shadow .12s ease, transform .12s ease, background .12s ease, border-color .12s ease;
}

.step[data-step="5"] .cal-day:hover{
  box-shadow: 0 10px 26px rgba(2,8,23,.12);
  transform: translateY(-1px);
}

/* Tageszahl */
.step[data-step="5"] .cal-day .cal-num{
  display:block;
  line-height:1;
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: 0;
}

/* ------- Preis-Labels: Desktop vs Mobile (verhindert doppelt) ------- */
.step[data-step="5"] .cal-day .cal-from{
  display:block !important;
  line-height:1.05;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  opacity: .88;
}

.step[data-step="5"] .cal-day .cal-from-mobile{
  display:none !important;
  line-height:1.05;
  font-size: 0.70rem;
  font-weight: 600;
  opacity: .75;
  text-align:center;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}

/* Disabled / outside */
.step[data-step="5"] .cal-day.is-outside,
.step[data-step="5"] .cal-day:disabled{
  opacity:.45;
  cursor:not-allowed;
  background:#f3f6fb;
  border-color:#EEF1F6;
  transform:none;
  box-shadow:none;
}

/* Today / Selected */
.step[data-step="5"] .cal-day.is-today{
  border-color: color-mix(in oklab, var(--brand) 42%, #fff);
  box-shadow: inset 0 0 0 2px color-mix(in oklab, var(--brand) 22%, transparent);
}

.step[data-step="5"] .cal-day.is-selected{
  color:#fff;
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 0 0 5px rgba(59,130,246,.22);
}

.step[data-step="5"] .cal-day.is-selected .cal-from{
  opacity: .98;
}

/* Separator */
.step[data-step="5"] .sep{
  height:1px;
  background:#EDF2F7;
  border:0;
  margin: var(--space-3) 0;
}

/* ---------- ZEITEN ---------- */
.step[data-step="5"] .time-head{
  margin: var(--space-3) 0 var(--space-2);
  color:#6B7280;
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: 0;
}

.step[data-step="5"] .time-grid{
  display:block !important;
}

/* Join/New Gruppe: Grid */
.step[data-step="5"] .nl-slot-group{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

/* Titel/Sub über volle Breite */
.step[data-step="5"] .nl-slot-section-title,
.step[data-step="5"] .nl-slot-section-sub{
  grid-column: 1 / -1;
}

.step[data-step="5"] .nl-slot-section-title{
  font-size: 1.38rem;
  font-weight: 800;
  letter-spacing: 0;
  margin: 10px 0 2px;
}

.step[data-step="5"] .nl-slot-section-sub{
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: 0;
  opacity: .85;
  margin: 0 0 6px;
}

/* Hidden Inputs sollen keine Löcher machen */
.step[data-step="5"] .nl-slot-group > input[type="hidden"]{
  display:none !important;
}

/* Timeslot-Box */
.step[data-step="5"] .time-pill{
  width:100%;
  max-width:none;
  margin:0;

  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap: 4px;

  height: 88px;
  padding: 12px 14px;

  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: 0;

  background:#fff;
  border:1px solid #E8EFFB;
  border-radius:16px;
  cursor:pointer;

  transition: box-shadow .12s ease, transform .12s ease, border-color .12s ease, background .12s ease;
  color:black !important;
  -webkit-text-fill-color:#000 !important;
}

.step[data-step="5"] .time-pill:hover{
  box-shadow: 0 10px 26px rgba(2,8,23,.12);
  transform: translateY(-1px);
}

.step[data-step="5"] .time-pill.is-selected{
  border-color: var(--brand);
  box-shadow: 0 0 0 5px rgba(59,130,246,.22);
  background:#fff;
}

.step[data-step="5"] .time-pill .nl-time{
  font-weight: 800;
  font-size: 1.08rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.step[data-step="5"] .time-pill .nl-price{
  font-size: 0.96rem;
  font-weight: 600;
  opacity: .85;
  line-height: 1.05;
  letter-spacing: 0;
}

/* ---------- RESPONSIVE ---------- */

/* Laptop/kleiner Desktop */
@media (max-width: 1100px){
  .step[data-step="5"] .nl-slot-group{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .step[data-step="5"] .time-pill{
    height: 84px;
  }
}

/* Tablet */
@media (max-width: 900px){
  .step[data-step="5"] .cal{
    --cal-row-h: 60px;
    --cal-gap: 10px;
    padding: 14px;
  }

  .step[data-step="5"] .cal-header{
    grid-template-columns: 46px 1fr 46px;
    gap:10px;
    margin-bottom:12px;
  }

  .step[data-step="5"] .cal-btn{
    width:46px;
    height:46px;
    font-size:20px;
    border-radius:14px;
  }

  .step[data-step="5"] .cal-month{
    font-size: 1.18rem;
  }

  .step[data-step="5"] .cal-weekdays,
  .step[data-step="5"] .cal-grid{
    grid-template-columns: repeat(7, minmax(54px, 1fr));
  }

  .step[data-step="5"] .cal-day .cal-num{
    font-size: 1.18rem;
  }

  .step[data-step="5"] .cal-day .cal-from{
    font-size: 0.86rem;
    font-weight: 600;
  }

  .step[data-step="5"] .nl-slot-group{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .step[data-step="5"] .time-pill{
    height: 78px;
    font-size: 1.00rem;
  }
}

/* Mobile */
@media (max-width: 700px){
  .step[data-step="5"] .cal{
    --cal-row-h: 56px;
    --cal-gap: 8px;
  }

  .step[data-step="5"] .cal-weekdays,
  .step[data-step="5"] .cal-grid{
    grid-template-columns: repeat(7, minmax(44px, 1fr));
  }

  .step[data-step="5"] .cal-day{
    padding: 8px 6px;
    border-radius:14px;
    gap: 4px;
  }

  .step[data-step="5"] .cal-day .cal-num{
    font-size: 1.10rem;
    font-weight: 800;
  }

  /* Mobile: nur cal-from-mobile anzeigen */
  .step[data-step="5"] .cal-day .cal-from{
    display:none !important;
  }

  .step[data-step="5"] .cal-day .cal-from-mobile{
    display:block !important;
    font-size: 0.68rem;
    font-weight: 600;
  }

  /* IMMER 3 Zeiten nebeneinander */
  .step[data-step="5"] .nl-slot-group{
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }

  .step[data-step="5"] .time-pill{
    height: 72px;
    font-size: 0.95rem;
    border-radius:14px;
    padding: 10px 10px;
  }

  .step[data-step="5"] .time-pill .nl-time{
    font-size: 1.00rem;
  }

  .step[data-step="5"] .time-pill .nl-price{
    font-size: 0.86rem;
  }
}

/* Sehr kleine Phones -> 2 Spalten */
@media (max-width: 360px){
  .step[data-step="5"] .nl-slot-group{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step[data-step="5"] .time-pill{
    height: 70px;
  }

  .step[data-step="5"] .cal-day .cal-from-mobile{
    font-size: 0.62rem;
  }
}