/* CrispSign Yard Sign Builder — layout stylesheet.
 *
 * Header + drawer + account cluster come from styles.css + site-chrome.css
 * + builder-v2.css (all loaded before this file). We only layer product-
 * specific layout on top and reuse the site design tokens.
 */

/* ═══════════════════════ SHELL LAYOUT ═══════════════════════ */
/* builder-v2.css sets .v2-shell to fixed inset 0 flex-column when
   body[data-v2-shell] is set. Don't redefine here. */

/* Product identity strip */
.ys-context {
  padding: 10px 20px;
  background: #fff;
  border-bottom: 1px solid rgba(10,18,38,0.08);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
.ys-context-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #E81820;
}
.ys-context-sep { color: rgba(10,18,38,0.20); font-weight: 700; }
.ys-context-note { font-size: 13px; color: #5C6273; font-weight: 500; }

/* ═══════════════════════ MAIN SPLIT ═══════════════════════ */
.ys-main {
  flex: 1 1 auto;
  display: flex;
  min-height: 0;
}

.ys-preview {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  background: #11151F;
  overflow: hidden;
}
.ys-preview-inner {
  position: absolute;
  inset: 0;
}
.ys-preview-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* cover because the new landscape 3:2 backdrop matches the preview
     container aspect closely — no need for letterbox. Fills the space. */
  object-fit: cover;
  object-position: center;
  user-select: none;
  -webkit-user-drag: none;
}

/* ── Art slot — positioned + sized by JS from the calibrated baseline.
   Baseline = 24×18 landscape which is the sign face in the hero photo. */
.ys-art-slot {
  position: absolute;
  transition: left .28s cubic-bezier(.4,0,.2,1),
              top .28s cubic-bezier(.4,0,.2,1),
              width .28s cubic-bezier(.4,0,.2,1),
              height .28s cubic-bezier(.4,0,.2,1);
}
/* The visible sign face inside the slot — always 100% of the slot.
   Pure white Coroplast panel. NO fake flute overlay — real Coroplast is
   almost solid white when face-lit; the flute ribs only read subtly
   from the side. Layering a fake gradient on top of uploaded art
   corrupts the customer's design. Left blank so uploaded art shows as
   it will actually print. */
.ys-sign-face {
  position: absolute;
  inset: 0;
  background: #FFFFFF;
  /* Very subtle inner shadow along the top edge suggests the sign sits
     forward of the stake with a hair of separation — no crop of
     uploaded art. */
  box-shadow:
    0 6px 14px rgba(0,0,0,0.28),
    inset 0 1px 0 rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ys-art-placeholder {
  color: rgba(10,18,38,0.45);
  text-align: center;
  padding: 20px;
  font-size: 13px;
  line-height: 1.45;
  font-family: 'Inter', system-ui, sans-serif;
  pointer-events: auto;
}
.ys-art-placeholder-icon {
  font-size: 32px;
  font-weight: 700;
  color: #E81820;
  margin-bottom: 8px;
  line-height: 1;
}
.ys-art-placeholder-cta {
  color: #E81820;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 600;
}
.ys-art-placeholder-cta:hover { color: #C21418; }
.ys-art-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}
.ys-art-img[hidden] { display: none !important; }

/* Fit mode toggle — Fit / Fill / Stretch controls on the Art step */
.ys-fit-mode {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #E4E8EF;
}
.ys-fit-mode[hidden] { display: none; }
.ys-fit-mode-label {
  font-size: 12px;
  font-weight: 700;
  color: #4B5768;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.ys-fit-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ys-fit-tab {
  border: 1.5px solid #DDE3EC;
  background: #FFFFFF;
  border-radius: 10px;
  padding: 12px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.ys-fit-tab:hover { border-color: #E81820; }
.ys-fit-tab.is-active {
  border-color: #E81820;
  background: #FEF3F3;
}
.ys-fit-tab-name {
  font-weight: 700;
  font-size: 13px;
  color: #0A1226;
}
.ys-fit-tab-desc {
  font-size: 11px;
  color: #6E7887;
  line-height: 1.35;
}
@media (max-width: 640px) {
  .ys-fit-mode-tabs { grid-template-columns: 1fr; }
}

/* Chip */
.ys-preview-chip {
  position: absolute;
  left: 20px;
  bottom: 20px;
  background: rgba(10,18,38,0.86);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 5;
  max-width: 480px;
  font-family: 'Inter', system-ui, sans-serif;
}
.ys-chip-eyebrow {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.6);
  margin-bottom: 3px;
  font-weight: 600;
}
.ys-chip-line { font-size: 13px; font-weight: 500; }

/* ═══════════════════════ RAIL ═══════════════════════ */
.ys-rail {
  flex: 0 0 380px;
  background: #fff;
  border-left: 1px solid rgba(10,18,38,0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.ys-rail-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 22px 12px;
  font-family: 'Inter', system-ui, sans-serif;
}

.ys-stepper {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  gap: 4px;
  justify-content: space-between;
}
.ys-stepper li {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 9px;
  font-weight: 600;
  color: #5C6273;
  gap: 4px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.ys-stepper li span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(10,18,38,0.15);
  background: #fff;
  color: #5C6273;
  font-size: 11px;
  font-weight: 700;
}
.ys-stepper li.is-done span {
  background: #E81820;
  border-color: #E81820;
  color: #fff;
  font-size: 0;
}
.ys-stepper li.is-done span::after { content: "✓"; font-size: 12px; }
.ys-stepper li.is-active span {
  background: #0A1226;
  border-color: #0A1226;
  color: #fff;
}
.ys-stepper li.is-active { color: #0A1226; }

.ys-q-step {
  font-size: 10px;
  color: #E81820;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  margin: 0 0 4px;
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
.ys-q-title {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: #0A1226;
  margin: 0 0 6px;
  line-height: 1.15;
}
.ys-q-hint {
  font-size: 13px;
  color: #5C6273;
  margin: 0 0 18px;
  line-height: 1.5;
}

/* ── Size grid — 3+2 flow for 5 tiles ── */
.ys-size-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ys-size-tile {
  border: 1px solid rgba(10,18,38,0.10);
  background: #FAF7F2;
  border-radius: 8px;
  padding: 12px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.ys-size-tile:hover { border-color: #E81820; }
.ys-size-tile.is-active {
  border-color: #E81820;
  background: rgba(232,24,32,0.06);
}
.ys-size-diagram {
  background: #0A1226;
  border-radius: 2px;
  flex-shrink: 0;
  transition: background .15s;
  max-height: 72px;
  max-width: 60px;
}
.ys-size-tile.is-active .ys-size-diagram { background: #E81820; }
/* Custom-size tile: the diagram box shows a plus icon instead of a solid rectangle,
   because the size isn't fixed until the user enters it. */
.ys-size-diagram--custom {
  background: transparent;
  border: 2px dashed #94A1B2;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A1B2;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  transition: border-color .15s, color .15s;
}
.ys-size-tile.is-active .ys-size-diagram--custom {
  background: transparent;
  border-color: #E81820;
  color: #E81820;
}
.ys-size-tile.is-active .ys-size-diagram--custom span { color: #E81820; }

/* Custom size inputs — revealed when Custom tile is selected */
.ys-custom-size {
  margin-top: 12px;
  padding: 14px 16px;
  background: #F5F7FB;
  border: 1px solid #DDE3EC;
  border-radius: 12px;
}
.ys-custom-size[hidden] { display: none; }
.ys-custom-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ys-custom-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ys-custom-label {
  font-size: 11px;
  font-weight: 600;
  color: #4B5768;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ys-custom-input-wrap {
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid #C6CEDA;
  border-radius: 8px;
  padding: 0 12px;
  transition: border-color .15s;
}
.ys-custom-input-wrap:focus-within {
  border-color: #E81820;
  box-shadow: 0 0 0 3px rgba(232,24,32,0.10);
}
.ys-custom-input-wrap input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #0A1226;
  padding: 10px 0;
  width: 100%;
  min-width: 0;
  -moz-appearance: textfield;
}
.ys-custom-input-wrap input::-webkit-outer-spin-button,
.ys-custom-input-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ys-custom-suffix {
  font-size: 13px;
  color: #7A8595;
  font-weight: 500;
  padding-left: 8px;
  flex-shrink: 0;
}
.ys-custom-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: #6E7887;
}
.ys-size-label {
  font-weight: 700;
  color: #0A1226;
  font-size: 13px;
}
.ys-size-note {
  font-size: 10px;
  color: #5C6273;
  text-align: center;
  line-height: 1.2;
}

/* ── Quantity grid ── */
.ys-qty-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.ys-qty-tile {
  border: 1px solid rgba(10,18,38,0.10);
  background: #FAF7F2;
  border-radius: 8px;
  padding: 14px 10px;
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.ys-qty-tile:hover { border-color: #E81820; }
.ys-qty-tile.is-active {
  border-color: #E81820;
  background: rgba(232,24,32,0.06);
}
.ys-qty-num {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 26px;
  color: #0A1226;
  line-height: 1;
  letter-spacing: -0.02em;
}
.ys-qty-note {
  font-size: 11px;
  color: #5C6273;
  margin-top: 4px;
  font-weight: 500;
  line-height: 1.3;
}
.ys-qty-custom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 12px;
  color: #5C6273;
}
.ys-qty-custom input {
  border: 1px solid rgba(10,18,38,0.10);
  border-radius: 6px;
  padding: 8px 10px;
  font-family: inherit;
  font-size: 13px;
  width: 90px;
  color: #0A1226;
  background: #fff;
}
.ys-qty-custom input:focus { outline: 2px solid #E81820; outline-offset: -1px; }

/* ── Login gate (Step 3) ── */
.ys-art-gate {
  border: 1px solid rgba(232,24,32,0.30);
  background: rgba(232,24,32,0.05);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}
.ys-gate-text {
  color: #0A1226;
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
}
.ys-gate-cta {
  display: inline-block;
  background: #E81820;
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: background .15s;
}
.ys-gate-cta:hover { background: #C21418; }

/* ── Upload dropzone ── */
.ys-upload-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 2px dashed rgba(10,18,38,0.20);
  border-radius: 12px;
  background: #FAF7F2;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.ys-upload-drop:hover {
  border-color: #E81820;
  background: rgba(232,24,32,0.05);
}
.ys-upload-drop.is-dragging {
  border-color: #E81820;
  background: rgba(232,24,32,0.10);
}
.ys-upload-icon { font-size: 30px; color: #E81820; font-weight: 700; line-height: 1; }
.ys-upload-text { font-weight: 600; font-size: 14px; color: #0A1226; }
.ys-upload-sub { font-size: 11px; color: #5C6273; }
.ys-upload-status {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(34,197,94,0.10);
  color: #22C55E;
  font-size: 12px;
  font-weight: 500;
}
.ys-upload-fine {
  font-size: 11px;
  color: #5C6273;
  margin-top: 12px;
  line-height: 1.4;
  font-style: italic;
}

/* ── Options ── */
.ys-opt-row {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  gap: 4px 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(10,18,38,0.08);
  cursor: pointer;
}
.ys-opt-row:last-child { border-bottom: none; }
.ys-opt-name { font-weight: 600; font-size: 14px; color: #0A1226; grid-column: 1; }
.ys-opt-desc { font-size: 12px; color: #5C6273; grid-column: 1; grid-row: 2; }
.ys-opt-toggle { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.ys-opt-toggle input[type="checkbox"] {
  appearance: none;
  width: 44px; height: 24px;
  border-radius: 12px;
  background: rgba(10,18,38,0.15);
  position: relative;
  cursor: pointer;
  transition: background .15s;
  margin: 0;
}
.ys-opt-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform .15s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.ys-opt-toggle input[type="checkbox"]:checked { background: #E81820; }
.ys-opt-toggle input[type="checkbox"]:checked::before { transform: translateX(20px); }
.ys-opt-toggle input[type="number"],
.ys-opt-toggle .ys-opt-select {
  border: 1px solid rgba(10,18,38,0.10);
  border-radius: 6px;
  padding: 6px 10px;
  font-family: inherit;
  font-size: 12px;
  background: #fff;
  color: #0A1226;
}
.ys-opt-toggle input[type="number"] { width: 60px; text-align: center; }
.ys-opt-toggle .ys-opt-select { min-width: 140px; }

/* ── Review ── */
.ys-review-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  row-gap: 8px;
  column-gap: 12px;
  font-size: 13px;
}
.ys-review-list dt { color: #5C6273; }
.ys-review-list dd { margin: 0; color: #0A1226; font-weight: 500; text-align: right; }

/* ═══════════════════════ RAIL FOOTER ═══════════════════════ */
.ys-rail-foot {
  flex-shrink: 0;
  border-top: 1px solid rgba(10,18,38,0.08);
  padding: 14px 22px;
  background: #fff;
  font-family: 'Inter', system-ui, sans-serif;
}
.ys-total { margin-bottom: 12px; }
.ys-total-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #5C6273;
  font-weight: 600;
}
.ys-total-value {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  font-weight: 700;
  font-size: 30px;
  color: #E81820;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 3px 0 2px;
}
.ys-total-note {
  font-size: 11px;
  color: #22C55E;
  font-weight: 500;
}

/* Locked price block (shown when logged out) */
.ys-locked {
  margin-bottom: 12px;
}
.ys-locked-urgency {
  font-size: 12px;
  color: #0A1226;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.4;
  display: flex;
  align-items: baseline;
  gap: 6px;
  animation: ysLockedPulse 2.4s ease-in-out infinite;
}
.ys-locked-star {
  color: #E81820;
  font-size: 14px;
  animation: ysStarSpin 3.6s ease-in-out infinite;
}
@keyframes ysLockedPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.72; } }
@keyframes ysStarSpin { 0%, 100% { transform: rotate(0deg); } 50% { transform: rotate(18deg); } }
@media (prefers-reduced-motion: reduce) {
  .ys-locked-urgency, .ys-locked-star { animation: none; }
}
.ys-locked-cta {
  display: inline-block;
  width: 100%;
  text-align: center;
  background: #E81820;
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .15s;
  box-sizing: border-box;
}
.ys-locked-cta:hover { background: #C21418; }

.ys-navrow { display: flex; gap: 8px; }
.ys-btn-primary,
.ys-btn-ghost {
  flex: 1;
  padding: 12px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, border-color .15s;
  border: none;
}
.ys-btn-primary { background: #E81820; color: #fff; }
.ys-btn-primary:hover:not(:disabled) { background: #C21418; }
.ys-btn-primary:disabled {
  background: rgba(10,18,38,0.20);
  color: rgba(10,18,38,0.50);
  cursor: not-allowed;
}
.ys-btn-ghost {
  background: transparent;
  color: #0A1226;
  border: 1px solid rgba(10,18,38,0.15);
}
.ys-btn-ghost:hover:not(:disabled) { border-color: #0A1226; }
.ys-btn-ghost:disabled { color: rgba(10,18,38,0.30); cursor: not-allowed; }

/* ═══════════════════════ RESPONSIVE ═══════════════════════ */
@media (max-width: 900px) {
  .ys-main { flex-direction: column; }
  .ys-preview { min-height: 50vh; }
  .ys-rail {
    flex: 1 1 auto;
    border-left: none;
    border-top: 1px solid rgba(10,18,38,0.08);
  }
  .ys-size-grid { grid-template-columns: repeat(2, 1fr); }
}
