/* An instructor's public page. Matches the DriveDuo app: Provicali for headings, Gilroy for the
   rest, orange #E6552B. */

@font-face { font-family: 'Provicali'; src: url('/fonts/Provicali.woff2?v=2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 500; src: url('/fonts/Gilroy-Medium.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 600; src: url('/fonts/Gilroy-SemiBold.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Gilroy'; font-weight: 700; src: url('/fonts/Gilroy-Bold.woff2') format('woff2'); font-display: swap; }

:root {
  --orange: #E6552B;
  --orange-text: #C4441C;
  --orange-wash: rgba(230, 85, 43, 0.08);
  --text: #141414;
  --faded: rgba(0, 0, 0, 0.65);
  --faint: rgba(0, 0, 0, 0.35);
  --line: rgba(0, 0, 0, 0.06);
  --chip: #F3F3F3;
  --card: #F7F7F7;
  --field: #F5F5F5;
  --dark: #242424;
  --green: #1E8E3E;
  --green-wash: rgba(43, 190, 84, 0.14);
  --red: #B42318;
  --red-wash: rgba(217, 60, 60, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: #FFFFFF;
  color: var(--text);
  font-family: Gilroy, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
}
/* A full-height column, so the bar with what's picked sits at the bottom even on a short page */
#app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
#app > main { flex: 1 0 auto; width: 100%; }
button { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
svg { flex: none; }
.noscript { padding: 25px; font-weight: 600; }

/* Headings and text */
.display { font-family: Provicali, Gilroy, sans-serif; font-weight: 400; }
h2 { margin: 14px 0 0; font-family: Provicali, Gilroy, sans-serif; font-weight: 400; font-size: 24px; line-height: 26px; }
.note { margin: 0; font-weight: 600; font-size: 15px; line-height: 18px; color: var(--faded); }
.note.small { margin: 0 4px; font-size: 14px; }
.centred { text-align: center; }
.label { margin: 10px 0 0 4px; font-weight: 700; font-size: 14px; line-height: 14px; color: var(--orange-text); }
.label:first-child { margin-top: 0; }
.faded { color: var(--faded); }

/* The profile */
.hero { background: var(--orange); color: #FFFFFF; }
.hero-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 22px 25px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.wordmark { align-self: flex-start; font-family: Provicali, Gilroy, sans-serif; font-size: 24px; line-height: 24px; }
.avatar {
  width: 104px;
  height: 104px;
  border-radius: 52px;
  border: 4px solid #FFFFFF;
  background: var(--dark);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 36px;
  line-height: 36px;
}
.avatar img, .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hero h1 { margin: 0; font-size: 34px; line-height: 36px; text-align: center; }
.hero.home .hero-inner { padding-bottom: 44px; }
.hero.home h1 { margin-top: 30px; font-size: 40px; line-height: 42px; }

.content {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 25px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.intro { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.school { margin: 0; font-weight: 700; font-size: 18px; line-height: 20px; text-align: center; }
.chips { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.intro .chips { justify-content: center; }
.chips li { padding: 8px 12px; border-radius: 16px; background: var(--chip); font-weight: 600; font-size: 15px; line-height: 16px; }
.about { margin: 0; font-weight: 500; font-size: 17px; line-height: 25px; white-space: pre-line; overflow-wrap: anywhere; }
.call { margin-top: 6px; display: flex; flex-direction: column; gap: 10px; }
.by { margin: 26px 0 0; text-align: center; font-weight: 600; font-size: 14px; line-height: 18px; color: var(--faded); }
.by span { font-family: Provicali, Gilroy, sans-serif; font-size: 15px; color: var(--orange-text); }

/* Buttons */
.button {
  width: 100%;
  min-height: 60px;
  border: 0;
  border-radius: 12px;
  background: var(--orange);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  cursor: pointer;
  font-family: Provicali, Gilroy, sans-serif;
  font-size: 24px;
  line-height: 24px;
}
.button.secondary { background: var(--chip); color: var(--text); }
.button.slim { min-height: 58px; font-size: 22px; line-height: 22px; }
.button:disabled { background: rgba(230, 85, 43, 0.4); cursor: default; }
.button:focus-visible, .choice:focus-visible, .link:focus-visible, .back:focus-visible { outline: 3px solid var(--orange-text); outline-offset: 2px; }
.link { align-self: center; border: 0; background: none; padding: 14px; font-weight: 700; font-size: 16px; line-height: 16px; color: var(--orange-text); cursor: pointer; }

/* Cards of rows */
.card { border-radius: 12px; background: var(--card); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 10px 18px; }
.row + .row { border-top: 1px solid var(--line); }
.row .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row .text.inline { flex-direction: row; align-items: baseline; flex-wrap: wrap; column-gap: 8px; }
.row strong, .row .amount { font-weight: 700; font-size: 17px; line-height: 19px; }
.row .amount.light { font-weight: 600; }
.row small { font-weight: 600; font-size: 14px; line-height: 17px; color: var(--faded); }
.row.tall { padding: 16px 18px; gap: 14px; }
.row.tall small { font-size: 15px; line-height: 18px; }
.dot { flex: none; width: 12px; height: 12px; border-radius: 6px; }

/* Booking: the bar at the top */
.bar {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #FFFFFF;
  border-bottom: 1px solid var(--line);
}
.bar-inner {
  max-width: 480px;
  margin: 0 auto;
  height: 64px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bar-inner.plain { padding: 0 25px; }
.bar h1 { margin: 0 0 0 6px; font-size: 22px; line-height: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .wordmark { align-self: center; color: var(--orange-text); font-size: 22px; line-height: 22px; }
.back { width: 44px; height: 44px; border: 0; background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; border-radius: 22px; }
.mini-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 18px;
  background: var(--dark);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 700;
  font-size: 14px;
  line-height: 14px;
}
.booking { padding-top: 18px; gap: 10px; }

/* Picking a lesson and time */
.choice { cursor: pointer; }
.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.type {
  min-height: 56px;
  padding: 6px 8px;
  border-radius: 12px;
  border: 2px solid transparent;
  background: var(--chip);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}
.type strong { font-weight: 700; font-size: 16px; line-height: 17px; text-align: center; }
.type small { font-weight: 600; font-size: 14px; line-height: 15px; color: var(--faded); }
.type[aria-checked="true"] { border-color: var(--orange); background: var(--orange-wash); }
.lengths { display: flex; gap: 4px; padding: 4px; background: var(--chip); border-radius: 10px; }
.length { flex: 1; height: 40px; border: 0; border-radius: 8px; background: transparent; font-weight: 700; font-size: 16px; line-height: 16px; color: var(--faded); }
.length[aria-checked="true"] { background: var(--orange); color: #FFFFFF; }
.days {
  margin: 0 -25px;
  padding: 0 25px 4px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-padding: 0 25px;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: none;
  width: 60px;
  height: 78px;
  border: 0;
  border-radius: 12px;
  background: var(--chip);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.day .weekday { font-weight: 700; font-size: 12px; line-height: 12px; letter-spacing: 0.04em; }
.day .date { font-weight: 700; font-size: 24px; line-height: 24px; }
.day .free { font-weight: 600; font-size: 12px; line-height: 12px; color: var(--green); }
.day.full { background: #FAFAFA; color: var(--faint); }
.day.full .free { color: var(--faint); }
.day[aria-checked="true"] { background: var(--orange); color: #FFFFFF; }
.day[aria-checked="true"] .free { color: rgba(255, 255, 255, 0.9); }
.day-title { margin-top: 12px; }
.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { height: 52px; border-radius: 10px; border: 2px solid rgba(0, 0, 0, 0.1); background: #FFFFFF; font-weight: 700; font-size: 18px; line-height: 18px; }
.slot[aria-checked="true"] { border-color: var(--orange); background: var(--orange); color: #FFFFFF; }
.empty { margin: 0; padding: 18px 20px; border-radius: 12px; background: var(--card); font-weight: 600; font-size: 16px; line-height: 21px; color: var(--faded); }
.notice { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--orange-wash); font-weight: 600; font-size: 15px; line-height: 19px; }
.problem { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--red-wash); color: var(--red); font-weight: 600; font-size: 15px; line-height: 19px; }
.spacer { height: 12px; }

/* The bar at the bottom with what's picked */
.footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #FFFFFF;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.footer-inner {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 25px calc(18px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer .picked { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.footer strong { font-weight: 700; font-size: 17px; line-height: 19px; }
.footer small { font-weight: 600; font-size: 14px; line-height: 17px; color: var(--faded); }
.continue { flex: none; width: auto; min-height: 54px; padding: 0 22px; font-size: 21px; line-height: 21px; }

/* Your details */
.form { display: flex; flex-direction: column; gap: 10px; }
.nowrap { white-space: nowrap; }
.when { padding: 16px 18px; border-radius: 12px; background: var(--orange-wash); display: flex; align-items: center; gap: 14px; }
.when .text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.when strong { font-weight: 700; font-size: 17px; line-height: 19px; }
.when small { font-weight: 600; font-size: 15px; line-height: 18px; color: var(--faded); }
.when .link { padding: 12px 0 12px 8px; font-size: 15px; line-height: 15px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.field { padding: 12px 16px; border-radius: 10px; background: var(--field); display: flex; flex-direction: column; gap: 6px; cursor: text; }
.field span { font-weight: 700; font-size: 13px; line-height: 13px; color: var(--orange-text); }
.field input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  outline: none;
  font: inherit;
  font-weight: 700;
  font-size: 18px;
  line-height: 22px;
  color: var(--text);
}
.field input::placeholder { color: rgba(0, 0, 0, 0.4); }
.field:focus-within { box-shadow: 0 0 0 2px var(--orange); }
.field:has([aria-invalid="true"]) { box-shadow: 0 0 0 2px var(--red); }
.pay { margin-top: 8px; }

/* Booked */
.done { padding-top: 34px; }
.done-head { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-bottom: 14px; }
.tick { width: 84px; height: 84px; border-radius: 42px; background: var(--green-wash); display: flex; align-items: center; justify-content: center; }
.tick.sorry { background: var(--orange-wash); }
.done-head h1 { margin: 0; font-size: 34px; line-height: 36px; text-align: center; }
.done-head p { margin: 0; text-align: center; font-weight: 600; font-size: 17px; line-height: 22px; color: var(--faded); }
.done .button { margin-top: 8px; }
.done .button + .button { margin-top: 0; }

/* Loading */
.waiting { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 25px; text-align: center; }
.spinner { width: 36px; height: 36px; border-radius: 18px; border: 4px solid var(--orange-wash); border-top-color: var(--orange); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

@media (min-width: 520px) {
  .days { margin: 0; padding: 0 0 4px; scroll-padding: 0; }
}
