/* Demo scheduler — the "pick a time" step inside the contact modal.
   Paired with /scheduler.js, which injects the markup, so this file is the
   only place the step is styled. Tokens are scoped to .sched (same reason
   .demo-modal scopes its own): the marketing pages and /security have
   different :root palettes and the step must look identical on both. */
.sched {
  --accent: #3498db;
  --body: "Outfit", sans-serif;
  --heading: "Outfit", sans-serif;
  --border: #e8e8ec;
  --border-light: #d4d4da;
  --text: #1a1a1f;
  --text-dim: #6b6b76;
  --text-muted: #a0a0ab;
  --green: #22c55e;
  display: none;
  font-family: var(--body);
  color: var(--text);
}
/* Self-sufficient rather than leaning on the host page's reset: this step is
   injected into whatever marketing page includes the modal, and a page
   without `* { box-sizing: border-box }` would otherwise push the padded
   inputs and buttons past the panel's right edge. */
.sched,
.sched *,
.sched *::before,
.sched *::after {
  box-sizing: border-box;
}
.sched.is-active {
  display: block;
}

/* The inquiry form's submit is hidden while the picker is open, so the
   two filled blue buttons never stack. Stated explicitly because the UA's
   `[hidden]` rule ties on specificity with any class that sets `display`
   and loses on source order. */
#submit-btn[hidden] {
  display: none !important;
}
/* Joined to the button above: same accent border, no gap, top corners
   squared so the pair reads as one open control. */
.sched {
  /* Same reason as .sched-cta: must be allowed to shrink inside the
     form's grid column rather than defining its width. */
  min-width: 0;
  margin-bottom: 4px;
  padding: 18px 16px 16px;
  border: 1px solid var(--accent);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: #fff;
  animation: schedDrop 0.18s ease;
}
@keyframes schedDrop {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sched {
    animation: none;
  }
}

.sched__head {
  margin-bottom: 24px;
}
/* The eyebrow's look is inherited from whichever marketing page hosts the
   modal (they differ), but its line-breaking cannot be left to chance:
   both pages style `.eyebrow` without a `display`, so as an inline span it
   rode up onto the Back button's line. */
.sched .eyebrow {
  display: block;
}
/* Block-level with a tight hit area, so Back always owns its line. */
.sched__back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 18px;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s ease;
}
.sched__back:hover {
  color: var(--text);
}
.sched__back svg {
  width: 14px;
  height: 14px;
}
.sched__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.sched__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  background: #fafafa;
}
.sched__chip svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.sched__label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

/* ── The "Or pick a time now" button, injected under the form's submit ──
   A full-width outline button rather than a line of small print: it is the
   faster path to a conversation, and it has to look like something you can
   press. Outline, not filled, so it never competes with "Get in touch"
   directly above it. */
.sched-cta {
  display: flex;
  /* The modal's form is a single-column grid, and a grid item defaults to
     min-width:auto — so without this the panel's day rail (ten chips,
     ~1000px intrinsic) forces the whole column wider and drags the form's
     own fields and submit button out with it. */
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 10px;
  padding: 13px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: "Outfit", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.sched-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(52, 152, 219, 0.04);
}
.sched-cta__chevron {
  width: 12px;
  height: 8px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}
.sched-cta[aria-expanded="true"] {
  border-color: var(--accent);
  color: var(--accent);
  /* Square off against the panel it opens, so the two read as one control. */
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.sched-cta[aria-expanded="true"] .sched-cta__chevron {
  transform: rotate(180deg);
}

/* ── Day rail ─────────────────────────────────────────────────────────── */
.sched__days {
  display: flex;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  scrollbar-width: thin;
}
.sched__day {
  flex: 0 0 auto;
  min-width: 92px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}
.sched__day:hover {
  border-color: var(--border-light);
  color: var(--text);
}
.sched__day.is-selected {
  border-color: var(--accent);
  background: rgba(52, 152, 219, 0.07);
  color: var(--accent);
}
.sched__day-count {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.sched__day.is-selected .sched__day-count {
  color: var(--accent);
}

/* ── Slot grid ────────────────────────────────────────────────────────── */
.sched__slots {
  display: grid;
  min-width: 0;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  /* Ten days of half-hour slots is a long grid inside a modal that already
     scrolls; cap it and let the times scroll on their own. */
  max-height: 188px;
  overflow-y: auto;
}
.sched__slot {
  padding: 11px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-family: var(--body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.sched__slot:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sched__slot.is-selected {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* ── Details ──────────────────────────────────────────────────────────── */
.sched__fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.sched__field {
  display: block;
}
.sched__field input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--text);
  background: #fff;
  transition: border-color 0.2s ease;
}
.sched__field input:focus {
  outline: none;
  border-color: var(--accent);
}
.sched__field input::placeholder {
  color: var(--text-muted);
}

.sched__confirm {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.3s ease,
    transform 0.3s ease,
    opacity 0.2s ease;
}
.sched__confirm:hover:not(:disabled) {
  background: #2980b9;
  transform: translateY(-1px);
}
.sched__confirm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sched__note {
  margin-top: 14px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
  text-align: center;
}
.sched__error {
  margin-top: 14px;
  padding: 11px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fef2f2;
  font-size: 13px;
  color: #b91c1c;
}
.sched__error:empty {
  display: none;
}

/* ── Loading / empty ──────────────────────────────────────────────────── */
.sched__status {
  padding: 40px 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-dim);
}
.sched__spinner {
  width: 22px;
  height: 22px;
  margin: 0 auto 14px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: schedSpin 0.7s linear infinite;
}
@keyframes schedSpin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .sched__spinner {
    animation-duration: 2s;
  }
  .sched__confirm:hover:not(:disabled) {
    transform: none;
  }
}

/* Once the booking is done the panel is moved out of the form and stands
   on its own, so it sheds the border that joined it to its button. */
.sched--standalone {
  border: none;
  border-radius: 0;
  padding: 0;
  margin-bottom: 0;
}

/* ── Confirmation ─────────────────────────────────────────────────────── */
.sched__done {
  text-align: center;
  padding: 8px 0 4px;
}
.sched__done-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.1);
  color: var(--green);
}
.sched__done-icon svg {
  width: 26px;
  height: 26px;
}
.sched__done-title {
  font-family: var(--heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}
.sched__done-when {
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 6px;
}
.sched__done-sent {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 16px;
}
.sched__done-sent strong {
  font-weight: 600;
  word-break: break-word;
}
.sched__done-sub {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 420px;
  margin: 0 auto 14px;
}
.sched__done-sub:last-of-type {
  margin-bottom: 22px;
}
.sched__meet {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition:
    border-color 0.2s ease,
    transform 0.2s ease;
}
.sched__meet:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.sched__meet svg {
  width: 18px;
  height: 18px;
}

@media (max-width: 560px) {
  .sched__fields {
    grid-template-columns: 1fr;
  }
  .sched__slots {
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  }
}
