/* ============================================================================
   styles.css
   ========================================================================= */

:root {
  --bg:        #fafafa;
  --surface:   #ffffff;
  --ink:       #14263a;
  --text:      #202124;
  --muted:     #5f6368;
  --faint:     #9aa0a6;
  --line:      #e5e7eb;
  --line-2:    #d5d8dc;
  --fill:      #f1f3f4;
  --green:     #2ea01e;   /* selected day */
  --emerald:   #10b981;   /* confirmation avatar */
  --emerald-d: #0f9b76;
  --mint:      #e9f7f1;
  --danger:    #c5221f;
  --radius:    10px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 20px 72px;
}

h1, h2 { color: var(--ink); }

h2 {
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  margin: 44px 0 22px;
}

/* ---------- agent header ------------------------------------------------- */

.agent-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.avatar {
  width: 60px; height: 60px;
  flex: 0 0 60px;
  border-radius: 50%;
  background: #7d9bd4;
  color: #fff;
  display: grid; place-items: center;
  font-size: 20px; font-weight: 500;
  text-transform: uppercase;
}

.avatar-lg {
  width: 128px; height: 128px; flex-basis: 128px;
  background: var(--emerald);
  font-size: 54px; font-weight: 600;
  margin: 0 auto 20px;
}

.agent-kicker { color: var(--muted); font-size: 15px; }
.agent-name   { font-size: 19px; font-weight: 700; color: var(--ink); margin-top: 2px; }

/* ---------- brand header -------------------------------------------------- */

.brand { text-align: center; margin-bottom: 6px; }
.brand-wordmark { max-width: 168px; height: auto; display: block; margin: 0 auto; }
.brand-marks {
  display: flex; justify-content: center; align-items: center;
  gap: 18px; margin-top: 10px; flex-wrap: wrap;
}
.brand-marks img { height: 20px; width: auto; }
/* The ProAdvisor badge is portrait (251 x 332), so it is sized by height.
   170px is the smallest size where the "Online" line stays legible (~7px),
   and it renders 129px wide — almost exactly 2x the source for retina. */
.brand-badge { height: 170px; width: auto; display: block; margin: 0 auto; }
.brand-wordmark + .brand-badge,
.brand-marks + .brand-badge { margin-top: 14px; }

/* On the picker the agent row follows immediately, so it needs more space
   than on the details view where a centred heading follows. */
.view-picker .brand { margin-bottom: 30px; }

/* ---------- day strip ------------------------------------------------------ */

.strip-row {
  display: flex; align-items: center; justify-content: center; gap: 14px;
}

.strip {
  flex: 1 1 auto;
  max-width: 530px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.strip-head, .strip-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.strip-head > div {
  text-align: center;
  font-size: 13px;
  color: var(--faint);
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.day {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 12px 2px 14px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font: inherit;
  transition: background .12s ease;
}
.day-num { font-size: 17px; font-weight: 600; color: var(--text); }
.day-mon { font-size: 12px; color: var(--faint); }

.day:not(.is-off):not(.is-on):hover { background: #f6f7f8; }

.day.is-on { background: var(--green); }
.day.is-on .day-num, .day.is-on .day-mon { color: #fff; }

.day.is-off { cursor: default; }
.day.is-off .day-num, .day.is-off .day-mon { color: #c9ccd0; }

.nav {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: #3c4043;
  display: grid; place-items: center;
  cursor: pointer;
}
.nav:hover:not(:disabled) { background: #f6f7f8; }
.nav:disabled { background: var(--fill); color: #bdc1c6; cursor: default; border-color: transparent; }

/* ---------- meta line ------------------------------------------------------- */

.meta { text-align: center; margin-bottom: 26px; }

.meta-btn {
  appearance: none; border: 0; background: none;
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--muted); font: inherit; font-size: 15px;
  cursor: pointer; padding: 4px 6px; border-radius: 6px;
}
.meta-btn:hover { color: var(--text); }
.meta-btn .dot { color: var(--faint); }

.tz-select {
  display: block;
  margin: 12px auto 0;
  width: 100%; max-width: 340px;
  padding: 9px 12px;
  font: inherit; font-size: 15px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface);
}

/* ---------- slot grid --------------------------------------------------------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 620px;
  margin: 0 auto;
}

.slot {
  appearance: none;
  padding: 14px 8px;
  font: inherit; font-size: 15px;
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease;
}

.grid-outline .slot { background: var(--surface); border: 1px solid var(--line-2); }

.slot:hover { border-color: var(--text); }
.slot.is-on { background: var(--text); border-color: var(--text); color: #fff; }

.slot.is-skeleton {
  cursor: default; pointer-events: none;
  border-color: transparent;
  background: linear-gradient(90deg, #f1f3f4 25%, #e8eaed 37%, #f1f3f4 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  height: 47px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.empty { text-align: center; color: var(--muted); font-size: 15px; }

/* ---------- confirm step -------------------------------------------------------------- */

.nextbar {
  max-width: 620px;
  margin: 30px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.nextbar-chosen {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  min-width: 0;
}
.nextbar-chosen strong { color: var(--text); font-weight: 700; }
.nextbar-tz { color: var(--faint); font-size: 13px; }

.btn-next {
  appearance: none;
  flex: 0 0 auto;
  background: #000;
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 13px 34px;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}
.btn-next:disabled {
  background: var(--fill);
  color: #b0b4b8;
  cursor: default;
}

/* ---------- form ---------------------------------------------------------------- */

.form { max-width: 940px; margin: 46px auto 0; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 48px; }

.field { margin-bottom: 34px; min-width: 0; }

.field label, .radios legend {
  display: block;
  font-size: 17px;
  color: var(--text);
  margin-bottom: 10px;
  padding: 0;
}

.req { color: var(--text); }

.field input {
  width: 100%;
  font: inherit; font-size: 16px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-bottom: 1px solid #c4c7c5;
  padding: 8px 0;
  outline: none;
  border-radius: 0;
}
.field input:focus {
  border-bottom-color: var(--text);
  box-shadow: 0 1px 0 0 var(--text);
}
/* :user-invalid only matches after the visitor has interacted or tried to
   submit, so untouched empty fields are not pre-flagged red. */
.field input:user-invalid { border-bottom-color: var(--danger); }

.radios { border: 0; padding: 0; margin: 0 0 34px; }

.radio {
  display: flex; align-items: center; gap: 10px;
  font-size: 17px; margin-bottom: 10px; cursor: pointer;
}
.radio input { width: 17px; height: 17px; margin: 0; accent-color: var(--text); }

.actions { display: flex; gap: 12px; margin-top: 42px; }

.btn-submit {
  appearance: none;
  background: #000; color: #fff;
  border: 0; border-radius: 8px;
  padding: 14px 32px;
  font: inherit; font-size: 17px; font-weight: 600;
  cursor: pointer;
}
.btn-submit:disabled { opacity: .6; cursor: default; }

.btn-back {
  appearance: none;
  background: transparent; color: var(--muted);
  border: 1px solid var(--line-2); border-radius: 8px;
  padding: 14px 26px;
  font: inherit; font-size: 17px;
  cursor: pointer;
}
.btn-back:hover { background: var(--fill); }

.error { color: var(--danger); font-size: 15px; margin: 0 0 8px; }

/* ---------- confirmation ------------------------------------------------------------ */

.confirm-head { text-align: center; margin-bottom: 30px; }
.confirm-kicker { color: var(--muted); font-size: 15px; margin: 0; }
.confirm-name { font-size: 27px; font-weight: 700; margin: 4px 0 0; }

.panel {
  background: var(--mint);
  border-radius: 12px;
  padding: 26px 24px;
  text-align: center;
  margin-bottom: 26px;
}
.panel-title { color: var(--emerald-d); font-weight: 700; font-size: 16px; margin: 0 0 14px; }
.panel-sub   { color: var(--muted); font-size: 15px; margin: 0 0 18px; }
.panel-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.pbtn {
  appearance: none;
  background: var(--surface); border: 0; border-radius: 8px;
  padding: 15px 12px;
  font: inherit; font-size: 15px; color: var(--text);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
}
.pbtn:hover { background: #f7fbf9; }

.card {
  background: var(--surface);
  border: 1px solid #eeeeee;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
  overflow: hidden;
}

.crow {
  display: grid;
  grid-template-columns: 36px 132px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  border-bottom: 1px solid #f1f1f1;
}
.crow:last-child { border-bottom: 0; }

.cicon {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--fill);
  color: var(--muted);
  display: grid; place-items: center;
}
.clabel { font-size: 16px; font-weight: 700; color: var(--ink); }
.cvalue { font-size: 15px; color: var(--text); }
.ref { display: block; color: var(--faint); font-size: 13px; margin-top: 3px; }

.clink {
  appearance: none; background: none; border: 0;
  color: var(--muted); font: inherit; font-size: 15px;
  text-decoration: underline; cursor: pointer; padding: 0;
}
.clink:hover { color: var(--text); }

/* ---------- footers ------------------------------------------------------------------- */

.consent {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
  max-width: 620px;
  margin: 64px auto 0;
}

.mocknote {
  background: #fff8e1;
  border: 1px solid #ffe9a8;
  color: #7a5c12;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  max-width: 640px;
  margin: 26px auto 0;
}
.mocknote code {
  background: rgba(0, 0, 0, .06);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}

/* ---------- misconfiguration notice ------------------------------------------------------ */

.notice {
  text-align: center;
  max-width: 520px;
  margin: 40px auto 0;
}
.notice h2 { margin-bottom: 10px; }
.notice p { color: var(--muted); font-size: 16px; margin: 0; }

.notice-dev {
  background: #fff8e1;
  border: 1px solid #ffe9a8;
  color: #7a5c12;
  border-radius: 8px;
  padding: 16px 18px;
  font-size: 13px;
  line-height: 1.7;
  max-width: 640px;
  margin: 32px auto 0;
}
.notice-dev code {
  background: rgba(0, 0, 0, .06);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
}

/* ---------- responsive ------------------------------------------------------------------ */

@media (max-width: 780px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .row  { grid-template-columns: 1fr; gap: 0; }
  h2 { font-size: 20px; margin: 34px 0 18px; }
}

@media (max-width: 560px) {
  .wrap { padding: 24px 16px 56px; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .panel-actions { grid-template-columns: 1fr; gap: 10px; }

  /* Stack the meta line rather than wrapping it around a stranded bullet. */
  .meta-btn { flex-direction: column; gap: 2px; line-height: 1.4; }
  .meta-btn .dot { display: none; }
  .meta-btn svg { margin-top: 2px; }

  /* Stack the confirm step and pin it to the bottom of the viewport, so the
     next action stays reachable however far down the single-column grid the
     visitor taps. It stays in flow, so it only sticks while it would
     otherwise be scrolled past. */
  .nextbar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    text-align: center;
    position: sticky;
    bottom: 0;
    background: var(--bg);
    box-shadow: 0 -8px 16px -8px rgba(0, 0, 0, .14);
    padding: 14px 0 16px;
    margin-top: 24px;
    border-top: 1px solid var(--line);
  }
  .btn-next { width: 100%; padding: 15px 20px; }
  .nextbar-chosen { font-size: 14px; }

  .strip-row { gap: 6px; }
  .nav { width: 34px; height: 34px; flex-basis: 34px; }
  .day { padding: 10px 0 12px; }
  .day-num { font-size: 15px; }
  .day-mon { font-size: 11px; }
  .strip-head > div { font-size: 11px; padding: 9px 0; }

  .brand-badge { height: 140px; }

  .avatar-lg { width: 96px; height: 96px; flex-basis: 96px; font-size: 40px; }
  .confirm-name { font-size: 23px; }

  .crow {
    grid-template-columns: 36px 1fr;
    grid-template-areas: "icon label" "icon value" ". link";
    gap: 4px 14px;
    padding: 18px 18px;
  }
  .cicon  { grid-area: icon; align-self: start; }
  .clabel { grid-area: label; }
  .cvalue { grid-area: value; }
  .clink  { grid-area: link; justify-self: start; margin-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
