/* Create-event form. Needs /shared/tokens.css and /shared/base.css. */
body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  min-height: 60px;
  padding: env(safe-area-inset-top) 6px 0;
  background: var(--cream);
  border-bottom: 1px solid rgb(61 43 34 / 0.08);
}

.topbar h1 {
  margin: 0;
  color: var(--red);
  font-size: 26px;
  font-weight: 400;
  text-align: center;
}

.page {
  flex: 1;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.step-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.15;
}

.step-head p {
  margin: 4px 0 0;
  color: var(--ink-soft);
}

/* ---- progress ------------------------------------------------------------ */
.progress {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.progress li {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 15px;
}

.progress li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 17px;
  left: calc(50% + 24px);
  right: calc(-50% + 24px);
  height: 2px;
  background: var(--line);
}

.progress li[data-state="done"]::after {
  background: var(--red);
}

.progress .dot {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 20px;
}

.progress .dot .icon {
  display: none;
  width: 18px;
  height: 18px;
  stroke-width: 3;
}

.progress li[data-state="current"],
.progress li[data-state="done"] {
  color: var(--red);
}

.progress li[data-state="current"] .dot,
.progress li[data-state="done"] .dot {
  border-color: var(--red);
  background: var(--red);
  color: var(--cream);
}

.progress li[data-state="done"] .num {
  display: none;
}

.progress li[data-state="done"] .dot .icon {
  display: block;
}

/* ---- cards & fields ------------------------------------------------------ */
#event-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* packages: one row per guest capacity, price on the right */
.packages {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.package {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
}

.package input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.package-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.package-name {
  font-size: 19px;
  line-height: 1.2;
}

.package-perks {
  color: var(--ink-soft);
  font-size: 15px;
}

.package-price {
  flex: none;
  color: var(--red);
  font-size: 19px;
}

.package:has(input:checked) {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1.5px var(--red);
  background: var(--paper);
}

.package:has(input:focus-visible) {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* shots chips (radio buttons) */
/* One row, equal widths, however many options the config allows. */
.chips {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}

.chip {
  position: relative;
}

.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.chip span {
  display: grid;
  place-items: center;
  height: 44px;
  padding: 0 4px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  font-size: 19px;
}

.chip input:checked + span {
  border-color: var(--red);
  background: var(--red);
  color: var(--cream);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

/* ---- photo filters: pick up to the package's limit -------------------------- */
.looks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.look {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 6px 6px 8px;
  border: 0;
  border-radius: 4px;
  background: var(--white);
  box-shadow: var(--shadow-polaroid);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.looks li:nth-child(odd) .look { transform: rotate(-2deg); }
.looks li:nth-child(even) .look { transform: rotate(1.5deg); }

.look canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  background: var(--night);
}

.look-name {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
}

/* picked: a red ring and a tick */
.look[aria-pressed="true"] {
  box-shadow: 0 0 0 3px var(--red), var(--shadow-polaroid);
}

.look-tick {
  position: absolute;
  top: -8px;
  right: -8px;
  display: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--red);
  color: var(--cream);
}

.look-tick .icon {
  width: 16px;
  height: 16px;
  stroke-width: 3;
}

.look[aria-pressed="true"] .look-tick {
  display: grid;
}

/* at the limit: the others wait until one is unpicked */
.look:disabled:not([aria-pressed="true"]) {
  opacity: 0.45;
  cursor: default;
}

/* Unlimited: everything is included, nothing to pick */
.look:disabled[aria-pressed="true"] {
  cursor: default;
}

/* ---- notes, summary, payment --------------------------------------------- */
.total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid rgb(61 43 34 / 0.15);
}

.total-row strong {
  color: var(--red);
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  white-space: nowrap;
}


.bot-check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px dashed var(--line);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink-soft);
  font-size: 15px;
}

.bot-check .icon {
  color: var(--red);
}

.submit-error {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: inset 0 0 0 2px var(--red);
  color: var(--red);
}

/* ---- done ---------------------------------------------------------------- */
.done {
  align-items: center;
  text-align: center;
}

.done-art {
  position: relative;
  width: 220px;
  height: 220px;
}

.done-art .polaroid {
  position: absolute;
  left: 34px;
  top: 16px;
  width: 150px;
  padding: 10px 10px 36px;
  background: var(--white);
  box-shadow: var(--shadow-polaroid);
  transform: rotate(-5deg);
}

.done-art .polaroid::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 40%;
  height: 22px;
  background: rgb(185 211 214 / 0.85);
  transform: translateX(-50%) rotate(3deg);
}

.done-art .photo {
  aspect-ratio: 3 / 4;
  background: linear-gradient(120deg, #8c4d38, #edc794);
}

.done-art .sparkle {
  position: absolute;
  fill: var(--red);
}

.done-art .s1 { width: 26px; height: 26px; right: 10px; top: 0; }

.done-art .s2 { width: 16px; height: 16px; left: 6px; bottom: 40px; }

.done-art .s3 { width: 18px; height: 18px; right: 0; bottom: 60px; }

.done-title {
  margin: 0;
  color: var(--red);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 400;
  line-height: 1.05;
}

.done-title:focus {
  outline: none;
}

.done-thanks {
  margin: -8px 0 0;
  font-size: 21px;
}

.code-chip {
  margin: 0;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--blue);
  font-size: 16px;
}

.done .form-card {
  align-self: stretch;
  text-align: left;
}

.next-steps {
  margin: 0;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.done-actions {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* ---- bottom bar ---------------------------------------------------------- */
.bar {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid rgb(61 43 34 / 0.2);
}

.bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 528px;
  margin: 0 auto;
}

.bar-total {
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.bar-total strong {
  color: var(--red);
  font-size: 26px;
  font-weight: 400;
}

#bar-back {
  flex: 1;
}

.bar-inner:has(#bar-back:not([hidden])) #bar-next {
  flex: 1;
}

.bar-note {
  max-width: 528px;
  margin: 8px auto 0;
  text-align: center;
}
