/* booking_ui/styles.css — SELF-SCHEDULE candidate booking page.
 * Mobile-first (360px up), centered card ≤720px on desktop, light theme.
 * Palette mirrors scout_ui/app/globals.css (emerald/teal brand); system
 * font stack only — no webfonts, no external anything. */

:root {
  --paper: #f6f8f7;
  --surface: #ffffff;
  --hair: #e3e8e5;
  --hair-2: #eef2f0;
  --ink: #0e1a16;
  --muted: #5d6b64;
  --emerald: #0b5e4f;
  --emerald-deep: #0a5245;
  --teal: #12a587;
  --teal-soft: #e3f4ef;
  --amber: #7a5b12;
  --amber-soft: #f7eeda;
  --amber-hair: #ecdbb3;
  --clay: #8a3524;
  --clay-soft: #f7e6e1;
  --font:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo,
    "Noto Sans JP", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh; /* fallback for browsers without dvh */
  min-height: 100dvh;
}

#app {
  display: flex;
  justify-content: center;
  padding: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

.noscript {
  margin: 24px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--hair);
  border-radius: 12px;
}

/* ── Card ─────────────────────────────────────────────────────────────── */

.card {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 760px) {
  #app {
    padding: 40px 20px;
    align-items: flex-start;
  }
  .card {
    min-height: 0;
    border: 1px solid var(--hair);
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(14, 26, 22, 0.06);
    overflow: hidden;
  }
}

/* ── Header ───────────────────────────────────────────────────────────── */

.head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 16px;
  background: linear-gradient(180deg, var(--teal-soft), var(--surface));
  border-bottom: 1px solid var(--hair-2);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.avatar {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--emerald);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 600;
}

.titles {
  min-width: 0;
}

.titles h1 {
  margin: 0;
  font-size: 19px;
  line-height: 1.3;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.titles .sub {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.lang {
  flex: none;
  display: inline-flex;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--surface);
  padding: 2px;
}

.lang button {
  border: 0;
  background: transparent;
  border-radius: 999px;
  min-height: 34px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}

.lang button.on {
  background: var(--emerald);
  color: #fff;
}

/* ── Loading skeleton ─────────────────────────────────────────────────── */

.loadbox {
  padding: 24px 20px 32px;
}

.loadmsg {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 14px;
}

.skel {
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    var(--hair-2) 25%,
    var(--teal-soft) 50%,
    var(--hair-2) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  margin-bottom: 12px;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skel {
    animation: none;
  }
}

/* ── Grid ─────────────────────────────────────────────────────────────── */

.gridwrap {
  padding: 20px 20px 32px;
}

.notice {
  background: var(--amber-soft);
  border: 1px solid var(--amber-hair);
  color: var(--amber);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.pick {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.tznote {
  margin: 0 0 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 14px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.day {
  flex: none;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: var(--surface);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.day.on {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #fff;
  font-weight: 600;
}

.slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 560px) {
  .slots {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.slot {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--hair);
  background: var(--surface);
  color: var(--emerald);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
}

.slot:hover {
  border-color: var(--teal);
  background: var(--teal-soft);
}

.slot:active {
  background: var(--teal-soft);
}

/* ── Confirm sheet ────────────────────────────────────────────────────── */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 26, 22, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
}

.sheet {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 20px 20px calc(24px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 32px rgba(14, 26, 22, 0.18);
  outline: none;
}

@media (min-width: 760px) {
  .overlay {
    align-items: center;
    padding: 20px;
  }
  .sheet {
    max-width: 480px;
    border-radius: 16px;
    padding: 24px;
  }
}

.sheet h2 {
  margin: 0 0 14px;
  font-size: 17px;
}

.when {
  background: var(--teal-soft);
  border: 1px solid var(--hair-2);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.whenlabel {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.whentime {
  margin: 2px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald);
}

.whenlen {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.field {
  display: block;
  margin-bottom: 14px;
}

.flabel {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 0 14px;
  font-family: inherit;
  font-size: 16px; /* ≥16px keeps iOS Safari from zoom-jumping the sheet */
  color: var(--ink);
  background: var(--surface);
}

.field input:focus {
  outline: 2px solid var(--teal);
  outline-offset: 0;
  border-color: var(--teal);
}

.field.bad input {
  border-color: var(--clay);
}

.ferr {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--clay);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.primary,
.ghost {
  min-height: 48px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 600;
  cursor: pointer;
}

.primary {
  flex: 1;
  border: 0;
  background: var(--emerald);
  color: #fff;
  padding: 0 18px;
}

.primary:hover {
  background: var(--emerald-deep);
}

.primary[disabled] {
  opacity: 0.7;
  cursor: default;
}

.ghost {
  flex: none;
  border: 1px solid var(--hair);
  background: var(--surface);
  color: var(--muted);
  padding: 0 18px;
}

.ghost[disabled] {
  opacity: 0.6;
  cursor: default;
}

/* ── Done + status screens ────────────────────────────────────────────── */

.done,
.status {
  padding: 40px 24px 48px;
  text-align: center;
}

.check {
  color: var(--teal);
  margin-bottom: 8px;
}

.check svg {
  width: 56px;
  height: 56px;
}

.done h2,
.status h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.donetime {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--emerald);
}

.donebody {
  margin: 0 0 6px;
  font-size: 14.5px;
}

.donenote,
.status p {
  margin: 0 auto;
  max-width: 44ch;
  font-size: 13.5px;
  color: var(--muted);
}

.status .primary {
  margin-top: 20px;
  flex: none;
  min-width: 160px;
}

.status.err h2,
.status.dead h2 {
  color: var(--clay);
}

/* Focus visibility for keyboard users, brand-colored. */
button:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}
