/* Studio app part 4: the short forms (docs/studio-admin-design.md section 2). Only classes from portal.css and tokens
   already defined there; every rule is under body.studio so client pages never change. "Keys" are radio buttons
   dressed as the client's .chip-btn; the picked key is the same tinted green glass as .chip-btn[aria-current]. */

/* the page title is the client side's script line; the one green key sits at the end of the form */
/* minmax(0, 1fr): a wide child (two date boxes) must never stretch the form past the screen */
.studio .sp4-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding-bottom: 24px; }
.studio .sp4-form .row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.studio .sp4-form .field, .studio .sp4-form .field input { min-width: 0; max-width: 100%; }
.studio .sp4-field-error { margin: 8px 0 0; font-size: 15px; line-height: 1.4; }
.studio .sp4-part { margin-top: 64px; }
.studio .sp4-part:first-of-type { margin-top: 56px; }
.studio .sp4-send { margin-top: 32px; }
.studio .sp4-error { margin: 16px 0 0; }

/* keys: big tap targets (52px), wrap onto more lines on a phone */
.studio .sp4-keys { display: flex; flex-wrap: wrap; gap: 10px; }
.studio .sp4-key { position: relative; min-height: 52px; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent; }
.studio .sp4-key input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.studio .sp4-key:has(input:checked) {
  color: var(--go-ink); border-color: var(--go-edge);
  background: linear-gradient(180deg, var(--go-tint-top), var(--go-tint-bottom));
  box-shadow: var(--glass-edge), var(--lift-green);
}
.studio .sp4-key:has(input:focus-visible) { outline: 3px solid var(--script); outline-offset: 3px; }
/* step keys: a chosen step is the plain glass key with a small x (so "chosen" never looks like the green main key);
   a step taken out is faded with a + (tap to bring it back) */
.studio .sp4-step-chip:has(input:checked) { color: var(--charcoal); border-color: rgba(33, 31, 32, 0.12); background: rgba(255, 248, 241, 0.6); box-shadow: var(--glass-edge); }
.studio .sp4-step-chip > span::after { content: "\00D7"; margin-left: 10px; font-size: 22px; line-height: 1; color: var(--muted); }
.studio .sp4-step-chip:not(:has(input:checked)) { opacity: 0.55; text-decoration: line-through; }
.studio .sp4-step-chip:not(:has(input:checked)) > span::after { content: "+"; display: inline-block; text-decoration: none; }

/* "Or another room" / "If Other": a plain field under the keys */
.studio .sp4-other { margin-top: 16px; }

/* photos */
.studio .sp4-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.studio .sp4-thumbs img { width: 72px; height: 72px; object-fit: cover; border-radius: 14px; border: 1px solid rgba(33, 31, 32, 0.14); }
.studio .sp4-thumbs:empty { display: none; }

/* tap-to-add phrases */
.studio .sp4-phrases { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.studio .sp4-phrases .chip-btn { min-height: 44px; font-size: 14px; cursor: pointer; text-align: left; }

/* the big amount */
.studio .sp4-amount { position: relative; }
.studio .sp4-amount b { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font: 400 40px/1 var(--f-display); color: var(--muted); pointer-events: none; }
.studio .sp4-amount input { min-height: 76px; padding-left: 52px; font: 400 44px/1 var(--f-display); -webkit-text-stroke: 0.6px currentColor; letter-spacing: 0.01em; }
.studio .sp4-amount[hidden] { display: none; }
.studio .sp4-amount { margin-top: 16px; }

/* the live "Maya will see" preview, like the client's big bill number */
.studio .sp4-preview { margin-top: 14px; padding: 12px 16px; border-radius: 16px; background: rgba(33, 31, 32, 0.07); }
.studio .sp4-preview .label { position: static; margin: 0 0 4px; }
.studio .sp4-preview .sp4-pv-for { margin-top: 2px; font: 700 18px/1.3 var(--f-body); color: var(--charcoal); }
.studio .sp4-preview .sp4-pv-amt { margin: 0; font: 400 38px/1.05 var(--f-display); color: var(--charcoal); -webkit-text-stroke: 0.8px currentColor; overflow-wrap: anywhere; }
.studio .sp4-preview .sp4-pv-due { margin-top: 2px; font-size: 15px; color: var(--muted); }

/* "More" opens the rare fields */
.studio .sp4-more { margin-top: 40px; }
.studio .sp4-more > summary { margin-bottom: 20px; cursor: pointer; }
.studio .sp4-more > summary::after { content: "+"; margin-left: 10px; font-size: 20px; line-height: 1; }
.studio .sp4-more[open] > summary::after { content: "\2212"; }

/* budget result on "Change to the plan" */
.studio .sp4-budget { margin-top: 64px; }
.studio .sp4-budget p + p { margin-top: 6px; }
.studio .sp4-after { font-weight: 700; color: var(--charcoal); }

/* items waiting to be sent */
.studio .sp4-pending { margin-top: 64px; }
.studio .sp4-pending form { margin-top: 18px; }
.studio .sp4-drafts { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }

/* the ending: a green tick, what happened, what is next, then the keys */
.studio .sp4-done { margin-top: 24px; display: grid; justify-items: start; gap: 6px; }
.studio .sp4-check {
  width: 64px; height: 64px; border-radius: 999px; display: grid; place-items: center; margin-bottom: 8px;
  color: var(--go-ink); border: 1px solid var(--go-edge); background: linear-gradient(180deg, var(--go-tint-top), var(--go-tint-bottom));
  box-shadow: var(--glass-edge), var(--lift-green);
}
.studio .sp4-check svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.studio .sp4-done-title { margin: 0; font: 400 34px/1.15 var(--f-script); color: var(--script); -webkit-text-stroke: 0.3px currentColor; }
.studio .sp4-done .sp4-next-label { position: static; margin: 22px 0 0; }
.studio .sp4-next { margin: 8px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-2); font-size: 16px; line-height: 1.5; }
.studio .sp4-done-keys { display: grid; gap: 12px; width: 100%; margin-top: 26px; }
.studio .sp4-done-keys form { margin: 0; }
.studio .sp4-done-keys .btn-quiet { justify-self: center; }
.studio .sp4-done { margin-bottom: 24px; }
/* the item just added: photo, name, price */
.studio .sp4-item { display: flex; align-items: center; gap: 14px; margin-top: 14px; width: 100%; }
.studio .sp4-item img { width: 64px; height: 64px; flex: none; object-fit: cover; border-radius: 14px; border: 1px solid rgba(33, 31, 32, 0.14); }
.studio .sp4-item strong { display: block; font: 700 19px/1.3 var(--f-body); color: var(--charcoal); overflow-wrap: anywhere; }
.studio .sp4-item span { color: var(--muted); font-size: 17px; }
.studio .sp4-done-keys button { width: 100%; }
@media (prefers-reduced-motion: no-preference) {
  .studio .sp4-check { animation: sp4-pop var(--t-change, .45s) var(--ease); }
  @keyframes sp4-pop { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* new project: with JavaScript one step at a time ("Step 1 of 3"); without it all three show on one page */
.studio .sp4-wiz.is-wizard .sp4-step:not(.is-current) { display: none; }
.studio .sp4-wiz .sp4-step .app-card { margin-top: 64px; }
.studio .sp4-wiz-keys { display: grid; gap: 12px; margin-top: 32px; }
.studio .sp4-prog { height: 8px; margin-top: 8px; border-radius: 999px; background: rgba(33, 31, 32, 0.07); box-shadow: inset 0 1px 2px rgba(33, 31, 32, 0.18); overflow: hidden; }
.studio .sp4-prog > span { display: block; height: 100%; width: var(--p, 33%); border-radius: 999px; background: linear-gradient(180deg, rgba(60, 150, 103, 0.75), rgba(39, 107, 72, 0.8)); transition: width var(--t-change, .45s) var(--ease); }
.studio .sp4-add { margin-top: 16px; }
.studio .sp4-hint { margin-bottom: 14px; }
@media (min-width: 900px) {
  .studio .sp4-done-keys, .studio .sp4-wiz-keys { grid-template-columns: 1fr 1fr; }
}
