/* ============================================================
   E-vignette purchase — визуальная копия nemzetiutdij.hu / ematrica
   Палитра и шрифты сняты с оригинала:
   text #00114B · primary #0054A6 · login-bg #EDF5FD · disabled #95A6AF
   ============================================================ */
:root {
  --navy: #00114b;
  --primary: #0054a6;
  --primary-border: #4c78c9;
  --link: #1a6fd4;
  --bg-filled: #f5f6f8;
  --border-soft: #dfe3e8;
  --muted: #66707a;
  --error: #e02828;
  --disabled: #95a6af;
  --font: "Inter", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--navy);
  font-size: 16px;
  min-height: 100vh;
}

body {
  background:
    linear-gradient(160deg, #dfeafa 0%, #eaf2fc 38%, #f4f8fd 70%, #f9fbfe 100%) fixed;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Верхняя полоса ---------- */
.topbar {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 34px;
  border-bottom: 1px solid #e8edf2;
  flex: none;
}
.topbar a.back {
  color: var(--primary);
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.topbar a.back::before {
  content: "←";
  font-size: 14px;
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
  border: none;
  background: none;
  padding: 4px 2px;
}
.lang img { width: 21px; height: 15px; border-radius: 1px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang::after { content: ""; border: 4px solid transparent; border-top-color: #7b8794; margin-top: 5px; }

/* ---------- Шапка ---------- */
.header {
  background: #fff;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 24px;
  box-shadow: 0 2px 6px rgba(16, 44, 84, .08);
  position: relative;
  z-index: 5;
  flex: none;
}
.logo-block { display: flex; align-items: center; gap: 14px; padding-right: 28px; border-right: 1px solid #e4e9ef; }
.logo { width: 46px; height: auto; }
.logo-title { line-height: 1.25; }
.logo-title .t1 { font-size: 19px; font-weight: 700; color: var(--navy); }
.logo-title .t2 { font-size: 12.5px; color: var(--muted); max-width: 250px; }

.menu { display: flex; align-items: center; gap: 30px; }
.menu a, .menu span { font-size: 15.5px; color: var(--navy); cursor: pointer; }
.menu a.active { color: var(--primary); font-weight: 500; text-decoration: none; }
.menu .with-caret::after {
  content: "";
  display: inline-block;
  border: 4px solid transparent;
  border-top-color: var(--navy);
  margin-left: 7px;
  transform: translateY(3px);
}

.header-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.cart-btn {
  background: none; border: none; cursor: pointer; padding: 6px;
  color: var(--primary); display: inline-flex;
}
.btn {
  font-family: var(--font);
  font-size: 14px;
  border-radius: 4px;
  padding: 9px 20px;
  cursor: pointer;
  border: 1px solid transparent;
  line-height: 1.2;
}
.btn-outline {
  background: #edf5fd;
  border-color: var(--primary-border);
  color: var(--primary);
}
.btn-outline:hover { background: #e0edfb; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  font-weight: 500;
}
.btn-primary:hover { background: #004a92; }
.btn-ghost { background: none; color: var(--primary); padding: 9px 12px; }
.btn[disabled] { background: var(--disabled); color: #fff; cursor: not-allowed; }
#payBtn:not([disabled]) { background: var(--primary); color: #fff; }

/* ---------- Основная область ---------- */
.content { flex: 1 0 auto; padding: 8px 24px 60px; }

/* Stepper */
.stepper { display: flex; justify-content: center; max-width: 760px; margin: 26px auto 34px; }
.step { flex: 1; text-align: center; position: relative; font-size: 14.5px; color: var(--muted); }
.step .dot {
  display: block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  margin: 0 auto 12px;
  position: relative;
  z-index: 2;
}
.step.pending .dot { background: #c6cfda; width: 9px; height: 9px; margin-bottom: 11px; }
.step.current .dot {
  background: #fff;
  border: 2px solid var(--primary);
  width: 10px; height: 10px;
}
.step::before, .step::after {
  content: "";
  position: absolute;
  top: 5px;
  width: calc(50% - 8px);
  height: 2px;
  background: var(--primary);
}
.step::before { left: 0; }
.step::after { right: 0; }
.step:first-child::before, .step:last-child::after { display: none; }
.step.pending::before, .step.pending::after { background: #c6cfda; }
.step.current::after { background: #c6cfda; }
.step.current .step-label { color: var(--primary); }
.step.pending .step-label { color: var(--muted); }

/* Карточки */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(16, 44, 84, .10);
  padding: 36px 44px;
}
.columns { display: flex; gap: 28px; max-width: 1180px; margin: 0 auto; align-items: flex-start; }
.col { flex: 1; }
.col > .card { margin-bottom: 28px; }

h1, h2 { font-weight: 700; color: var(--navy); margin: 0 0 10px; }
h1 { font-size: 24px; margin-bottom: 14px; }
h2 { font-size: 22px; }
.hint { color: var(--navy); font-size: 15px; margin: 4px 0 18px; }

/* ---------- Поля ---------- */
.field { position: relative; margin-bottom: 22px; }
.field input, .field select {
  width: 100%;
  border: none;
  outline: none;
  background: var(--bg-filled);
  border-radius: 4px 4px 0 0;
  padding: 22px 12px 6px;
  font-family: var(--font);
  font-size: 16px;
  color: var(--navy);
  box-shadow: 0 1px 0 rgba(0,0,0,.22);
}
.field label {
  position: absolute;
  top: 7px;
  left: 12px;
  font-size: 12px;
  color: var(--muted);
  pointer-events: none;
}
.field label sup, .legend sup { color: var(--error); }
.field .suffix { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); color: #7b8794; }
.field input:focus { background: #fff; }
.field.error input { box-shadow: 0 2px 0 var(--error); }
.field.error label { color: var(--error); }
.field-msg { color: var(--error); font-size: 12.5px; margin-top: 5px; min-height: 16px; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

/* Дата с иконкой */
.date-field input { padding-left: 42px; }
.date-field .prefix-icon {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--primary);
}

/* ---------- Кнопки-выборы (категории / виньетки / языки) ---------- */
.choice-row { display: flex; flex-wrap: wrap; gap: 14px; }
.choice {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font-family: var(--font);
  font-size: 15px;
  padding: 12px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
}
.choice:hover { border-color: var(--primary-border); }
.choice.selected { border: 2px solid var(--primary); color: var(--primary); padding: 11px 17px; }
.choice.cat { flex-direction: column; gap: 6px; min-width: 118px; min-height: 62px; padding: 10px 16px; }
.choice.cat svg { width: 26px; height: 26px; }
.choice.flag-btn img { width: 24px; height: 17px; border-radius: 2px; }
.choice.flag-btn { flex-direction: column; gap: 6px; min-width: 108px; }

/* Кнопка продолжения / оплаты */
.submit-row { margin-top: 26px; }
.btn-block { width: 100%; padding: 13px; font-size: 15.5px; }

/* ---------- Диалоги ---------- */
.overlay {
  position: fixed; inset: 0;
  background: rgba(10, 22, 40, .5);
  display: flex; align-items: flex-start; justify-content: center;
  z-index: 50;
  overflow-y: auto;
  padding: 60px 16px 16px;
}
.dialog {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  padding: 28px 32px 32px;
  width: 100%;
  max-width: 540px;
}
.dialog h3 { margin: 0 0 6px; font-size: 20px; display: flex; justify-content: space-between; align-items: center; }
.dialog h3 .close {
  border: none; background: none; cursor: pointer; color: var(--navy);
  font-size: 20px; line-height: 1;
}
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 16px 0 20px; }
.radio-cards label {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 14px 12px;
  font-size: 13.5px;
  text-align: center;
  cursor: pointer;
  display: flex; flex-direction: column; gap: 8px; align-items: center;
  color: var(--navy);
}
.radio-cards label svg { width: 22px; height: 22px; }
.radio-cards label.selected { border: 2px solid var(--primary); color: var(--primary); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }

/* ---------- Step 3 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1.05fr; gap: 34px; max-width: 1240px; margin: 0 auto; align-items: start; }
.addr-note { color: var(--error); font-size: 15px; margin: 14px 0 22px; }
.addr-filled { color: var(--navy); font-size: 15px; line-height: 1.5; margin: 14px 0 22px; white-space: pre-line; }

.cart-item {
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 20px 22px;
  margin: 20px 0;
}
.cart-item .head { display: flex; justify-content: space-between; gap: 12px; font-weight: 700; color: var(--navy); font-size: 17px; }
.cart-item .vehicle { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 15px; }
.cart-item .vehicle img { width: 22px; height: 15px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.cart-item .validity-line { margin-top: 12px; font-size: 14.5px; color: var(--navy); }
.cart-item .validity-line .dates { font-weight: 600; margin-top: 3px; }
.cart-item .del {
  margin-top: 14px;
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 14.5px; font-family: var(--font);
  display: inline-flex; align-items: center; gap: 7px; padding: 0;
}
.cart-item .del:hover { color: var(--error); }

.total-row { display: flex; justify-content: space-between; align-items: center; font-size: 20px; font-weight: 700; color: var(--navy); margin: 24px 0; }

.check-row { display: flex; gap: 11px; align-items: flex-start; margin: 14px 0; font-size: 15px; color: var(--navy); }
.check-row a { color: var(--link); text-decoration: underline; }
.check-row sup { color: var(--error); }
.check-row input[type="checkbox"] {
  appearance: none;
  width: 19px; height: 19px;
  border: 2px solid #9aa4b0;
  border-radius: 3px;
  flex: none;
  margin: 0;
  cursor: pointer;
  position: relative;
  background: #fff;
}
.check-row input[type="checkbox"]:checked { background: var(--primary); border-color: var(--primary); }
.check-row input[type="checkbox"]:checked::after {
  content: "✓";
  color: #fff;
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.check-row.error input[type="checkbox"] { border-color: var(--error); }
.check-error-msg { color: var(--error); font-size: 12.5px; margin: -6px 0 0 30px; min-height: 15px; }

.cards-row { display: flex; align-items: center; gap: 26px; margin: 26px 0; }
.cards-row img { height: 34px; width: auto; }

.disclaimer { color: var(--navy); font-size: 14.5px; line-height: 1.55; margin-top: 18px; }

/* Кнопка Enter address */
.btn-outline2 {
  background: #fff;
  border: 1px solid var(--primary-border);
  color: var(--primary);
  border-radius: 4px;
  padding: 10px 22px;
  font-family: var(--font);
  font-size: 14.5px;
  cursor: pointer;
}
.btn-outline2:hover { background: #edf5fd; }
.btn-outline2 .plus { margin-right: 6px; color: var(--primary); }

/* ---------- Footer ---------- */
.footer { background: #fff; margin-top: 60px; padding: 34px 24px 20px; flex: none; }
.footer-cols { display: flex; gap: 120px; max-width: 1240px; margin: 0 auto; }
.footer h4 { margin: 0 0 14px; font-size: 17px; color: var(--navy); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin: 9px 0; }
.footer a { color: var(--navy); font-size: 14.5px; }
.copyright { max-width: 1240px; margin: 30px auto 0; color: var(--muted); font-size: 13px; }

/* ---------- Fake SimplePay ---------- */
.sp-wrap { max-width: 460px; margin: 40px auto; background: #fff; border-radius: 8px; box-shadow: 0 3px 14px rgba(16,44,84,.14); padding: 34px 38px; }
.sp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sp-head img.sp-logo { height: 30px; }
.sp-amount { font-size: 26px; font-weight: 700; color: var(--navy); margin: 14px 0 22px; }
.sp-merchant { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.sp-card-field { position: relative; }
.sp-card-field input { padding-left: 46px; }
.sp-card-field .prefix-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--primary); }
.sp-note { font-size: 12.5px; color: var(--muted); margin-top: 16px; line-height: 1.5; }
.processing { text-align: center; padding: 90px 20px; }
.spinner {
  width: 46px; height: 46px; margin: 0 auto 22px;
  border: 4px solid #dfe7f2; border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- misc ---------- */
.hidden { display: none !important; }
.notice-bottom { color: var(--navy); font-size: 14px; max-width: 700px; margin: 0 auto; }
.notice-bottom p { margin: 8px 0; }

@media (max-width: 900px) {
  .columns, .grid-2 { flex-direction: column; grid-template-columns: 1fr; }
  .footer-cols { gap: 40px; flex-wrap: wrap; }
  .card { padding: 26px 20px; }
  .menu { display: none; }
}

/* ============================================================
   Главная страница (копия nemzetiutdij.hu)
   ============================================================ */
body.home {
  background: #fff;
}

.home-topbar {
  justify-content: flex-start;
  gap: 44px;
  padding: 10px 28px;
  height: 56px;
  border-bottom: none;
}
.search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #c3ccd6;
  border-radius: 6px;
  padding: 9px 14px;
  min-width: 330px;
}
.search input {
  border: none;
  outline: none;
  font-family: var(--font);
  font-size: 15px;
  color: var(--navy);
  width: 100%;
  background: transparent;
}
.search input::placeholder { color: #8a94a0; }
.socials {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--navy);
}
.socials a { color: var(--navy); display: inline-flex; }
.socials a:hover { color: var(--primary); }

.home-header { padding: 16px 28px; gap: 34px; }
.mk-logo { height: 56px; width: auto; }
.home-menu { gap: 26px; }
.home-menu a, .home-menu span { font-size: 16.5px; }
.home-header .btn-primary { padding: 11px 30px; font-size: 15px; }

.hero-wrap { position: relative; }
.hero {
  height: 433px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}
.hero-arrow.left { left: 26px; }
.hero-arrow.right { right: 26px; }
.hero-arrow:hover { background: rgba(255, 255, 255, .32); }
.hero-pause {
  position: absolute;
  right: 30px;
  bottom: 26px;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .2);
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.home-cards {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 44px;
  margin-top: -212px;
  padding: 0 24px;
}
.home-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 26px rgba(16, 44, 84, .16);
  width: 480px;
  max-width: 46%;
  padding: 8px 40px 30px;
  text-align: center;
}
.card-icon {
  display: block;
  width: 84px;
  height: auto;
  margin: -46px auto 14px;
}
.home-card h2 { font-size: 26px; margin: 6px 0 12px; }
.home-card p {
  color: var(--navy);
  font-size: 16.5px;
  line-height: 1.5;
  margin: 0 0 22px;
}
.card-btn {
  display: block;
  width: 100%;
  padding: 13px 18px;
  font-size: 16.5px;
  font-weight: 500;
}
.card-btn:hover { text-decoration: none; }
.card-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: #1a6fd4;
  font-size: 16px;
}
.card-link:hover { text-decoration: underline; }

.home-footer { margin-top: 0; padding-top: 46px; }

.cookie-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 -4px 18px rgba(16, 44, 84, .18);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 28px;
}
.cookie-bar p {
  margin: 0;
  font-size: 13px;
  color: var(--navy);
  line-height: 1.5;
}

@media (max-width: 900px) {
  .home-cards { flex-direction: column; align-items: center; margin-top: -140px; }
  .home-card { max-width: 100%; width: 100%; }
  .home-topbar { gap: 16px; }
  .search { min-width: 0; flex: 1; }
  .hero { height: 300px; }
}

/* ---------- Календарь-пикер ---------- */
.date-field input { padding-left: 44px; }
.date-field label { left: 44px; }
.date-field { cursor: pointer; }
.date-field .prefix-icon { left: 13px; top: 50%; transform: translateY(-50%); color: var(--primary); pointer-events: none; }
.datepicker {
  position: fixed;
  z-index: 200;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(16, 44, 84, .28);
  padding: 14px;
  width: 292px;
  user-select: none;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-month { font-weight: 600; color: var(--navy); font-size: 15px; }
.dp-nav {
  border: none; background: none; cursor: pointer; color: var(--primary);
  font-size: 18px; line-height: 1; padding: 4px 10px; border-radius: 4px;
}
.dp-nav:disabled { color: #c6cfda; cursor: default; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-wd { font-size: 11.5px; color: var(--muted); padding: 4px 0; }
.dp-day {
  font-size: 13.5px;
  padding: 7px 0;
  border-radius: 5px;
  cursor: pointer;
  color: var(--navy);
}
.dp-day:hover { background: #edf5fd; }
.dp-day.out { visibility: hidden; }
.dp-day.dis { color: #c6cfda; cursor: default; }
.dp-day.dis:hover { background: none; }
.dp-day.sel { background: var(--primary); color: #fff; font-weight: 600; }

/* ---------- Мобильная версия ---------- */
@media (max-width: 560px) {
  .topbar { padding: 4px 12px; height: auto; min-height: 34px; gap: 10px; flex-wrap: wrap; }
  .header { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .logo-block { padding-right: 0; border-right: none; gap: 10px; min-width: 0; }
  .logo { width: 38px; }
  .logo-title .t2 { display: none; }
  .logo-title .t1 { font-size: 17px; }
  .header-actions { gap: 8px; }
  .header .btn { padding: 9px 14px; font-size: 14px; }
  .cart-btn { padding: 4px; }
  .content { padding: 8px 14px 48px; }
  .stepper { margin: 18px auto 20px; }
  .step { font-size: 12.5px; }
  .two-col { grid-template-columns: 1fr; }
  .columns, .grid-2 { gap: 16px; }
  .footer-cols { flex-direction: column; gap: 24px; padding: 0 14px; }
  .copyright { padding: 0 14px; }
  .dialog { padding: 20px 18px 22px; }
  .home-topbar { padding: 6px 12px; gap: 14px; height: auto; min-height: 48px; flex-wrap: wrap; }
  .home-menu { gap: 14px; }
  .home-menu a, .home-menu span { font-size: 14px; }
  .search { min-width: 0; flex: 1; }
  .hero { height: 220px; }
  .home-cards { margin-top: -70px; }
  .sp-wrap { padding: 22px 18px; }
}
