/* Dutch Daily — Booking Widget
   Inline op /teachers/{slug}/ — vanilla JS, brand styling (Baloo 2 + Inter + #ff7a00)
*/

#dd-booking-widget,
#dd-booking-widget * {
  box-sizing: border-box;
}

#dd-booking-widget {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: #fff;
  border: 2px solid #f1ede8;
  border-radius: 24px;
  padding: 32px;
  margin: 24px 0;
  max-width: 900px;
  color: #1a1410;
  position: relative;
  overflow: hidden;
}

#dd-booking-widget .ddb-h {
  font-family: 'Baloo 2', system-ui, sans-serif;
  font-weight: 800;
  color: #1a1410;
  letter-spacing: -.4px;
}

#dd-booking-widget .ddb-h1 { font-size: 28px; line-height: 1.2; margin: 0 0 10px; }
#dd-booking-widget .ddb-h2 { font-size: 20px; margin: 0 0 8px; }
#dd-booking-widget .ddb-p  { font-size: 15px; color: #4a443e; margin: 0 0 18px; line-height: 1.55; }
#dd-booking-widget .ddb-muted { color: #87807a; font-size: 13px; }

#dd-booking-widget .ddb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #ff7a00; color: #fff; border: none;
  font: 700 14px/1 'Inter', sans-serif;
  padding: 13px 22px; border-radius: 999px; cursor: pointer;
  text-decoration: none;
  transition: transform .15s, background .15s;
  white-space: nowrap;
}
#dd-booking-widget .ddb-btn:hover { background: #ff8a1a; transform: translateY(-1px); }
#dd-booking-widget .ddb-btn:disabled { background: #ccc; cursor: not-allowed; transform: none; }
#dd-booking-widget .ddb-btn--secondary { background: #1a1410; color: #fff; }
#dd-booking-widget .ddb-btn--ghost { background: transparent; color: #1a1410; border: 1.5px solid #1a1410; }
#dd-booking-widget .ddb-btn--danger { background: #dc2626; }

#dd-booking-widget .ddb-state { padding: 0; }
#dd-booking-widget .ddb-loading { text-align: center; padding: 40px 20px; color: #87807a; font-size: 14px; }

/* ── State A: logged out ────────────────────────────────────────────── */
#dd-booking-widget .ddb-logout-cta {
  text-align: center; padding: 30px 20px;
  background: linear-gradient(135deg, #fff8f0 0%, #f1ede8 100%);
  border-radius: 16px;
}

/* ── State B: no credits ────────────────────────────────────────────── */
#dd-booking-widget .ddb-nocredit {
  text-align: center; padding: 30px 20px;
  background: #fff8f0;
  border: 1.5px dashed #ff7a00;
  border-radius: 16px;
}
#dd-booking-widget .ddb-nocredit .ddb-h1 { color: #c95400; }

/* ── State C: slot picker ───────────────────────────────────────────── */
#dd-booking-widget .ddb-balance-bar {
  background: linear-gradient(135deg, #ff7a00 0%, #ffb84d 100%);
  color: #1a1410;
  padding: 12px 18px; border-radius: 12px;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 700; font-size: 14px;
  margin-bottom: 20px;
}
#dd-booking-widget .ddb-balance-bar .ddb-credit-count { font-size: 22px; font-family: 'Baloo 2', sans-serif; font-weight: 800; }

#dd-booking-widget .ddb-days {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 20px;
}
@media(max-width: 700px) {
  #dd-booking-widget .ddb-days { grid-template-columns: repeat(7, 1fr); gap: 4px; }
}
#dd-booking-widget .ddb-day {
  text-align: center; padding: 10px 4px;
  background: #f5f2ee; border-radius: 10px; cursor: pointer;
  border: 2px solid transparent;
  transition: all .15s;
  font-size: 13px;
}
#dd-booking-widget .ddb-day:hover { background: #ede7df; }
#dd-booking-widget .ddb-day.is-active { background: #1a1410; color: #fff; border-color: #ff7a00; }
#dd-booking-widget .ddb-day.is-empty { opacity: .35; cursor: not-allowed; }
#dd-booking-widget .ddb-day-name { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; }
#dd-booking-widget .ddb-day-num  { font-weight: 800; font-size: 18px; margin-top: 4px; font-family: 'Baloo 2', sans-serif; }
#dd-booking-widget .ddb-day-count { font-size: 10px; color: inherit; opacity: .7; margin-top: 2px; }

#dd-booking-widget .ddb-slots {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px;
  margin-bottom: 18px;
}
#dd-booking-widget .ddb-slot {
  padding: 12px 8px;
  background: #f5f2ee;
  border: 2px solid #e8e2da;
  border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 14px;
  text-align: center;
  transition: all .15s;
}
#dd-booking-widget .ddb-slot:hover { border-color: #ff7a00; background: #fff; }
#dd-booking-widget .ddb-slot.is-selected { background: #ff7a00; color: #fff; border-color: #ff7a00; }

#dd-booking-widget .ddb-no-slots {
  text-align: center; padding: 30px 20px;
  color: #87807a; font-size: 14px;
  background: #f9f6f1; border-radius: 12px;
}

/* ── Booking form modal ─────────────────────────────────────────────── */
#dd-booking-widget .ddb-form {
  background: #1a1410; color: #fff;
  padding: 28px; border-radius: 16px; margin-top: 18px;
}
#dd-booking-widget .ddb-form .ddb-h2 { color: #fff; }
#dd-booking-widget .ddb-form .ddb-slot-summary {
  background: #ff7a00; color: #1a1410;
  padding: 10px 16px; border-radius: 10px;
  font-weight: 700; font-size: 14px;
  margin-bottom: 16px;
  display: inline-block;
}

#dd-booking-widget .ddb-field { margin-bottom: 14px; }
#dd-booking-widget .ddb-field label {
  display: block; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  color: #d9d2c8; margin-bottom: 6px;
}
#dd-booking-widget .ddb-field input,
#dd-booking-widget .ddb-field textarea {
  width: 100%; box-sizing: border-box;
  background: #2a2420; color: #fff; border: 1.5px solid #4a443e;
  padding: 12px 14px; border-radius: 10px;
  font: 400 14px/1.4 'Inter', sans-serif;
  outline: none;
  transition: border-color .15s;
}
#dd-booking-widget .ddb-field input:focus,
#dd-booking-widget .ddb-field textarea:focus { border-color: #ff7a00; }
#dd-booking-widget .ddb-field textarea { resize: vertical; min-height: 80px; }

#dd-booking-widget .ddb-form-actions { display: flex; gap: 10px; margin-top: 18px; }

#dd-booking-widget .ddb-error {
  background: #2a1215; color: #ff8a80; border: 1px solid #5c2b2e;
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  margin-top: 12px;
}

#dd-booking-widget .ddb-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
  color: #fff; padding: 20px; border-radius: 12px;
  text-align: center;
  margin-top: 14px;
}
#dd-booking-widget .ddb-success .ddb-h2 { color: #fff; margin-bottom: 6px; }

/* ── My bookings list ───────────────────────────────────────────────── */
#dd-booking-widget .ddb-my-bookings {
  margin-top: 30px; padding-top: 24px;
  border-top: 1.5px solid #f1ede8;
}
#dd-booking-widget .ddb-booking-card {
  background: #f9f6f1; border-radius: 12px; padding: 16px;
  margin-bottom: 10px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
#dd-booking-widget .ddb-booking-card .ddb-when {
  font-weight: 700; font-family: 'Baloo 2', sans-serif; font-size: 15px;
}
#dd-booking-widget .ddb-booking-card .ddb-status {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
#dd-booking-widget .ddb-status--pending  { background: #fef3c7; color: #92400e; }
#dd-booking-widget .ddb-status--confirmed{ background: #dcfce7; color: #166534; }
#dd-booking-widget .ddb-status--declined { background: #fee2e2; color: #991b1b; }
#dd-booking-widget .ddb-status--cancelled_refunded { background: #e0e7ff; color: #3730a3; }
#dd-booking-widget .ddb-status--cancelled_late { background: #ffe4e6; color: #9f1239; }

/* Mobile */
@media(max-width: 600px) {
  #dd-booking-widget { padding: 20px; border-radius: 18px; }
  #dd-booking-widget .ddb-h1 { font-size: 22px; }
  #dd-booking-widget .ddb-day-num { font-size: 16px; }
  #dd-booking-widget .ddb-slots { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
  #dd-booking-widget .ddb-balance-bar { flex-wrap: wrap; gap: 6px; }
  #dd-booking-widget .ddb-form { padding: 20px; }
  #dd-booking-widget .ddb-form-actions { flex-direction: column; }
  #dd-booking-widget .ddb-btn { width: 100%; padding: 14px 22px; }
}
