/* =========================================================
   Nipatane Siddha — Schedule a call page
   Uses the same tokens as style.css (--ink, --sky, --line …)
   ========================================================= */
.sched-page {
  --accent: #1572a3;          /* calendar accent (same as --edu-ink) */
  --accent-soft: #e9f4fb;
  background: #f4f7f9; min-height: 100vh;
}

.sched-wrap {
  width: min(100% - 32px, 1080px);
  margin-inline: auto;
  padding: 28px 0 56px;
}

.back-home {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: 18px;
  font-size: .9rem; font-weight: 500; color: var(--muted);
  transition: color .2s;
}
.back-home:hover { color: var(--ink); }

/* ---------- Card ---------- */
.sched-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(13, 43, 62, .04), 0 24px 60px -36px rgba(13, 43, 62, .28);
  overflow: hidden;
  min-height: 660px;
}

/* ---------- Left ---------- */
.sched-info { border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.info-brand {
  display: grid; place-items: center;
  min-height: 190px; padding: 40px 32px;
  border-bottom: 1px solid var(--line);
}
.info-brand img { height: 52px; width: auto; }

.info-body { padding: 32px 38px 38px; }
.info-org { font-size: .95rem; font-weight: 600; color: var(--muted); }
.info-body h1 { margin: 4px 0 22px; font-size: 1.85rem; line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }

.info-meta { display: grid; gap: 14px; margin-bottom: 28px; }
.info-meta li { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; font-weight: 600; color: var(--ink-soft); line-height: 1.45; }
.info-meta i { font-size: 1.4rem; color: var(--ink); flex: none; margin-top: -2px; }

.info-text { display: grid; gap: 14px; font-size: .95rem; line-height: 1.65; color: var(--ink-soft); }
.info-text strong { color: var(--ink); }

/* ---------- Right ---------- */
.sched-main { padding: 36px 40px; min-width: 0; }
.sched-main h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; margin-bottom: 28px; }
.view[hidden] { display: none; }

.pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.pick.has-date { grid-template-columns: minmax(0, 1fr) 200px; }

/* calendar */
.cal { max-width: 440px; margin-inline: auto; width: 100%; }
.pick.has-date .cal { margin-inline: 0; }

.cal-head { display: flex; align-items: center; justify-content: center; gap: 24px; margin-bottom: 24px; }
.cal-title { min-width: 150px; text-align: center; font-weight: 700; font-size: 1rem; letter-spacing: -.01em; }
.cal-nav {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.2rem;
  color: var(--accent); background: var(--accent-soft);
  transition: background-color .2s, color .2s;
}
.cal-nav:hover:not(:disabled) { background: var(--accent); color: #fff; }
.cal-nav:disabled { background: transparent; color: var(--muted); opacity: .35; cursor: not-allowed; }

.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.cal-dow { margin-bottom: 10px; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cal-grid { row-gap: 8px; justify-items: center; }

.day {
  position: relative;
  width: 52px; height: 52px; max-width: 100%;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: .98rem; font-variant-numeric: tabular-nums;
  color: #9fb1bc;
}
.day.avail {
  background: var(--accent-soft); color: var(--accent); font-weight: 700;
  cursor: pointer; transition: background-color .2s, color .2s, box-shadow .2s;
}
.day.avail:hover { background: #d3e9f6; box-shadow: inset 0 0 0 1.5px var(--accent); }
.day.selected, .day.selected:hover { background: var(--accent); color: #fff; box-shadow: none; }
.day.today::after {
  content: ""; position: absolute; bottom: 7px; left: 50%; translate: -50% 0;
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
}
.day:not(.avail).today { color: var(--ink); font-weight: 600; }
.day:disabled:not(.avail) { cursor: default; }
.day:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.cal-note { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: .82rem; color: var(--muted); }
.cal-note i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }

/* time zone */
.tz { margin-top: 26px; }
.tz label { display: block; font-size: .85rem; font-weight: 700; margin-bottom: 8px; }
.tz-select {
  position: relative; display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 8px 36px 8px 12px; border: 1px solid var(--line); border-radius: 10px;
  color: var(--ink-soft); background: #fff; transition: border-color .2s;
}
.tz-select:hover, .tz-select:focus-within { border-color: var(--accent); }
.tz-select::after {
  content: ""; position: absolute; right: 14px; top: 50%;
  width: 7px; height: 7px; margin-top: -5px;
  border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; rotate: 45deg; pointer-events: none;
}
.tz-select i { font-size: 1.15rem; }
.tz select {
  -webkit-appearance: none; appearance: none;
  font: inherit; font-size: .9rem; color: var(--ink);
  background: transparent; border: 0; padding: 0; max-width: 100%; cursor: pointer;
}
.tz select:focus { outline: 0; }

/* time slots */
.slots-day { font-weight: 700; font-size: .95rem; margin-bottom: 16px; }
.slots-list { display: grid; gap: 10px; max-height: 500px; overflow-y: auto; padding: 2px 6px 2px 0; }
.slot-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
.slot-row.confirming { grid-template-columns: 1fr 1fr; }
.slot-btn {
  height: 50px; padding: 0 10px;
  border: 1.5px solid #b9d9ec; border-radius: 10px;
  color: var(--accent); font-weight: 700; font-size: .92rem; text-align: center;
  transition: border-color .2s, background-color .2s, color .2s;
}
.slot-btn:hover { border-color: var(--accent); }
.slot-row.confirming .slot-time { background: #5b6f7c; border-color: #5b6f7c; color: #fff; cursor: default; }
.slot-next { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot-next:hover { background: var(--ink); border-color: var(--ink); color: #fff; }
.slots-empty { color: var(--muted); font-size: .92rem; }

/* details form */
.back-step {
  display: inline-flex; align-items: center; gap: 6px;
  margin-bottom: 18px; font-size: .9rem; font-weight: 600; color: var(--muted);
}
.back-step:hover { color: var(--ink); }
.chosen { margin: -12px 0 24px; font-size: .95rem; font-weight: 600; color: var(--ink-soft); }

.field { margin-bottom: 18px; max-width: 460px; }
.field label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .95rem; color: var(--ink);
  padding: 11px 14px; border: 1.5px solid var(--line); border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field.invalid input { border-color: #c0392b; }
.form-error { margin-bottom: 14px; color: #b03a2e; font-size: .9rem; }

/* confirmation */
.done { text-align: center; max-width: 440px; margin: 40px auto 0; }
.done-icon {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.9rem;
  background: var(--sky); color: var(--ink);
}
.done h2 { margin-bottom: 8px; }
.done-card {
  margin: 26px 0; padding: 18px 22px; text-align: left;
  border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 12px;
}
.done-card div { display: grid; grid-template-columns: 70px 1fr; gap: 12px; font-size: .93rem; }
.done-card dt { color: var(--muted); font-weight: 600; }
.done-card dd { margin: 0; font-weight: 600; }
.done h2:focus { outline: 0; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.btn-wa { background: #1f9d55; border-color: #1f9d55; color: #fff; }
.btn-wa:hover { background: #168246; border-color: #168246; }
.btn[hidden] { display: none; }
.info-wa { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.info-wa i { font-size: 1.15rem; }
.form-error a { color: inherit; font-weight: 600; text-decoration: underline; }
.pick-notice { margin: -10px 0 22px; padding: 12px 16px; border-radius: 10px; background: #fff3e2; color: #8a4a06; font-size: .92rem; font-weight: 600; }
.pick-notice[hidden] { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .sched-card { grid-template-columns: 1fr; min-height: 0; }
  .sched-info { border-right: 0; border-bottom: 1px solid var(--line); }
  .info-brand { min-height: 0; padding: 28px 24px; }
  .info-brand img { height: 44px; }
  .info-body { padding: 24px; }
  .info-body h1 { font-size: 1.6rem; }
  .sched-main { padding: 28px 20px 32px; }
}
@media (max-width: 620px) {
  /* 16px stops iPhones zooming in when a field is tapped */
  .field input, .field textarea, .tz select { font-size: 16px; }
  .back-home { padding: 8px 0; margin-bottom: 8px; }
  .tz-select { padding-top: 11px; padding-bottom: 11px; }
  .sched-wrap { padding-top: 16px; }

  /* shorter intro so the calendar is near the top */
  .info-brand { padding: 22px; }
  .info-brand img { height: 38px; }
  .info-body { padding: 20px 22px 22px; }
  .info-body h1 { margin-bottom: 14px; font-size: 1.45rem; }
  .info-meta { margin-bottom: 14px; gap: 8px; }
  .info-text > p:not(:last-child) { display: none; }   /* keep only "Prefer to chat? WhatsApp" */

  .sched-main { padding: 24px 16px 28px; }
  .sched-main h2 { margin-bottom: 20px; }
  .pick.has-date { grid-template-columns: 1fr; }
  .slots-list { max-height: none; grid-template-columns: 1fr 1fr; }
  .slot-row.confirming { grid-column: 1 / -1; }
  .day { width: 42px; height: 42px; font-size: .92rem; }
  .day.today::after { bottom: 5px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
