/* shared/themes.css — base layout + components for all forms.
   Colors/typography come from CSS custom properties set per-theme by form-runtime.js
   (THEMES object). Every property has a sensible fallback (the "postcard" defaults). */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;0,900;1,600&family=Oswald:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&family=DM+Sans:wght@400;500;600;700&family=Permanent+Marker&display=swap');

* { box-sizing: border-box; }
html, body { margin: 0; background: #eef5f9; }
body { -webkit-text-size-adjust: 100%; }
input, select, button, textarea { font-family: inherit; }
select { appearance: none; -webkit-appearance: none; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

.dc-root {
  min-height: 100vh;
  background-color: var(--bg, #eef5f9);
  background-image: var(--tex, none);
  color: var(--ink, #1b2a31);
  font-family: 'DM Sans', system-ui, sans-serif;
  line-height: 1.5;
  padding: 18px 16px 64px;
}
.dc-wrap { max-width: 600px; margin: 0 auto; }

/* style switcher */
.switcher { display: flex; align-items: center; gap: 8px; justify-content: center; margin-bottom: 22px; flex-wrap: wrap; }
.switcher-label { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted, #5d7480); }
.switcher-group { display: flex; gap: 4px; background: var(--card, #fff); border: 1px solid var(--bd, #e3ebf0); border-radius: 999px; padding: 4px; box-shadow: var(--shadow, 0 10px 30px -12px rgba(30,70,90,.22)); }
.switcher-group button { border: none; cursor: pointer; font-size: 12.5px; font-weight: 700; padding: 8px 15px; border-radius: 999px; background: transparent; color: var(--muted, #5d7480); }
.switcher-group button[aria-pressed="true"] { background: var(--accent, #2b8cb3); color: #fff; }

/* header */
.hdr { text-align: center; margin-bottom: 26px; }
.hdr .eyebrow { font-family: var(--tag, 'DM Sans', sans-serif); font-weight: 700; letter-spacing: var(--tagls, .18em); text-transform: var(--tagtt, uppercase); font-size: var(--tagsz, 12px); color: var(--red, #d8412a); margin-bottom: 10px; }
.hdr h1 { font-family: var(--disp, 'Playfair Display', serif); font-weight: 800; font-size: clamp(34px, 9vw, 54px); line-height: .98; color: var(--accent, #2b8cb3); letter-spacing: -.01em; margin: 0; }
.hdr .when { font-size: 13.5px; color: var(--muted, #5d7480); font-weight: 600; margin-top: 12px; }
.badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.badge { display: inline-flex; align-items: baseline; gap: 6px; border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; }
.badge.attend { background: var(--accent, #2b8cb3); color: #fff; }
.badge.shirt { background: var(--gold, #e3a83a); color: #231a0f; }
.badge b { font-family: var(--disp, serif); font-weight: 800; font-size: 16px; }

/* cards / steps */
.card { background: var(--card, #fff); border: 1px solid var(--bd, #e3ebf0); border-radius: var(--rad, 18px); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow, 0 10px 30px -12px rgba(30,70,90,.22)); }
.step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.step-num { font-family: var(--disp, serif); font-weight: 800; font-size: 14px; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; background: var(--gold, #e3a83a); color: #231a0f; display: grid; place-items: center; }
.step-head h2 { font-family: var(--disp, serif); font-size: 18px; font-weight: 700; color: var(--accent, #2b8cb3); margin: 0; }
.step-head .price { font-size: 13px; color: var(--muted, #5d7480); font-weight: 600; margin-left: auto; }
.hint { font-size: 13px; color: var(--muted, #5d7480); margin-top: 7px; }
label.fld { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--muted, #5d7480); }
input.text { width: 100%; font-size: 16px; padding: 13px 14px; border: 1.5px solid var(--bd, #e3ebf0); border-radius: 11px; background: var(--field, #fbfdff); color: var(--ink, #1b2a31); }
/* DBG-STYLE-1: author-set a lighter placeholder; without this it falls back to the dark browser
   default (#757575). opacity:1 stops Firefox from lightening it inconsistently. */
input.text::placeholder { color: #ababab; opacity: 1; }
.req { color: var(--red, #d8412a); }

/* counters */
.counter { display: flex; align-items: center; gap: 16px; }
.counter button { width: 52px; height: 52px; border-radius: 14px; border: 1.5px solid var(--accent, #2b8cb3); background: var(--card, #fff); color: var(--accent, #2b8cb3); font-size: 26px; font-weight: 700; cursor: pointer; display: grid; place-items: center; font-family: var(--disp, serif); }
.counter button:disabled { opacity: .4; cursor: not-allowed; }
.counter .num { font-family: var(--disp, serif); font-weight: 800; font-size: 40px; color: var(--ink, #1b2a31); min-width: 52px; text-align: center; line-height: 1; }
.counter .cap { font-size: 13px; color: var(--muted, #5d7480); font-weight: 600; text-align: center; }

/* attendee + shirt rows */
.row-box { border: 1px dashed var(--bd, #e3ebf0); border-radius: 14px; padding: 16px; margin-top: 14px; background: var(--field, #fbfdff); }
.row-title { font-family: var(--disp, serif); font-weight: 600; font-size: 15px; color: var(--red, #d8412a); margin-bottom: 13px; display: flex; align-items: center; gap: 8px; }
.row-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold, #e3a83a); }
.same-label { display: flex; align-items: center; gap: 9px; cursor: pointer; margin-bottom: 13px; font-size: 13.5px; font-weight: 600; color: var(--ink, #1b2a31); }
.same-label input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--accent, #2b8cb3); cursor: pointer; }
select.size { width: 100%; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--bd, #e3ebf0); border-radius: 11px; background: var(--card, #fff); color: var(--ink, #1b2a31); }
.swatches { display: flex; gap: 9px; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 6px; border-radius: 13px; cursor: pointer; background: var(--card, #fff); border: 3px solid rgba(0,0,0,.08); opacity: .55; flex: 1; min-width: 0; transition: all .15s; }
.swatch[aria-pressed="true"] { border-color: var(--accent, #2b8cb3); opacity: 1; }
.swatch .img { width: 100%; max-width: 130px; aspect-ratio: 1/1; border-radius: 9px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.swatch .name { font-size: 11.5px; font-weight: 700; color: var(--muted, #5d7480); text-align: center; line-height: 1.15; }
.swatch[aria-pressed="true"] .name { color: var(--accent, #2b8cb3); }

/* total panel */
.total { background: var(--panel, #141210); color: var(--panelfg, #fff); border: 1px solid var(--panel, #141210); border-radius: var(--rad, 18px); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow, 0 10px 30px -12px rgba(30,70,90,.22)); }
.total .line { display: flex; justify-content: space-between; font-size: 14px; opacity: .9; margin-bottom: 6px; }
.total .grand { display: flex; justify-content: space-between; align-items: baseline; margin: 12px 0 2px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.22); }
.total .grand .amt { font-family: var(--disp, serif); font-weight: 800; font-size: 46px; letter-spacing: -.02em; }
.btn-save { width: 100%; font-weight: 700; font-size: 16px; padding: 15px; border-radius: 13px; border: none; background: var(--gold, #e3a83a); color: #231a0f; cursor: pointer; margin-top: 16px; }
.flash { text-align: center; font-weight: 600; font-size: 14px; margin-top: 12px; min-height: 20px; animation: flashIn .2s; }
.flash.ok { color: var(--gold, #e3a83a); }
.flash.err { color: #ff6b5e; }
.pay { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; font-weight: 700; font-size: 17px; padding: 16px; border-radius: 13px; text-decoration: none; margin-top: 10px; }
.pay.cashapp { background: #00D632; color: #04210b; }
.pay.venmo { background: #008CFF; color: #fff; }
.pay[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.pay-note { font-size: 12.5px; opacity: .85; margin-top: 14px; line-height: 1.45; }

/* footer */
.foot { text-align: center; font-size: 12.5px; color: var(--muted, #5d7480); margin-top: 26px; line-height: 1.6; }
.foot b { color: var(--ink, #1b2a31); }
