/* ============================================================================
   PRINT — controls specific to the quote builder.
   The page frame, steps, fields, summary panel and mobile bar are shared with
   the studio booking and live in form.css.
   ============================================================================ */

/* ----------------------------------------------------------- print areas -- */
.areas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 700px) {
  .areas {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 76px;
  padding: 12px 12px 11px;
  border: 1px solid var(--stock-line);
  border-radius: var(--r-control);
  background: var(--stock);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}

.area:hover {
  border-color: #e0c8bc;
  background: #fffaf7;
}

.area.is-on {
  border-color: var(--flame);
  background: var(--flame-wash);
}

.area__tick {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 17px;
  height: 17px;
  border: 1.5px solid #dfc8bc;
  border-radius: 5px;
  background: var(--stock);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.area.is-on .area__tick {
  border-color: var(--flame);
  background: var(--flame);
}

.area.is-on .area__tick::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.5px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(43deg);
}

.area__name {
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  padding-right: 22px;
  line-height: 1.3;
}

.area__tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--flame-deep);
  background: var(--flame-wash);
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: 2px;
}

.area.is-on .area__tag {
  background: #ffdccd;
}

.area__price {
  margin-top: auto;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--on-stock-soft);
  font-variant-numeric: tabular-nums;
}

.area.is-on .area__price {
  color: var(--flame-deep);
}

/* ------------------------------------------------------ garment preview --- */
.preview {
  margin-top: 16px;
  padding: 14px 14px 8px;
  border-radius: var(--r-control);
  background:
    radial-gradient(70% 80% at 50% 18%, #fff 0%, rgba(255, 255, 255, 0) 70%),
    var(--stock-warm);
  border: 1px solid var(--stock-line);
}

.preview__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--on-stock-soft);
  margin-bottom: 4px;
}

.preview__live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.68rem;
  color: var(--flame-deep);
}

.preview__live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--flame);
}

@media (prefers-reduced-motion: no-preference) {
  .preview__live::before {
    animation: live-blip 2.4s ease-in-out infinite;
  }
}

@keyframes live-blip {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.32; }
}

.shirt-svg {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(23, 17, 14, 0.12));
}

.shirt-body {
  fill: url(#fabricGrad);
  stroke: var(--shirt-line, #2a2a2a);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: stroke var(--dur) var(--ease);
}

.shirt-sleeve {
  fill: url(#sleeveGrad);
  stroke: var(--shirt-line, #2a2a2a);
  stroke-width: 1.5;
  stroke-linejoin: round;
  transition: stroke var(--dur) var(--ease);
}

.seam {
  fill: none;
  stroke: var(--shirt-line, #2a2a2a);
  stroke-width: 0.6;
  opacity: 0.5;
}

.stitch {
  fill: none;
  stroke: var(--shirt-line, #2a2a2a);
  stroke-width: 0.7;
  stroke-dasharray: 2.5 2;
  stroke-linecap: round;
  opacity: 0.55;
}

.neck-ribbon {
  fill: var(--shirt-line, #2a2a2a);
  opacity: 0.35;
}

.neck-band {
  fill: none;
  stroke: var(--shirt-line, #2a2a2a);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.polo-collar-fill {
  fill: url(#collarGrad);
  stroke: var(--shirt-line, #2a2a2a);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.polo-collar,
.polo-placket {
  display: none;
}

#cpsQuote.is-polo .polo-collar,
#cpsQuote.is-polo .polo-placket {
  display: block;
}

#cpsQuote.is-polo .neck-band,
#cpsQuote.is-polo .neck-ribbon {
  display: none;
}

.view-label {
  fill: #a08a7d;
  font-family: 'Archivo', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.print-marker {
  fill: url(#markerGrad);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  transform: scale(0.4);
  pointer-events: none;
  transition: opacity 300ms var(--ease), transform 420ms var(--ease);
}

.print-marker.active {
  opacity: 0.92;
  transform: scale(1);
}

/* --------------------------------------------------------- colour rows --- */
.row + .row {
  margin-top: 10px;
}

.row {
  border: 1px solid var(--stock-line);
  border-radius: var(--r-control);
  padding: 12px;
  background: #fffcfa;
}

.row__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
}

.row__qty {
  margin-left: auto;
  font-size: 0.84rem;
  color: var(--on-stock-soft);
  white-space: nowrap;
}

.row__qty b {
  color: var(--on-stock);
  font-variant-numeric: tabular-nums;
}

.row__x {
  flex: none;
  width: 32px;
  height: 32px;
  border: 1px solid var(--stock-line);
  border-radius: 9px;
  background: var(--stock);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color var(--dur) var(--ease), color var(--dur) var(--ease),
    background var(--dur) var(--ease);
}

.row__x svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.row__x:hover {
  border-color: var(--heart);
  color: var(--heart);
  background: #fff5f5;
}

/* colour picker */
.swatchpick {
  position: relative;
  min-width: 0;
}

.swatchpick__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--stock-line);
  border-radius: 999px;
  background: var(--stock);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease);
}

.swatchpick__btn:hover {
  border-color: #e0c8bc;
}

.swatchpick__btn svg {
  width: 10px;
  height: 7px;
  fill: none;
  stroke: var(--on-stock-soft);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform var(--dur) var(--ease);
}

.swatchpick.is-open .swatchpick__btn svg {
  transform: rotate(180deg);
}

.swatchpick__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 13ch;
}

.swatch {
  width: 18px;
  height: 18px;
  flex: none;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(23, 17, 14, 0.16);
}

.swatchpick__menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  width: 214px;
  max-height: 262px;
  overflow-y: auto;
  padding: 6px;
  background: var(--stock);
  border: 1px solid var(--stock-line);
  border-radius: 14px;
  box-shadow: var(--lift-3);
  display: none;
}

.swatchpick.is-open .swatchpick__menu {
  display: block;
}

.swatchpick__menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background var(--dur) var(--ease);
}

.swatchpick__menu button:hover {
  background: var(--flame-wash);
}

.swatchpick__menu button[aria-selected='true'] {
  background: var(--flame-wash);
  font-weight: 700;
}

/* size grid */
.sizes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

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

.size {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 2px 5px;
  border: 1px solid var(--stock-line);
  border-radius: 9px;
  background: var(--stock);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.size > span {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--on-stock-soft);
}

.size input {
  width: 100%;
  min-height: 32px;
  border: 0;
  background: transparent;
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--on-stock-soft);
  -moz-appearance: textfield;
}

.size input::-webkit-outer-spin-button,
.size input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.size.has-qty {
  border-color: var(--flame);
  background: var(--flame-wash);
}

.size.has-qty input {
  color: var(--flame-deep);
}

.row__add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: 12px;
  padding: 0 16px;
  border: 1px dashed #dfc8bc;
  border-radius: 999px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--flame-deep);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.row__add:hover {
  border-color: var(--flame);
  border-style: solid;
  background: var(--flame-wash);
}

/* ------------------------------------------------------------ tier meter -- */
.tier {
  margin-top: 20px;
  padding: 15px 16px 14px;
  border-radius: var(--r-control);
  background: #f7f0ec;
}

.tier__track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  background: #e6d6cd;
  overflow: hidden;
}

/* Clipped rather than resized: the width stays at 100% so the gradient never
   stretches, and clip-path composites instead of forcing layout. */
.tier__fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--flame-hot), var(--flame));
  clip-path: inset(0 calc(100% - var(--pct, 0%)) 0 0 round 999px);
  transition: clip-path 420ms var(--ease);
}

/* Stacked on phones — side by side these wrap to two ragged lines each. */
.tier__marks {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--on-stock-soft);
}

@media (min-width: 560px) {
  .tier__marks {
    grid-auto-flow: column;
    justify-content: space-between;
    gap: 12px;
  }
}

.tier__marks span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tier__marks span::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8c3b7;
  transition: background var(--dur) var(--ease);
}

.tier__marks span.is-hit {
  color: var(--flame-deep);
  font-weight: 700;
}

.tier__marks span.is-hit::before {
  background: var(--flame);
}

.tier__hint {
  margin-top: 11px;
  font-size: 0.88rem;
  color: var(--on-stock-soft);
  line-height: 1.45;
}

.tier__hint b {
  color: var(--on-stock);
}

.tier__hint .ok {
  color: var(--good);
}
