/* Papa J's joulukassit – tilauslomake, kassan lisäkenttä ja kiitos-sivu.
   Tyylit poimittu sivuston nykyisiltä sivuilta (etusivu ja lounassivu 2.11.2026):
   otsikot Playfair Display 500, leipäteksti Darker Grotesque 500, painikkeet pillereitä
   (radius 100px, Playfair Display 500, tausta #1800AD). Oranssi #FF5E30 on lounassivun
   pohja, kerma #E9F7C3 sen tekstiväri ja paneelin pohja, sininen #1800AD korostus.
   Lomake ladotaan kuin ruokalista: nimi vasemmalle, hinta ja määrä oikealle. */
.pjk {
  --pjk-ink: #181818;
  --pjk-muted: #55594f;
  --pjk-surface: #E9F7C3;
  --pjk-field: #ffffff;
  --pjk-line: rgba(24, 24, 24, .18);
  --pjk-accent: #1800AD;
  --pjk-error: #b3261e;
  --pjk-serif: "Playfair Display", Georgia, serif;
  --pjk-sans: "Darker Grotesque", "Playfair Display", system-ui, sans-serif;

  box-sizing: border-box;
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 48px);
  background: var(--pjk-surface);
  border-radius: 28px;
  color: var(--pjk-ink);
  font-family: var(--pjk-sans);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}
.pjk *, .pjk *::before, .pjk *::after { box-sizing: border-box; }
.pjk-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.pjk-intro { margin: 0 0 clamp(20px, 3vw, 32px); max-width: 40em; font-size: 22px; color: var(--pjk-muted); }

/* ── Ilmoitukset ── */
.pjk-notice {
  margin: 0 0 20px; padding: 14px 18px; border-radius: 14px;
  background: #fff; border-left: 3px solid var(--pjk-accent); font-size: 20px;
}
.pjk-notice--error { border-left-color: var(--pjk-error); color: var(--pjk-error); }
.pjk-notice--closed { border-left-color: var(--pjk-accent); }

/* ── Osiot ── */
.pjk-section + .pjk-section { margin-top: clamp(28px, 4vw, 44px); }
.pjk-section__title {
  margin: 0; padding: 0 0 2px;
  font-family: var(--pjk-serif); font-weight: 500;
  font-size: clamp(26px, 3.4vw, 34px); line-height: 1.15; color: var(--pjk-accent);
}
.pjk-section__note { margin: 2px 0 0; font-size: 19px; color: var(--pjk-muted); }

.pjk-list { list-style: none; margin: 14px 0 0; padding: 0; }

/* ── Rivi ── */
.pjk-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  column-gap: clamp(12px, 2vw, 28px);
  row-gap: 8px;
  padding: 14px 0;
  border-top: 1px solid var(--pjk-line);
}
.pjk-row:first-child { border-top: 0; }

.pjk-row__text { min-width: 0; }
/* Kassirivi on korkea, joten hinta ja määrä asettuvat ylös nimen tasalle. */
.pjk-row:has(.pjk-row__contents) { align-items: start; }
.pjk-row:has(.pjk-row__contents) .pjk-row__price,
.pjk-row:has(.pjk-row__contents) .pjk-qty { margin-top: 2px; }
.pjk-row__name { display: block; font-size: 23px; font-weight: 600; line-height: 1.2; }
.pjk-row__meta { display: block; font-size: 19px; font-weight: 500; color: var(--pjk-muted); }

.pjk-row__price {
  font-variant-numeric: tabular-nums;
  font-size: 21px; font-weight: 600; white-space: nowrap; color: var(--pjk-ink);
}

.pjk-row__size { display: block; }
.pjk-row__size select {
  appearance: none;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--pjk-line); border-radius: 10px;
  background: var(--pjk-field) url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23181818' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  color: var(--pjk-ink); font: inherit; font-size: 20px;
  max-width: 200px;
}
.pjk-row__size select:focus-visible { outline: 2px solid var(--pjk-accent); outline-offset: 1px; }

/* ── Määrä ── */
.pjk-qty {
  display: inline-grid; grid-template-columns: 42px 54px 42px; align-items: center;
  border: 1px solid var(--pjk-line); border-radius: 10px; background: var(--pjk-field);
  overflow: hidden;
}
.pjk-qty__btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  height: 44px; font-size: 22px; line-height: 1; color: var(--pjk-ink);
}
.pjk-qty__btn:hover { background: rgba(24, 0, 173, .08); }
.pjk-qty__btn:focus-visible { outline: 2px solid var(--pjk-accent); outline-offset: -2px; }
.pjk-qty__input {
  appearance: textfield; -moz-appearance: textfield;
  border: 0; border-left: 1px solid var(--pjk-line); border-right: 1px solid var(--pjk-line);
  height: 44px; width: 100%; text-align: center;
  font: inherit; font-variant-numeric: tabular-nums; color: var(--pjk-ink);
  background: transparent;
}
.pjk-qty__input::-webkit-outer-spin-button,
.pjk-qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pjk-qty__input:focus-visible { outline: 2px solid var(--pjk-accent); outline-offset: -2px; }
.pjk-row.is-chosen .pjk-qty { border-color: var(--pjk-accent); }
.pjk-row.is-chosen .pjk-row__name { font-weight: 700; }

/* ── Yhteenveto ── */
.pjk-footer {
  position: sticky; bottom: 0;
  margin: clamp(28px, 4vw, 44px) calc(clamp(20px, 4vw, 48px) * -1) calc(clamp(20px, 4vw, 48px) * -1);
  padding: 18px clamp(20px, 4vw, 48px) clamp(20px, 4vw, 32px);
  background: var(--pjk-surface);
  border-top: 1px solid var(--pjk-line);
  border-radius: 0 0 28px 28px;
  display: grid; gap: 12px;
}
.pjk-footer__total {
  margin: 0; display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  font-size: 22px;
}
.pjk-footer__total strong {
  font-family: var(--pjk-serif); font-weight: 500; font-size: clamp(28px, 4vw, 38px);
  color: var(--pjk-accent); font-variant-numeric: tabular-nums;
}
.pjk-submit {
  appearance: none; border: 0; cursor: pointer; width: 100%;
  padding: 20px 44px; border-radius: 100px;
  background: var(--pjk-accent); color: #fff;
  font-family: var(--pjk-serif); font-size: 20px; font-weight: 500; line-height: 1.2;
}
.pjk-submit:hover { background: #14008f; }
.pjk-submit:focus-visible { outline: 2px solid var(--pjk-ink); outline-offset: 2px; }
.pjk-submit[disabled] { opacity: .45; cursor: not-allowed; }
.pjk-after {
  margin: 14px 0 0; font-size: 19px; line-height: 1.35;
  color: var(--pjk-muted); text-align: center;
}

@media (min-width: 680px) {
  .pjk-footer { grid-template-columns: 1fr auto; align-items: center; }
  .pjk-footer__total { grid-column: 1; justify-content: flex-start; gap: 14px; }
  .pjk-submit { grid-column: 2; grid-row: 1; width: auto; min-width: 260px; }
  .pjk-after { text-align: left; }
}

@media (max-width: 560px) {
  .pjk-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pjk-row__text { grid-column: 1 / -1; }
  .pjk-row__price, .pjk-row__size { grid-column: 1; justify-self: start; }
  .pjk-qty { grid-column: 2; justify-self: end; }
}

/* ── Kassa ja kiitos-sivu ── */
.pjk-checkout-note {
  margin: 0 0 18px; padding: 16px 20px; border-radius: 14px;
  background: rgba(24, 0, 173, .06);
  font-family: "Darker Grotesque", system-ui, sans-serif;
  font-size: 21px; font-weight: 500; line-height: 1.35;
}
.pjk-pickup-field select {
  width: 100%; padding: 12px 14px;
  border: 1px solid rgba(24, 24, 24, .22); border-radius: 10px;
  background: #fff; font: inherit;
}
.pjk-thanks {
  margin: 0 0 28px; padding: clamp(20px, 3vw, 32px);
  background: #E9F7C3; border-radius: 20px;
}
.pjk-thanks h2 {
  margin: 0 0 8px;
  font-family: "Playfair Display", Georgia, serif; font-weight: 500;
  font-size: clamp(28px, 3.8vw, 38px); color: #1800AD;
}
.pjk-thanks p {
  margin: 0;
  font-family: "Darker Grotesque", system-ui, sans-serif;
  font-size: 23px; font-weight: 500; line-height: 1.35; color: #181818;
}

/* Valmiin kassin sisältö: luettelo nimen alla, kahdessa palstassa kun tilaa on. */
.pjk-row__contents {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--pjk-muted);
  columns: 2;
  column-gap: 32px;
}
.pjk-row__contents li {
  padding-left: 16px;
  position: relative;
  break-inside: avoid;
}
.pjk-row__contents li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pjk-accent);
}
@media (max-width: 760px) {
  .pjk-row__contents { columns: 1; }
}
