/* ============================================================
   ReUp Resoles — order page
   Reuses tokens, .btn, .nav, .footer from styles.css. Adds the
   form + summary layout in the same ink-on-paper, solid-shadow
   print-shop style.
   ============================================================ */

.order-page { min-height: 100vh; }

.order { padding: calc(var(--nav-h) + clamp(40px, 7vh, 80px)) 0 clamp(70px, 10vh, 120px); }
.order__head { max-width: 720px; margin-bottom: clamp(34px, 5vh, 56px); }
.order__head .h2 { margin-bottom: 22px; }
.order__head .lead { color: var(--ink-soft); }

.order__layout {
  display: grid;
  grid-template-columns: 1fr clamp(300px, 32%, 380px);
  gap: clamp(24px, 3.5vw, 48px);
  align-items: start;
}

/* ---------- FIELDSETS ---------- */
.order__fields { display: grid; gap: clamp(18px, 2.5vw, 28px); min-width: 0; }
.ofield {
  border: 2px solid var(--line);
  background: var(--card);
  box-shadow: 6px 6px 0 var(--shadow);
  padding: clamp(20px, 3vw, 32px);
}
.ofield__legend {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.78rem; letter-spacing: 0.14em; font-weight: 700;
  color: var(--ink); margin-bottom: 20px; padding: 0;
}
.ofield__legend span {
  display: inline-grid; place-items: center;
  width: 28px; height: 28px;
  background: var(--green); color: var(--on-green);
  border: 2px solid var(--line);
}
.ofield__note { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-soft); margin-top: 16px; }
.ofield__note a { color: var(--green-text); text-decoration: underline; }

/* ---------- RADIO CARDS ---------- */
.opick { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.opick__opt { cursor: pointer; }
.opick__opt input { position: absolute; opacity: 0; pointer-events: none; }
.opick__card {
  display: flex; flex-direction: column; gap: 8px; height: 100%;
  border: 2px solid var(--line); background: var(--paper);
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 18px 18px 16px;
  transition: translate 0.18s var(--ease), box-shadow 0.18s var(--ease), background-color 0.2s;
}
.opick__opt:hover .opick__card { translate: 2px 2px; box-shadow: 2px 2px 0 var(--shadow); }
.opick__opt input:checked + .opick__card {
  background: var(--green); color: var(--on-green);
  box-shadow: 4px 4px 0 var(--shadow);
}
.opick__opt input:focus-visible + .opick__card { outline: 3px solid var(--green); outline-offset: 3px; }
.opick__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.15rem; line-height: 1; }
.opick__desc { font-size: 0.68rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.opick__opt input:checked + .opick__card .opick__desc { color: var(--on-green); }
.opick__price { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; margin-top: auto; }
.opick--slim .opick__card--slim { gap: 6px; }

/* The conditionally-shown partner-wall picker sits directly under the
   delivery cards — give it clearance so its label doesn't collide with
   the cards' offset drop-shadow. */
#dropoffWrap { margin-top: 20px; }

/* ---------- TEXT INPUTS / SELECT ---------- */
.oinput { margin-bottom: 18px; }
.oinput:last-child { margin-bottom: 0; }
.oinput--row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.oinput__label {
  display: block; font-size: 0.7rem; letter-spacing: 0.1em; font-weight: 700;
  color: var(--ink-soft); margin-bottom: 8px;
}
.oinput__label span { color: var(--green-text); }

.oinput input,
.oinput textarea,
.oselect select {
  width: 100%; font-family: var(--font-body); font-size: 0.98rem;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--line); border-radius: 0;
  padding: 13px 15px;
  transition: box-shadow 0.18s var(--ease), border-color 0.18s;
}
.oinput textarea { resize: vertical; }
.oinput input::placeholder, .oinput textarea::placeholder { color: var(--ink-soft); opacity: 0.7; }
.oinput input:focus,
.oinput textarea:focus,
.oselect select:focus {
  outline: none; border-color: var(--green);
  box-shadow: 4px 4px 0 var(--green);
}

.oselect { position: relative; }
.oselect::after {
  content: "▾"; position: absolute; right: 16px; top: 50%; translate: 0 -50%;
  pointer-events: none; color: var(--green-text); font-size: 0.9rem;
}
.oselect select { appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer; }

/* ---------- PHOTO UPLOAD ---------- */
.ophotos { margin-top: 24px; padding-top: 22px; border-top: 2px solid var(--line); }
.ophotos__hint { font-size: 0.78rem; line-height: 1.5; color: var(--ink-soft); margin: -2px 0 12px; }
.ophotos__drop {
  display: flex; align-items: center; justify-content: center;
  padding: 22px 16px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line); background: var(--paper);
  transition: border-color 0.18s var(--ease), background 0.18s;
}
.ophotos__drop:hover, .ophotos__drop.is-over {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 8%, var(--paper));
}
.ophotos__drop-txt { font-size: 0.78rem; letter-spacing: 0.12em; color: var(--green-text); font-weight: 700; }
.ophotos__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.ophotos__grid:empty { margin-top: 0; }
.ophoto { position: relative; aspect-ratio: 1; border: 2px solid var(--line); overflow: hidden; background: var(--paper); }
.ophoto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ophoto--error { border-color: #c0392b; }
.ophoto__rm {
  position: absolute; top: 4px; right: 4px; width: 22px; height: 22px;
  display: grid; place-items: center; cursor: pointer; border: none;
  background: var(--fixed-dark); color: var(--on-dark); font-size: 1.05rem; line-height: 1;
}
.ophoto__state {
  position: absolute; left: 4px; bottom: 4px; padding: 2px 5px;
  background: var(--fixed-dark); color: var(--on-dark);
  font-size: 0.6rem; letter-spacing: 0.08em;
}
.ophoto--error .ophoto__state { background: #c0392b; }
.ophotos__status { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--ink-soft); margin-top: 10px; }
@media (max-width: 560px) { .ophotos__grid { grid-template-columns: repeat(3, 1fr); } }

/* ---------- SUMMARY ---------- */
.order__summary { position: sticky; top: calc(var(--nav-h) + 20px); }
.osum {
  border: 2px solid var(--line);
  background: var(--fixed-dark); color: var(--on-dark);
  box-shadow: 8px 8px 0 var(--shadow);
  padding: clamp(22px, 3vw, 30px);
}
.osum__title { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--green-hot); margin-bottom: 18px; }
.osum__lines { display: grid; gap: 2px; border-top: 2px solid rgba(243,240,231,0.22); }
.osum__row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 12px 0; border-bottom: 2px dashed rgba(243,240,231,0.22);
  font-size: 0.88rem;
}
.osum__row dt { color: var(--on-dark-dim); }
.osum__row dd { text-align: right; font-weight: 600; max-width: 60%; }
.osum__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 22px 0 20px;
}
.osum__total .mono { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--on-dark-dim); }
.osum__total strong {
  font-family: var(--font-display); font-weight: 800; font-size: 2.6rem; line-height: 1;
  color: var(--green-hot);
}
.osum .btn { margin-bottom: 14px; }
.osum__secure { font-size: 0.64rem; letter-spacing: 0.08em; color: var(--on-dark-dim); text-align: center; line-height: 1.6; }
#payError { color: var(--green-hot); min-height: 0; }
#payError:empty { display: none; }
.btn.is-busy { opacity: 0.6; pointer-events: none; }

/* ---------- CONFIRMATION PAGES (success / cancel) ----------
   The shared .h2 is sized for full-width section headers and overflows
   a narrow centred card on mobile. Cap + allow wrapping here only. */
.ofield .h2 {
  font-size: clamp(2rem, 8vw, 4rem);
  overflow-wrap: break-word;
  margin-bottom: 18px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .order__layout { grid-template-columns: 1fr; }
  .order__summary { position: static; }
}
@media (max-width: 560px) {
  .nav__links { display: none; }
  .opick { grid-template-columns: 1fr; }
  .oinput--row { grid-template-columns: 1fr; }
}
