/* Scandinavian Crown 2027 – entry fee, simplified form and Swish payment */

.sc-visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.sc-pay [hidden],
.sc-pay-dialog [hidden],
.sc-2027-registration-done[hidden],
.sc-2027-registration-form.is-sectioned[hidden],
.sc-2027-registration-form[hidden],
.sc-2027-fee-box[hidden],
.sc-2027-fee-summary[hidden],
.sc-pay-missing[hidden] { display: none !important; }

.sc-2027-registration-intro {
  margin: 0 0 16px;
  color: #5b6b7a;
  font-size: .95rem;
}

/* Fee box */
.sc-2027-fee-box {
  margin: 0 0 18px;
  padding: 18px 20px;
  border: 2px solid #b98916;
  border-radius: 17px;
  background: linear-gradient(180deg, #fffaf0, #fff);
}
.sc-2027-fee-box h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  color: #173a5e;
}
.sc-2027-fee-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.sc-2027-fee-option {
  display: grid;
  gap: 2px;
  padding: 14px;
  border: 1px solid #efe3c4;
  border-radius: 14px;
  background: #fff;
}
.sc-2027-fee-option > strong { font-size: 1.05rem; color: #173a5e; }
.sc-2027-fee-option > small { font-size: .85rem; color: #5b6b7a; }
.sc-2027-fee-option dl { display: grid; gap: 6px; margin: 10px 0 0; }
.sc-2027-fee-option dl > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  padding-top: 6px;
  border-top: 1px solid #f1ead8;
}
.sc-2027-fee-option dt { font-size: .92rem; color: #5b6b7a; }
.sc-2027-fee-option dd { margin: 0; font-size: 1.25rem; font-weight: 900; color: #173a5e; white-space: nowrap; }
.sc-2027-fee-note {
  margin: 10px 0 0;
  font-size: .9rem;
  color: #5b6b7a;
}

.sc-2027-fee-summary {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f3f7fa;
  color: #173a5e;
  font-size: 1rem;
}

/* Optional profile step */
.sc-2027-step-optional {
  grid-column: 1 / -1;
  display: grid;
  gap: 15px;
}
.sc-2027-step-optional > summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  border: 1px dashed #b98916;
  border-radius: 12px;
  font-weight: 800;
  color: #173a5e;
}
.sc-2027-step-optional > summary::-webkit-details-marker { display: none; }
.sc-2027-step-optional > summary::before { content: "+ "; color: #b98916; }
.sc-2027-step-optional[open] > summary::before { content: "– "; }
.sc-2027-step-optional[open] { padding-bottom: 4px; }

/* Done panel */
.sc-2027-registration-done {
  margin: 0;
  padding: 22px;
  border: 1px solid rgba(23, 58, 94, .14);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 58, 94, .065);
}
.sc-2027-registration-done h3 { margin: 4px 0 6px; font-size: 1.4rem; color: #173a5e; }
.sc-2027-registration-done > p { margin: 0 0 12px; }
.sc-2027-paid { color: #1f6b3a; font-weight: 800; font-size: 1.1rem; }
.sc-2027-onsite { font-size: 1.05rem; }

/* Swish panel */
.sc-pay { display: grid; gap: 14px; }
.sc-pay-amount {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 14px;
  border-radius: 14px;
  background: #f3f7fa;
  text-align: center;
}
.sc-pay-amount span { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: #5b6b7a; }
.sc-pay-amount strong { font-size: 2.2rem; line-height: 1.1; color: #173a5e; }
.sc-pay-amount small { color: #5b6b7a; }
.sc-pay-choose { display: grid; gap: 10px; }
.sc-pay-button {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #173a5e;
  border-radius: 12px;
  background: #fff;
  color: #173a5e;
  font: inherit;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.sc-pay-button--primary { background: #173a5e; color: #fff; }
.sc-pay-button:disabled { opacity: .55; cursor: wait; }
.sc-pay-waiting { display: grid; gap: 10px; justify-items: center; text-align: center; }
.sc-pay-status { margin: 0; font-weight: 800; font-size: 1.05rem; }
.sc-pay-countdown { margin: 0; color: #5b6b7a; font-variant-numeric: tabular-nums; }
.sc-pay-qr { display: grid; gap: 6px; justify-items: center; }
.sc-pay-qr img { width: 240px; max-width: 70vw; height: auto; aspect-ratio: 1; border-radius: 8px; background: #fff; }
.sc-pay-qr small { color: #5b6b7a; }
.sc-pay-done {
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: 14px;
  background: #e9f7ef;
  color: #185b2d;
  text-align: center;
}
.sc-pay-done strong { font-size: 1.4rem; }
.sc-pay-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fff1f0; color: #8a201c; }
.sc-pay-note { margin: 0; font-size: .9rem; color: #5b6b7a; text-align: center; }
.sc-pay-link,
.sc-pay-later {
  justify-self: center;
  padding: 6px 10px;
  border: 0;
  background: none;
  color: #173a5e;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

/* Dialog */
.sc-pay-dialog {
  width: min(440px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 18px;
  border: 0;
  border-radius: 18px;
  background: #fff;
  color: #172a3a;
  box-shadow: 0 24px 60px rgba(10, 25, 40, .35);
}
.sc-pay-dialog[open] { display: grid; gap: 14px; }
.sc-pay-dialog::backdrop { background: rgba(10, 25, 40, .55); }
.sc-pay-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sc-pay-dialog-head h3 { margin: 0; font-size: 1.15rem; color: #173a5e; }
.sc-pay-close {
  width: 36px; height: 36px;
  border: 0; border-radius: 50%;
  background: #f3f7fa; color: #173a5e;
  font-size: 1.4rem; line-height: 1; cursor: pointer;
}

/* Pay-later page */
.sc-pay-page { max-width: 520px; margin: 0 auto; display: grid; gap: 12px; }
.sc-pay-page h1 { margin: 0; font-size: 1.6rem; color: #173a5e; }
.sc-pay-greeting { margin: 0; }
.sc-pay-help { margin: 4px 0 0; font-size: .9rem; color: #5b6b7a; text-align: center; }
.sc-pay-missing { padding: 14px; border-radius: 12px; background: #fff8e6; }

@media (max-width: 640px) {
  .sc-2027-fee-box { padding: 14px; }
  .sc-2027-fee-options { grid-template-columns: 1fr; gap: 10px; }
  .sc-2027-fee-option { padding: 12px; }
}

/* Dark theme */
html[data-theme="dark"] .sc-2027-registration-intro,
html[data-theme="dark"] .sc-2027-fee-note,
html[data-theme="dark"] .sc-2027-fee-option > small,
html[data-theme="dark"] .sc-2027-fee-option dt,
html[data-theme="dark"] .sc-pay-amount span,
html[data-theme="dark"] .sc-pay-amount small,
html[data-theme="dark"] .sc-pay-countdown,
html[data-theme="dark"] .sc-pay-qr small,
html[data-theme="dark"] .sc-pay-note,
html[data-theme="dark"] .sc-pay-help { color: var(--theme-muted, #a9b6c2); }
html[data-theme="dark"] .sc-2027-fee-box {
  background: var(--theme-gold-bg, #2b2413);
  border-color: var(--theme-gold, #d8a72b);
}
html[data-theme="dark"] .sc-2027-fee-box h3,
html[data-theme="dark"] .sc-2027-fee-option > strong,
html[data-theme="dark"] .sc-2027-fee-option dd,
html[data-theme="dark"] .sc-2027-step-optional > summary,
html[data-theme="dark"] .sc-2027-registration-done h3,
html[data-theme="dark"] .sc-pay-amount strong,
html[data-theme="dark"] .sc-pay-dialog-head h3,
html[data-theme="dark"] .sc-pay-page h1,
html[data-theme="dark"] .sc-pay-link,
html[data-theme="dark"] .sc-pay-later { color: var(--theme-text, #e8eef3); }
html[data-theme="dark"] .sc-2027-fee-option { background: var(--theme-surface, #17212a); border-color: var(--theme-line, #34404b); }
html[data-theme="dark"] .sc-2027-fee-option dl > div { border-color: var(--theme-line, #34404b); }
html[data-theme="dark"] .sc-2027-fee-summary,
html[data-theme="dark"] .sc-pay-amount,
html[data-theme="dark"] .sc-pay-close { background: var(--theme-raised, #1f2a34); color: var(--theme-text, #e8eef3); }
html[data-theme="dark"] .sc-2027-registration-done,
html[data-theme="dark"] .sc-pay-dialog {
  background: var(--theme-surface, #17212a);
  color: var(--theme-text, #e8eef3);
  border-color: var(--theme-line, #34404b);
}
html[data-theme="dark"] .sc-pay-button { background: transparent; color: var(--theme-text, #e8eef3); border-color: var(--theme-gold, #d8a72b); }
html[data-theme="dark"] .sc-pay-button--primary { background: var(--theme-gold, #d8a72b); color: #17120a; }
html[data-theme="dark"] .sc-pay-done,
html[data-theme="dark"] .sc-2027-paid { background: var(--theme-green-bg, #13301f); color: var(--theme-green, #7fd49b); }
html[data-theme="dark"] .sc-2027-paid { background: none; }
html[data-theme="dark"] .sc-pay-error { background: var(--theme-red-bg, #3a1715); color: var(--theme-red, #ff9b93); }
html[data-theme="dark"] .sc-pay-missing { background: var(--theme-gold-bg, #2b2413); }
