:root{
  --bg:#0b0f14;
  --text:#111827;
  --muted:#6b7280;
  --accent:#15b3c7;
  --border:rgba(17,24,39,.10);
  --shadow:0 18px 50px rgba(0,0,0,.45);
}

/* Üldine reset */
*{
  box-sizing:border-box;
}

html, body{
  height:100%;
}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
}

/* Taust (Inforegistri stiil) */
.bg{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px 18px;
  position:relative;
  overflow:hidden;
}

.bg::before{
  content:"";
  position:absolute;
  inset:-120px;
  background:
    radial-gradient(900px 520px at 18% 20%, rgba(21,179,199,.22), transparent 60%),
    radial-gradient(700px 420px at 85% 25%, rgba(31,111,235,.16), transparent 55%),
    linear-gradient(180deg, #0b0f14 0%, #0a0f16 35%, #080c12 100%);
  z-index:0;
}

.bg::after{
  content:"";
  position:absolute;
  inset:-60px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.055) 0 2px, transparent 2px 100%),
    linear-gradient(45deg, rgba(255,255,255,.040) 0 2px, transparent 2px 100%);
  background-size:52px 52px;
  opacity:.55;
  transform:rotate(-8deg);
  z-index:0;
}

/* Kaart */
.card{
  position:relative;
  z-index:1;
  width:100%;
  max-width:520px;
  background:rgba(255,255,255,.96);
  border-radius:16px;
  border:1px solid rgba(255,255,255,.18);
  box-shadow:var(--shadow);
  padding:26px 26px 22px;
}

/* Päis */
.header{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  margin-bottom:22px;
}

/* LOGO – PUHAS, SUUR, ILMA KASTITA */
.logo-wrap{
  width:auto;
  height:auto;
  background:none;
  border:none;
  padding:0;
}

.logo-wrap img{
  width:90px;      /* MUUDA SEDA kui tahad suuremat/väiksemat */
  height:auto;
  max-width:100%;
  object-fit:contain;
}

/* Pealkirjad */
.brand-title{
  margin:0;
  font-size:26px;
  letter-spacing:.2px;
}

.brand-sub{
  margin:0;
  color:var(--muted);
  font-size:13px;
  text-align:center;
  line-height:1.45;
}

/* Vorm */
label{
  display:block;
  margin:14px 0 6px;
  font-weight:800;
  font-size:13px;
}

input, select{
  width:100%;
  max-width:100%;
  display:block;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  outline:none;
  font-size:14px;
}

/* Ühtlased väljad kõigis seadmetes */
:root{
  --field-h: 54px;     /* muuda kui tahad suurem/väiksem */
  --field-pad-x: 14px; /* külje padding */
}

/* kõik väljad sama kõrgusega */
input, select{
  width:100%;
  max-width:100%;
  display:block;

  height: var(--field-h);
  padding: 0 var(--field-pad-x);

  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text);
  outline:none;

  font-size:16px;      /* hoiab mobiilis ühtlasena + iOS ei zoomi */
  line-height: 1.2;
}

/* --- MOBILE FIX: iOS date input baseline/zoom --- */
input, select{
  font-size:16px;      /* oluline iOS-i jaoks (ära lase <16px) */
  line-height:1.25;
}

/* Kuupäevaväli kipub telefonis "alla vajuma" */
input[type="date"]{
  height:52px;         /* hoiab ühtlase kõrguse */
  padding:0 14px;      /* eemaldab suure vertikaalse tühjuse */
  display:block;
  -webkit-appearance: none;
  appearance: none;
}

/* Kui tahad, et KÕIK väljad oleks sama kõrgusega, lisa ka see: */
input, select{
  height:52px;
  padding:0 14px;
}

/* sünnikuupäeva eripära – iOS/Android/desktop kuvatakse vahel teisiti */
input[type="date"]{
  -webkit-appearance: none;
  appearance: none;
}

/* WebKit (iOS/Safari/Chrome) kuupäeva “sisu” joondus */
input[type="date"]::-webkit-date-and-time-value{
  text-align:left;
  padding:0;            /* ära lase sisemisel paddingul kuju lõhkuda */
  margin:0;
  line-height: var(--field-h);
}

/* kuupäeva ikoon (kui tahad, et ei suruks teksti kokku) */
input[type="date"]::-webkit-calendar-picker-indicator{
  margin:0;
}

/* focus jääb samaks */
input:focus, select:focus{
  border-color:rgba(21,179,199,.55);
  box-shadow:0 0 0 4px rgba(21,179,199,.14);
}

input:focus, select:focus{
  border-color:rgba(21,179,199,.55);
  box-shadow:0 0 0 4px rgba(21,179,199,.14);
}

/* Nupud (üksik submit-nupp) */
button{
  width:100%;
  margin-top:18px;
  padding:13px 14px;
  border-radius:12px;
  border:0;
  cursor:pointer;
  font-weight:900;
  letter-spacing:.2px;
  background:linear-gradient(135deg,var(--accent),#0ea5e9);
  color:#fff;
}

button:hover{
  filter:brightness(.98);
}

/* Ridadega info (Päringu ID / Sinu kood) */
.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:12px 14px;
  border:1px solid var(--border);
  border-radius:12px;
  margin-top:12px;
  background:#fff;
}

.row span{
  color:var(--muted);
}

.row b{
  white-space:nowrap;
  font-variant-numeric:tabular-nums;
}

/* Veateade */
.err{
  color:#b91c1c;
  margin-top:12px;
  font-weight:800;
  min-height:18px;
}

/* Alumised tegevused */
.inline-actions{
  display:flex;
  gap:12px;
  margin-top:16px;
}

.inline-actions a,
.inline-actions button.secondary{
  flex:1;
  text-decoration:none;
  text-align:center;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid var(--border);
  font-weight:900;
  color:#0b0f14;
  background:#fff;
}

.inline-actions button.secondary{
  background:linear-gradient(135deg,var(--accent),#0ea5e9);
  color:#fff;
  border:0;
}

/* Väike info-tekst */
.note{
  margin-top:14px;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  text-align:center;
}

/* Kontrollkoodi kuvamine (pending) */
.code-box{
  margin: 28px 0 10px;
  text-align: center;
}

.code-label{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 700;
  letter-spacing: .2px;
}

.code-value{
  font-size: 42px;
  font-weight: 900;
  letter-spacing: 6px;
  color: #0b0f14;
}

/* =========================================================
   FIX: Tagasi/Edasi rea ühtlane kõrgus + tühjuse eemaldus
   Kasutab olemasolevat .inline-actions struktuuri
   ========================================================= */

/* Kui inline-actions sees on <button> ja <a>, siis ÄRA lase globaalset button-stiili peale */
.inline-actions button,
.inline-actions a{
  margin-top:0;            /* eemaldab suure tühja ala, mis tuli button { margin-top:18px } tõttu */
  height:44px;             /* ühtlane kõrgus */
  line-height:44px;        /* tekst keskele */
  padding:0 16px;          /* ainult horisontaalne padding */
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
}

/* Kui Tagasi on link <a>, siis hoia sama kõrgus ja joondus */
.inline-actions a{
  line-height:44px;
}

/* Kui sul on method-lehel all mingi tekst, mis jätab “tühjuse”, siis tee see kompaktseks */
.note{
  margin-top:10px;
}
/* Ühtlusta Tagasi/Edasi teksti suurus ja paksus */
.inline-actions a,
.inline-actions button,
.inline-actions button.secondary{
  font-size:16px;
  font-weight:900;
  letter-spacing:.2px;
}
 /* --- Mobile polish --- */
input, select, button{
  -webkit-appearance: none;
  appearance: none;
}

/* iOS/Android date input kipub teistmoodi joonduma */
input[type="date"]{
  min-height: 52px;
  line-height: 1.2;
  padding-top: 14px;
  padding-bottom: 14px;
}

/* Kui kuupäev tekst jookseb “kõrgele/valesti”, aitab see */
input[type="date"]::-webkit-date-and-time-value{
  text-align: left;
}

/* Väike üldine spacing/parandused telefonis */
@media (max-width: 520px){
  .card{
    max-width: 420px;
    padding: 22px 18px 18px;
    border-radius: 18px;
  }

  label{
    font-size: 14px;
  }

  input, select{
    font-size: 16px; /* oluline: hoiab iOS “zoom on focus” ära */
    padding: 14px 14px;
    border-radius: 14px;
  }

  button{
    font-size: 18px;
    padding: 16px 16px;
    border-radius: 14px;
  }
}

/* ================================
   iOS / Mobile date-input FIX
   (pane style.css lõppu)
================================ */

/* Hoia iOS-is vähemalt 16px font, muidu tekivad vead/zoom */
input, select{
  font-size: 16px;
}

/* iOS date input: vertikaalne "tühi ala" fix */
input[type="date"]{
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 14px !important;         /* eemalda vertikaalne padding */
  line-height: 52px !important;       /* sunnib teksti keskele */
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* iOS-i sisemised date-field osad */
input[type="date"]::-webkit-date-and-time-value{
  line-height: 52px !important;
  height: 52px !important;
}

input[type="date"]::-webkit-datetime-edit{
  padding: 0 !important;
  line-height: 52px !important;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper{
  padding: 0 !important;
  line-height: 52px !important;
}

input[type="date"]::-webkit-calendar-picker-indicator{
  margin: 0 !important;
  padding: 0 !important;
}

/* ===========================
   THANKYOU PAGE POLISH
   (pane style.css lõppu)
=========================== */

.thankyou .header{
  margin-bottom: 16px;
}

.success-badge{
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin: 6px 0 10px;
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  box-shadow: 0 12px 30px rgba(14,165,233,.22);
}

.thankyou .brand-title{
  text-align: center;
}

.thankyou .brand-sub{
  max-width: 38ch;
}

.code-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.code-pill{
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 12px 14px;
}

.code-pill__label{
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2px;
}

.code-pill__value{
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
}

.info-box{
  margin-top: 14px;
  border: 1px solid var(--border);
  background: rgba(21,179,199,.07);
  border-radius: 14px;
  padding: 14px 14px;
}

.info-box__title{
  margin: 0 0 6px;
  font-weight: 900;
}

.info-box__text{
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.thankyou-actions{
  margin-top: 16px;
}

/* inline-actions sees on <a> juba kujundatud, aga teeme selle “nupu moodi” kindlamaks */
.btn-link{
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 12px;
}

/* Mobiilis: koodid üksteise alla */
@media (max-width: 520px){
  .code-grid{
    grid-template-columns: 1fr;
  }
}
/* ===== Minimal Thank You ===== */
.thankyou-min{
  text-align: center;
  padding: 34px 28px;
}

.thankyou-logo{
  height: 54px;
  width: auto;
  display: block;
  margin: 0 auto 16px;
}

.thankyou-min h1{
  margin: 0 0 10px;
  font-size: 26px;
  line-height: 1.15;
}

.thankyou-min p{
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

/* Mobiil: natuke kompaktsem */
@media (max-width: 520px){
  .thankyou-min{
    padding: 28px 18px;
  }
  .thankyou-min h1{
    font-size: 22px;
  }
  .thankyou-logo{
    height: 46px;
  }
}
/* ===========================
   CONSENT PAGE – minimal polish
   (pane style.css lõppu)
=========================== */

.consent{
  text-align: center;
}

.consent .header{
  margin-bottom: 18px;
}

/* PDF link näeb välja nagu elegantne “secondary button” */
.consent-link{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 100%;
  height: 52px;

  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;

  text-decoration: none;
  font-weight: 900;
  color: #0b0f14;
}

.consent-link:hover{
  border-color: rgba(21,179,199,.40);
  box-shadow: 0 0 0 4px rgba(21,179,199,.10);
}

.consent-hint{
  margin: 10px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

/* Nupp on sul juba globaalne, aga teeme disabled oleku viisakaks */
button:disabled{
  opacity: .70;
  cursor: not-allowed;
}

/* ===========================
   DELAY MESSAGES STYLING
   (pane style.css lõppu)
=========================== */

.delay-message {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background-color: rgba(21, 179, 199, 0.07);
  border: 1px solid rgba(21, 179, 199, 0.2);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  display: none;
}

.delay-message.show {
  display: block;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { 
    opacity: 0; 
    transform: translateY(-8px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}