/* The flyer maker (/create-flyer), on design tokens v2 (/tokens-v2.css) with the site's header, footer and phone tab
   bar (/site-v2.css, /tab-bar.css). Dark mode comes from the tokens. */
.maker { padding-block: 28px calc(64px + var(--tab-bar)); }
.intro { max-width: 680px; margin-bottom: 28px; }
.eyebrow { display: inline-block; margin-bottom: 10px; background: var(--buzz-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.intro h1 { font-size: clamp(2.1rem, 5vw, 3.6rem); line-height: 1.04; letter-spacing: -.035em; margin-bottom: 12px; }
.intro p:last-child { color: var(--ink-2); font-size: 1.1rem; }

.workspace { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(320px, .9fr); gap: 24px; align-items: start; }
.editor, .preview { background: var(--card); border: 1px solid var(--card-edge); border-radius: var(--radius-card); padding: 24px; box-shadow: 0 1px 0 var(--line); }
.preview { position: sticky; top: 76px; }
.editor h2, .preview h2 { font-size: 1.2rem; letter-spacing: -.01em; margin-bottom: 18px; }
.editor label { display: block; margin: 16px 0 6px; font-weight: 650; }
.editor label span, .hint, .preview-head span, .footnote { color: var(--ink-3); font-weight: 400; }
.editor input, .editor select { width: 100%; min-height: 48px; padding: 10px 13px; border: 1px solid var(--fill-2); border-radius: var(--radius-tile);
  background: var(--surface); color: var(--ink); font: inherit; }
.editor input:focus-visible, .editor select:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: .9rem; line-height: 1.5; margin-top: 6px; }
.place-row { display: flex; gap: 8px; }
.place-row input { flex: 1 1 auto; min-width: 0; }
.place-row button { flex: none; }
.place-results { list-style: none; margin: 8px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-tile); background: var(--surface); }
.editor .place-results li button { display: grid; gap: 2px; width: 100%; min-height: 48px; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink);
  font: inherit; text-align: left; cursor: pointer; }
.editor .place-results li button:hover, .editor .place-results li button:focus-visible { background: var(--fill); }
.place-results span { color: var(--ink-3); font-size: .9rem; }
#maker-message a { font-weight: 650; }

/* When it happens: the schedule's own fields (public/flyer-schedule-templates.js). */
.schedule-fields { display: grid; gap: 0; }
.schedule-fields .field-pair { margin-top: 6px; }
.field-label { margin: 16px 0 6px; font-weight: 650; }
.editor textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--fill-2); border-radius: var(--radius-tile); background: var(--surface); color: var(--ink); font: inherit; resize: vertical; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chip { position: relative; margin: 0 !important; }
.day-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.day-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 52px; min-height: 44px; padding: 0 12px; border-radius: 999px;
  background: var(--fill); color: var(--ink); font-weight: 600; }
.day-chip input:checked + span { background: var(--ink); color: var(--on-ink); }
.day-chip input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.repeater { display: grid; gap: 8px; }
.repeater-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; }
.repeater-program { gap: 12px; }
/* Each event of a program: its name and Remove on one line, its date and time on the next. */
.repeater-program .repeater-row { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); grid-template-areas: 'name remove' 'date time';
  padding: 10px; border-radius: var(--radius-tile); background: var(--fill); }
.repeater-program [data-key="name"] { grid-area: name; }
.repeater-program [data-key="date"] { grid-area: date; }
.repeater-program [data-key="time"] { grid-area: time; }
.repeater-program .row-remove { grid-area: remove; justify-self: end; }
.repeater-row input { min-width: 0; }
.editor .repeater-row button.row-remove, .editor .repeater-wrap button.row-add { min-height: 44px; padding: 0 12px; font-size: 14px; }
.editor .repeater-wrap button.row-add { margin-top: 8px; }

/* Looks: swatches in groups. */
.look-picker { margin: 18px 0 0; padding: 0; border: 0; }
.look-picker legend { padding: 0; font-weight: 650; }
.look-picker legend span { color: var(--ink-3); font-weight: 400; margin-left: 6px; }
.swatch-group { margin: 12px 0 6px; color: var(--ink-3); font-size: .85rem; }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; }
.swatch { position: relative; display: block; margin: 0 !important; cursor: pointer; }
.swatch-input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.swatch-chip { display: flex; align-items: flex-end; justify-content: flex-start; aspect-ratio: 4 / 5; padding: 6px; border-radius: 10px; box-shadow: inset 0 0 0 1px var(--line); }
.swatch-ink { font-weight: 800; font-size: 14px; }
.swatch-input:checked + .swatch-chip { box-shadow: 0 0 0 3px var(--ink); }
.swatch-input:focus-visible + .swatch-chip { outline: 2px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.preview-text { margin: 12px 0 0; color: var(--ink-2); }
.preview-text summary { cursor: pointer; font-weight: 600; }
#flyer-summary { white-space: pre-line; margin-top: 8px; }
.editor > .hint { margin: 18px 0; }
.editor > .button { width: 100%; min-height: 50px; font-size: 16px; }
#ai-art-options { margin-top: 8px; padding: 16px; border-radius: var(--radius-image); background: var(--fill); }
#ai-art-options label { margin-top: 0; }
.art-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
#art-status { min-height: 1.5em; }

.editor button:not(.button), .actions button:not(.button) { min-height: 44px; padding: 0 16px; border: 0; border-radius: 14px; background: var(--fill); color: var(--ink);
  font: 600 15px/1.2 var(--font); cursor: pointer; }
.editor button:not(.button):hover, .actions button:not(.button):hover { background: var(--fill-2); }
.button { cursor: pointer; font: 600 15px/1.2 var(--font); }
button:disabled { opacity: .45; cursor: not-allowed; }

.preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.preview-head span { font-size: .85rem; }
.preview canvas { display: block; width: 100%; height: auto; border-radius: var(--radius-image); background: var(--fill); box-shadow: var(--shadow-image); }
.preview > .hint { margin: 14px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions button { flex: 1 1 auto; }
#maker-message { min-height: 1.5em; margin-top: 12px; font-weight: 600; }
.footnote { margin: 24px 2px 0; }
.footnote a { font-weight: 650; }

@media (max-width: 760px) {
  .maker { padding-block: 16px calc(40px + var(--tab-bar)); }
  .intro { margin-bottom: 18px; }
  .intro p:last-child { font-size: 1rem; }
  .workspace { grid-template-columns: 1fr; gap: 16px; }
  .preview { position: static; }
  .editor, .preview { padding: 18px; border-radius: 20px; }
  .preview-head span { display: none; }
}
