/* Köpsidan – egen design, mobil först. Färgerna sätts per förening via CSS-variabler. */
:root {
  --bg: #0b1d3a;
  --primary: #ffcc00;
  --secondary: #ffffff;
  --text: #ffffff;
  --font: system-ui;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-size: cover;
  background-position: center;
  color: var(--text);
  font-family: var(--font), system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 30rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.logo { display: block; max-height: 5rem; max-width: 60%; margin: 0 auto 1.25rem; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 .25rem; }
.org { opacity: .75; margin: 0 0 1.25rem; font-size: .95rem; }
.info { opacity: .85; line-height: 1.5; }

.pot {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 1rem;
  padding: 1rem;
  text-align: center;
  margin: 0 0 1.25rem;
}
.pot .label { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.pot .value { font-size: 2.5rem; font-weight: 800; color: var(--primary); line-height: 1.1; }
.pot .sub { font-size: .85rem; opacity: .7; }
.pot .value.item { font-size: 1.6rem; }

/* Vinstlistan när lotteriet har flera vinster. */
.prize-list h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.prize-list ol { list-style: none; margin: 0; padding: 0; }
.prize-list li { display: flex; gap: .6rem; align-items: baseline; padding: .35rem 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.prize-list li:first-child { border-top: 0; }
.prize-list .rank { flex: 0 0 4.5rem; font-weight: 700; color: var(--primary); }
.prize-list .amount { margin-left: auto; font-weight: 700; white-space: nowrap; }

.card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 1rem;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

label { display: block; font-weight: 600; margin-bottom: .4rem; }

input[type="tel"], input[type="text"], input[type="number"] {
  width: 100%;
  padding: .9rem 1rem;
  font-size: 1.1rem;
  border-radius: .75rem;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(0, 0, 0, .25);
  color: var(--text);
}
input::placeholder { color: rgba(255, 255, 255, .45); }

.counter { display: flex; align-items: center; gap: .75rem; }
.counter button {
  width: 3rem; height: 3rem; flex: 0 0 auto;
  font-size: 1.5rem; font-weight: 700;
  border-radius: .75rem; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .1); color: var(--text); cursor: pointer;
}
.counter input { text-align: center; font-size: 1.4rem; font-weight: 700; }

.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .6rem; }
.package {
  border: 2px solid rgba(255, 255, 255, .2);
  border-radius: .85rem; padding: .75rem; text-align: center;
  background: rgba(0, 0, 0, .2); color: var(--text); cursor: pointer;
}
.package.selected { border-color: var(--primary); background: rgba(255, 255, 255, .12); }
.package .count { font-size: 1.3rem; font-weight: 800; }
.package .price { font-size: .9rem; opacity: .8; }

.total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.15rem; margin: 1rem 0; }
.total strong { font-size: 1.6rem; color: var(--primary); }

.btn {
  display: block; width: 100%; padding: 1.1rem;
  font-size: 1.2rem; font-weight: 700; text-align: center;
  border: 0; border-radius: .85rem; cursor: pointer;
  background: var(--primary); color: #111; text-decoration: none;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid rgba(255, 255, 255, .3); }

.check { display: flex; gap: .6rem; align-items: flex-start; margin: .9rem 0; font-weight: 400; }
.check input { width: 1.2rem; height: 1.2rem; margin-top: .15rem; flex: 0 0 auto; }

.alert { background: #b42318; color: #fff; border-radius: .75rem; padding: .9rem 1rem; margin-bottom: 1rem; }
.muted { opacity: .65; font-size: .85rem; line-height: 1.5; }

.tickets { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin: 1rem 0; }
.ticket {
  background: var(--primary); color: #111; font-weight: 800; font-size: 1.25rem;
  padding: .6rem 1rem; border-radius: .6rem; letter-spacing: .05em;
}
.status-big { text-align: center; font-size: 1.3rem; font-weight: 700; margin: 1.5rem 0 .5rem; }
.spinner {
  width: 2.5rem; height: 2.5rem; margin: 1.5rem auto;
  border: 3px solid rgba(255, 255, 255, .2); border-top-color: var(--primary);
  border-radius: 50%; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pin-form input {
  text-align: center; font-size: 2rem; font-weight: 700; letter-spacing: .4em;
}

/* Villkorstext */
.terms { text-align: left; line-height: 1.65; }
.terms h1 { font-size: 1.5rem; margin: 0 0 1rem; }
.terms h2 { font-size: 1.1rem; margin: 1.6rem 0 .5rem; opacity: .95; }
.terms p { margin: 0 0 .9rem; opacity: .9; }
.terms strong { color: var(--primary); }
.terms em { opacity: .75; }

.terms-link { text-align: center; margin-top: 1.5rem; font-size: .9rem; opacity: .75; }
.terms-link a { color: inherit; }

/* Hjälpklasser i stället för style-attribut, som CSP blockerar */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 1.5rem; }
.tight { margin: 0; }
.ticket-list { margin-top: 1rem; }
.logo-box { padding: 1rem; border-radius: .75rem; text-align: center; }
.mt-sm { margin-top: .75rem; }
.mb-1 { margin-bottom: 1.25rem; }
.foot-note { text-align: center; margin-top: 2rem; }
.sim-amount { font-size: 2.5rem; font-weight: 800; color: var(--primary); }
.counter-block { margin-top: 1rem; }
.counter-block.flush { margin-top: 0; }

.prize-plan h2 { font-size: 1.05rem; margin: 0 0 .6rem; }
.prize-plan p { margin: 0 0 .5rem; opacity: .85; font-size: .95rem; line-height: 1.55; }

/* Textknapp som ser ut som en länk (byte mellan Swish-app och Swishnummer). */
.linklike { background: none; border: 0; padding: 0; margin: 0; color: inherit; font: inherit; text-decoration: underline; cursor: pointer; opacity: .85; }
.linklike:hover { opacity: 1; }
[hidden] { display: none !important; }
a.ticket { text-decoration: none; }
input:disabled { opacity: .5; cursor: not-allowed; }
