/**
 * Yard Scope — "Yard Snapshot" styles.
 *
 * Enqueued by inc/yard-scope/yard-scope.php (flag-gated) on:
 *   - /client-signup/ (form section, scope A)
 *   - /open-client-requests/ (volunteer scope card, scope B)
 *
 * Scope A is double-scoped (.page-id-21 / .cs-signup) with !important per
 * house rule for page-specific CSS overriding theme defaults.
 * Scope B lives in vp-system context (.ocr-card) — no !important needed.
 *
 * Contract: docs/IWTMYL-Yard-Scope-Build-Contract-20260611.md
 */


/* ════════════════════════════════════════════════════════════════════
   SCOPE A — client-signup form section (.ys-*)
   ════════════════════════════════════════════════════════════════════ */

/* ── Fieldset / legend resets (legend styled like .form-group label) ── */

.page-id-21 .ys-fieldset,
.cs-signup .ys-fieldset {
  border: 0 !important;
  padding: 0 !important;
  margin: 0 0 22px !important;
  min-width: 0 !important;
}

.page-id-21 .ys-legend,
.cs-signup .ys-legend {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
  padding: 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1c3a2a !important;
  margin-bottom: 6px !important;
  line-height: 1.4 !important;
}

.page-id-21 .ys-intro,
.cs-signup .ys-intro {
  font-size: 15px !important;
  color: #2f2f2f !important;
  line-height: 1.55 !important;
  margin: 0 0 8px !important;
}

/* ── Radio tiles ── */

.page-id-21 .ys-tile-grid,
.cs-signup .ys-tile-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 10px !important;
}

.page-id-21 .ys-tile,
.cs-signup .ys-tile {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
  background: #fff !important;
  border: 1px solid #dfe8e1 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  margin: 0 !important;
  cursor: pointer !important;
  transition: border-color .15s ease, box-shadow .15s ease !important;
}

/* Native input stays accessible-hidden (focusable; NOT display:none) —
   mirrors the existing custom-radio pattern in css/client-signup.css. */
.page-id-21 .ys-tile input,
.cs-signup .ys-tile input {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

.page-id-21 .ys-tile-title,
.cs-signup .ys-tile-title {
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #1c3a2a !important;
  line-height: 1.35 !important;
}

.page-id-21 .ys-tile-sub,
.cs-signup .ys-tile-sub {
  font-size: 13px !important;
  color: #5f6b63 !important;
  line-height: 1.4 !important;
}

.page-id-21 .ys-tile-sub:empty,
.cs-signup .ys-tile-sub:empty {
  display: none !important;
}

/* Checked state — :has() where supported, .is-checked JS fallback.
   Kept as SEPARATE rules: an unsupported :has() in a comma list would
   invalidate the whole rule and kill the fallback in older browsers. */
.page-id-21 .ys-tile:has(input:checked),
.cs-signup .ys-tile:has(input:checked) {
  border-color: #2f7d4d !important;
  background: #eef6f0 !important;
}

.page-id-21 .ys-tile.is-checked,
.cs-signup .ys-tile.is-checked {
  border-color: #2f7d4d !important;
  background: #eef6f0 !important;
}

/* Keyboard focus ring on the tile. :focus-within (separate rule) covers
   no-:has browsers. */
.page-id-21 .ys-tile:has(input:focus-visible),
.cs-signup .ys-tile:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(47, 125, 77, .35) !important;
}

/* Keyboard focus ring on the checkbox groups + the partial-visit ack — the
   host .custom-checkbox pattern accessible-hides the native inputs and ships
   NO focus style of its own (WCAG 2.4.7). :focus-visible first; plain :focus
   fallback kept as a SEPARATE rule so old browsers don't drop the list. */
.page-id-21 .ys-check-grid input:focus-visible + .custom-checkbox,
.cs-signup .ys-check-grid input:focus-visible + .custom-checkbox,
.page-id-21 .ys-ack input:focus-visible + .custom-checkbox,
.cs-signup .ys-ack input:focus-visible + .custom-checkbox {
  box-shadow: 0 0 0 3px rgba(47, 125, 77, 0.35) !important;
  border-color: #2f7d4d !important;
}

.page-id-21 .ys-check-grid input:focus + .custom-checkbox,
.cs-signup .ys-check-grid input:focus + .custom-checkbox,
.page-id-21 .ys-ack input:focus + .custom-checkbox,
.cs-signup .ys-ack input:focus + .custom-checkbox {
  box-shadow: 0 0 0 3px rgba(47, 125, 77, 0.35) !important;
  border-color: #2f7d4d !important;
}

.page-id-21 .ys-tile:focus-within,
.cs-signup .ys-tile:focus-within {
  box-shadow: 0 0 0 3px rgba(47, 125, 77, .35) !important;
}

/* ── Checkbox grids (reuse existing .custom-checkbox label pattern) ── */

.page-id-21 .ys-check-grid,
.cs-signup .ys-check-grid {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 4px 16px !important;
}

.page-id-21 .ys-check-grid label,
.cs-signup .ys-check-grid label {
  margin-bottom: 8px !important;
}

@media (min-width: 600px) {
  .page-id-21 .ys-tile-grid,
  .cs-signup .ys-tile-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .page-id-21 .ys-check-grid,
  .cs-signup .ys-check-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* ── Enrichment status note + skeleton shimmer ── */

.page-id-21 .ys-enrich-note,
.cs-signup .ys-enrich-note {
  font-size: 14px !important;
  color: #48534c !important;
  line-height: 1.5 !important;
  border-radius: 8px !important;
  margin: 0 0 8px !important;
}

.page-id-21 .ys-enrich-note:empty,
.cs-signup .ys-enrich-note:empty {
  display: none !important;
}

.page-id-21 .ys-enrich-note.ys-skel,
.cs-signup .ys-enrich-note.ys-skel {
  padding: 10px 14px !important;
  color: #5f6b63 !important;
  background: linear-gradient(90deg, #f0f4f1 25%, #e2ebe4 37%, #f0f4f1 63%) !important;
  background-size: 400% 100% !important;
  animation: ys-shimmer 1.2s ease infinite !important;
}

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

/* ── Amber notes (heavy-yard message, photo soft note) ── */

.page-id-21 .ys-note-amber,
.cs-signup .ys-note-amber {
  background: #fff8f0 !important;
  border-left: 4px solid #d89b76 !important;
  padding: 12px 16px !important;
  color: #48534c !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin: 8px 0 12px !important;
}

/* ── Conditional-required asterisk ── */

.page-id-21 .ys-req,
.cs-signup .ys-req {
  color: #c0392b !important;
}

/* ── Photo slot rows ── */

.page-id-21 .ys-photo-slot,
.cs-signup .ys-photo-slot {
  margin-bottom: 14px !important;
}

.page-id-21 .ys-photo-slot label,
.cs-signup .ys-photo-slot label {
  display: block !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1c3a2a !important;
  margin-bottom: 6px !important;
  cursor: pointer !important;
}

/* ── Reduced motion ── */

@media (prefers-reduced-motion: reduce) {
  .page-id-21 .ys-enrich-note.ys-skel,
  .cs-signup .ys-enrich-note.ys-skel {
    animation: none !important;
  }
  .page-id-21 .ys-tile,
  .cs-signup .ys-tile {
    transition: none !important;
  }
}


/* ════════════════════════════════════════════════════════════════════
   SCOPE B — volunteer scope card (.ocr-scope component root).
   Scoped to the component itself so it styles identically inside the
   OCR list cards (.ocr-card) AND the deep-link view (.ocr-deep-link-card).
   vp-system context: no !important required.
   ════════════════════════════════════════════════════════════════════ */

.ocr-scope {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5eae6;
  font-size: 13.5px;
  color: #48534c;
  line-height: 1.5;
}

/* Compact public tier: badge + size + grass on one wrapping line. */
.ocr-scope-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.ocr-scope-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

/* Level scale: green -> amber -> deep amber -> muted violet. Never red.
   Text colors hold >= 4.5:1 (WCAG AA) on their pill backgrounds. */
.ocr-scope-badge--light {
  background: #eef6f0;
  color: #2f7d4d;
}

.ocr-scope-badge--standard {
  background: #eef6f0;
  color: #1c3a2a;
}

.ocr-scope-badge--heavy {
  background: #fff8f0;
  color: #855a2c;
}

.ocr-scope-badge--complex {
  background: #fff8f0;
  color: #7c5126;
}

.ocr-scope-badge--crew {
  background: #f4f0fa;
  color: #5b4a8a;
}

.ocr-scope-detail {
  margin-top: 8px;
}

.ocr-scope-line {
  margin: 4px 0;
  line-height: 1.5;
}

.ocr-scope-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}

.ocr-scope-chip,
.ocr-scope-chips > span {
  background: #f3f6f4;
  border: 1px solid #dfe8e1;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 12px;
  color: #48534c;
  line-height: 1.5;
}

.ocr-scope-equipment-list {
  margin: 4px 0 4px 18px;
  padding: 0;
}

.ocr-scope-equipment-list li {
  margin: 2px 0;
}

.ocr-scope-approx .vp-muted,
.ocr-scope-locked {
  font-size: 12.5px;
  color: #5f6b63;
}

.ocr-scope-locked {
  margin: 6px 0 0;
}

.ocr-scope-summary {
  margin: 6px 0 0;
  color: #5f6b63;
}


/* ════════════════════════════════════════════════════════════════════
   SCOPE C — conditional reveal + guided wizard (2026-06-11 redesign).
   Form scope: dual-scoped + !important per house rule. Progressive
   enhancement — without the .ys-wizard--js class (added by JS) every step
   is visible and stacked (accessible no-JS fallback); the wizard chrome is
   hidden until JS turns it on.
   ════════════════════════════════════════════════════════════════════ */

/* --- Conditional reveal (collapsed until a lawn service is selected) --- */
.page-id-21 .ys-reveal,
.cs-signup .ys-reveal {
  overflow: hidden !important;
  max-height: 6000px;
  opacity: 1;
}
/* Transitions only enable after first paint (.ys-anim) so the initial
   load-time collapse is instant, not a visible slam-shut. */
.page-id-21 .ys-reveal.ys-anim,
.cs-signup .ys-reveal.ys-anim {
  transition: max-height .45s ease, opacity .3s ease !important;
}
.page-id-21 .ys-reveal.is-collapsed,
.cs-signup .ys-reveal.is-collapsed {
  max-height: 0 !important;
  opacity: 0 !important;
}

/* --- Wizard chrome: hidden in the no-JS fallback, shown once JS is on --- */
.page-id-21 .ys-wizard-progress,
.page-id-21 .ys-wizard-count,
.page-id-21 .ys-wizard-nav,
.page-id-21 .ys-wizard-skip,
.cs-signup .ys-wizard-progress,
.cs-signup .ys-wizard-count,
.cs-signup .ys-wizard-nav,
.cs-signup .ys-wizard-skip {
  display: none !important;
}
.page-id-21 .ys-wizard--js .ys-wizard-progress,
.cs-signup .ys-wizard--js .ys-wizard-progress {
  display: block !important;
  height: 6px !important;
  background: #e8ece7 !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin: 12px 0 6px !important;
}
.page-id-21 .ys-wizard--js .ys-wizard-progress-bar,
.cs-signup .ys-wizard--js .ys-wizard-progress-bar {
  display: block !important;
  height: 100% !important;
  width: 0;
  background: #2f7d4d !important;
  border-radius: 999px !important;
  transition: width .3s ease !important;
}
.page-id-21 .ys-wizard--js .ys-wizard-count,
.cs-signup .ys-wizard--js .ys-wizard-count {
  display: block !important;
  font-size: 12.5px !important;
  color: #5f6b63 !important;
  margin: 0 0 14px !important;
}
.page-id-21 .ys-wizard-intro,
.cs-signup .ys-wizard-intro {
  font-size: 13.5px !important;
  color: #5f6b63 !important;
  margin: 6px 0 0 !important;
}

/* --- Steps: stacked by default (fallback); one-at-a-time in wizard mode --- */
.page-id-21 .ys-wizard--js .ys-step,
.cs-signup .ys-wizard--js .ys-step {
  display: none !important;
}
.page-id-21 .ys-wizard--js .ys-step.is-current,
.cs-signup .ys-wizard--js .ys-step.is-current {
  display: block !important;
  animation: ys-slide-in-right .32s ease;
  outline: none;
}
.page-id-21 .ys-wizard--js .ys-step.is-current.is-back,
.cs-signup .ys-wizard--js .ys-step.is-current.is-back {
  animation: ys-slide-in-left .32s ease;
}
.page-id-21 .ys-wizard--js .ys-step,
.cs-signup .ys-wizard--js .ys-step {
  min-height: 1px;
}
.page-id-21 .ys-step .ys-step-reassure,
.cs-signup .ys-step .ys-step-reassure {
  margin-top: 0 !important;
}

@keyframes ys-slide-in-right {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ys-slide-in-left {
  from { opacity: 0; transform: translateX(-30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* --- Navigation buttons --- */
.page-id-21 .ys-wizard--js .ys-wizard-nav,
.cs-signup .ys-wizard--js .ys-wizard-nav {
  display: flex !important;
  gap: 10px !important;
  align-items: center !important;
  margin-top: 18px !important;
}
.page-id-21 .ys-nav-btn,
.cs-signup .ys-nav-btn {
  font: inherit !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  padding: 11px 20px !important;
  cursor: pointer !important;
  border: 1px solid transparent !important;
  min-height: 44px !important;
}
.page-id-21 .ys-nav-next,
.cs-signup .ys-nav-next {
  background: #2f7d4d !important;
  color: #fff !important;
  margin-left: auto !important;
}
.page-id-21 .ys-nav-next:hover,
.cs-signup .ys-nav-next:hover {
  background: #276741 !important;
}
.page-id-21 .ys-nav-back,
.cs-signup .ys-nav-back {
  background: #fff !important;
  color: #1c3a2a !important;
  border-color: #dfe8e1 !important;
}
.page-id-21 .ys-nav-back:hover,
.cs-signup .ys-nav-back:hover {
  background: #f7faf8 !important;
}
.page-id-21 .ys-nav-back[hidden],
.cs-signup .ys-nav-back[hidden] {
  display: none !important;
}
.page-id-21 .ys-wizard--js .ys-wizard-skip,
.cs-signup .ys-wizard--js .ys-wizard-skip {
  display: block !important;
  text-align: center !important;
  margin-top: 12px !important;
}
.page-id-21 .ys-nav-skip,
.cs-signup .ys-nav-skip {
  background: none !important;
  border: none !important;
  color: #5f6b63 !important;
  font: inherit !important;
  font-size: 13px !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  padding: 6px 10px !important;
}
.page-id-21 .ys-nav-skip:hover,
.cs-signup .ys-nav-skip:hover {
  color: #2f7d4d !important;
}
.page-id-21 .ys-ack-hint,
.cs-signup .ys-ack-hint {
  color: #b06a3f !important;
  font-size: 13px !important;
  margin: 8px 0 0 !important;
}

/* --- Buttons gain visible keyboard focus rings --- */
.page-id-21 .ys-nav-btn:focus-visible,
.cs-signup .ys-nav-btn:focus-visible,
.page-id-21 .ys-nav-skip:focus-visible,
.cs-signup .ys-nav-skip:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(47, 125, 77, 0.35) !important;
}

@media (prefers-reduced-motion: reduce) {
  .page-id-21 .ys-reveal.ys-anim,
  .cs-signup .ys-reveal.ys-anim,
  .page-id-21 .ys-wizard--js .ys-step.is-current,
  .cs-signup .ys-wizard--js .ys-step.is-current,
  .page-id-21 .ys-wizard--js .ys-wizard-progress-bar,
  .cs-signup .ys-wizard--js .ys-wizard-progress-bar {
    transition: none !important;
    animation: none !important;
  }
}

/* --- Completed / skipped summary (JS-built when the wizard finishes) --- */
.page-id-21 .ys-done,
.cs-signup .ys-done {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 10px 14px !important;
  margin-top: 14px !important;
  padding: 14px 16px !important;
  background: #eef6f0 !important;
  border: 1px solid #dce9df !important;
  border-left: 4px solid #2f7d4d !important;
  border-radius: 10px !important;
}
.page-id-21 .ys-done-msg,
.cs-signup .ys-done-msg {
  margin: 0 !important;
  color: #1c3a2a !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  flex: 1 1 60% !important;
  outline: none !important;
}
.page-id-21 .ys-done-msg::before,
.cs-signup .ys-done-msg::before {
  content: "\2713\00a0";
  color: #2f7d4d !important;
  font-weight: 700 !important;
}
.page-id-21 .ys-done .ys-done-edit,
.cs-signup .ys-done .ys-done-edit {
  margin-left: auto !important;
}
