/* EVA.UA checkout – демо. Токени з Figma «Checkout 3.0» + живого eva.ua */
@font-face { font-family: ProximaNova; font-weight: 400; font-display: swap; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; size-adjust: 105%;
  src: url("https://eva.ua/nuxt_content/fonts/ProximaNova-Regular.woff2") format("woff2"); }
@font-face { font-family: ProximaNova; font-weight: 600; font-display: swap; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; size-adjust: 105%;
  src: url("https://eva.ua/nuxt_content/fonts/ProximaNova-Semibold.woff2") format("woff2"); }
@font-face { font-family: ProximaNova; font-weight: 700; font-display: swap; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%; size-adjust: 105%;
  src: url("https://eva.ua/nuxt_content/fonts/ProximaNova-Bold.woff2") format("woff2"); }

:root {
  --text-primary: #212121;
  --text-label: #333333;
  --text-secondary: #595959;
  --text-muted: #919191;
  --text-hint: #999999;
  --text-pay: #111827;
  --text-pay-desc: #6b7280;
  --bg: #ffffff;
  --bg-subtle: #f3f3f3;
  --bg-medium: #ebebeb;
  --bg-product: #f6f6f6;
  --bg-inverse: #212121;
  --btn-dark: #1a1a1a;
  --border-default: #d8d8d8;
  --border-subtle: #ebebeb;
  --border-gray: #e5e7eb;
  --green: #76bf44;
  --green-tint: #d9f2bf;
  --switch-off: #d1d5db;
  --switch-knob-off: #999999;
  --error: #e50000;
  --radius-sm: 4px;
  --radius-md: 8px;
  --font: ProximaNova, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --input-h: 44px;
  --input-fs: 14px;
  --input-lh: 18px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg);
  font-size: 14px;
  line-height: 18px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  flex-direction: column;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }
h1, h2, h3, p { margin: 0; }
svg { display: block; }

/* ---------- Header ---------- */
.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px;
  border-bottom: 1px solid var(--border-gray);
}
.header__logo { display: block; width: 137px; height: 36px; padding-bottom: 4px; }
.header__logo img { display: block; width: 137px; height: 32px; object-fit: contain; object-position: left center; }
.header__contacts { display: flex; align-items: center; font-style: normal; }
.header__phone { font-size: 26px; line-height: 26px; letter-spacing: .2px; white-space: nowrap; }
.header__note { padding-left: 32px; font-size: 13px; line-height: 16px; color: var(--text-secondary); white-space: nowrap; }

/* ---------- Layout ---------- */
.main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 16px; }
.page-title { font-size: 24px; line-height: 32px; font-weight: 700; }
.layout { display: flex; align-items: flex-start; gap: 38.4px; padding-top: 16px; }
.content { flex: 1 1 0; min-width: 0; padding-bottom: 80px; }
.sidebar { width: 448px; flex-shrink: 0; position: sticky; top: 16px; }

.footer {
  background: rgba(246, 246, 246, .9);
  padding: 10px 16px; text-align: center;
  font-size: 13px; line-height: normal; color: var(--text-secondary);
}

/* ---------- Common blocks ---------- */
.card {
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}
.card--active { border-color: var(--green); }
.section-title { font-size: 18px; line-height: 24px; font-weight: 600; }
.stack-24 > * + * { margin-top: 24px; }

/* ---------- Login banner ---------- */
.login-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 4px;
  min-height: 66px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}
.login-banner__text { font-size: 16px; line-height: 20px; font-weight: 600; }
.btn-small {
  border: 0; border-radius: var(--radius-md);
  background: var(--bg-inverse); color: #fff;
  padding: 8px 16px; font-size: 12px; line-height: 16px; font-weight: 600;
  white-space: nowrap;
}
.btn-small:hover { background: #000; }

/* ---------- Form fields ---------- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field__label {
  height: 24px; padding-top: 4.5px;
  font-size: 14px; line-height: 18px; font-weight: 600; color: var(--text-label);
  white-space: pre;
}
.field__label .req { color: var(--error); }
.field__control { position: relative; padding-top: 8px; }
.input {
  display: block; width: 100%;
  height: var(--input-h);
  padding: 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg);
  color: var(--text-primary);
  font-size: var(--input-fs); line-height: var(--input-lh);
  outline: none;
  transition: border-color .15s;
}
.input::placeholder { color: var(--text-hint); opacity: 1; }
.input:focus { border-color: var(--text-primary); }
.input--with-icon { padding-right: 40px; }
/* Сценарій 2: кнопка «Увійти» всередині поля телефону – з'являється, щойно введено номер */
.input--with-action:not(:placeholder-shown) { padding-right: 88px; }
.field__login { position: absolute; right: 8px; top: calc(8px + (var(--input-h) - 32px) / 2); }
.input:placeholder-shown ~ .field__login { display: none; }
.field__login--checking { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; }
.field__login--in { animation: login-in .2s ease-out; }
@keyframes login-in { from { opacity: 0; transform: scale(.9); } }

/* Крутилка завантаження (сценарій 2: перевірка номера й коду) */
.spinner { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-default); border-top-color: var(--text-primary); animation: spin .7s linear infinite; }
.spinner--light { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-primary.is-busy:disabled { background: var(--btn-dark); border-color: var(--btn-dark); cursor: progress; }
.input:disabled { background: var(--bg-subtle); }
.field--error .input { border-color: var(--error); }
.field__error { padding-top: 4px; font-size: 13px; line-height: 18px; color: var(--error); }
.field__hint { padding-top: 8px; font-size: 13px; line-height: 18px; color: var(--text-hint); }
.field__icon { position: absolute; right: 12px; top: calc(8px + (var(--input-h) - 20px) / 2); width: 20px; height: 20px; pointer-events: none; }
/* Email «у макеті – займає ліву колонку» */
.field--half { grid-column: 1; }

/* ---------- Switch ---------- */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.toggle-row__label { font-size: 14px; line-height: 18px; font-weight: 600; color: var(--text-label); }
.toggle-row__sub { display: block; font-size: 12px; line-height: 16px; font-weight: 400; color: var(--text-secondary); }
.switch {
  position: relative; flex-shrink: 0;
  width: 48px; height: 24px; padding: 0; border: 0;
  border-radius: 9999px; background: var(--switch-off);
  transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; left: 2px; top: 2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--switch-knob-off);
  box-shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.1);
  transition: transform .2s, background .2s;
}
.switch[aria-checked="true"] { background: var(--green-tint); }
.switch[aria-checked="true"]::after { transform: translateX(24px); background: var(--green); }
.toggle-body { padding-top: 16px; }

/* ---------- Order ---------- */
.order-head__title { font-size: 18px; line-height: 24px; font-weight: 600; }
.order-head__title .muted { color: var(--text-muted); }
.order-head__title .num { margin-left: 6px; }
.order-head__merchant { display: flex; align-items: center; gap: 4px; padding-top: 8px; color: var(--text-secondary); }
.icon-btn { border: 0; background: none; padding: 0; display: inline-flex; }
.order-card__top { display: flex; align-items: center; justify-content: space-between; }
.order-card__sum { font-size: 16px; line-height: 20px; font-weight: 600; }
.link-btn { border: 0; background: none; padding: 0; color: var(--text-secondary); font-size: 14px; line-height: 18px; }
.link-btn:hover { color: var(--text-primary); }
.thumbs { display: flex; gap: 8px; padding-top: 8px; }
.thumb { width: 64px; height: 64px; border-radius: var(--radius-md); overflow: hidden; background: var(--bg-product); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; mix-blend-mode: multiply; }

/* ---------- Delivery ---------- */
.delivery { padding-top: 24px; }
.delivery__box { margin-top: 16px; }
.city-row { display: flex; align-items: center; justify-content: space-between; }
.city-row__name { font-size: 16px; line-height: 20px; font-weight: 600; }
.btn-change {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 6px 10px; margin-right: -8px;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--text-primary); font-size: 14px; line-height: 18px; font-weight: 600;
}
.btn-change:hover { background: var(--bg-inverse); color: #fff; }
.free-banner {
  margin-top: 16px; padding: 16px;
  background: var(--green-tint); border-radius: var(--radius-md);
  font-size: 14px; line-height: 18px; font-weight: 600;
}
.method { display: flex; align-items: flex-start; gap: 8px; }
.method__icon { width: 24px; height: 24px; flex-shrink: 0; }
.method__info { flex: 1; min-width: 0; }
.method__title { font-size: 16px; line-height: 20px; font-weight: 600; }
.method__date { padding-top: 2px; color: var(--text-secondary); }
.method__price { font-size: 16px; line-height: 24px; font-weight: 600; white-space: nowrap; margin-top: -2px; }
.method-selected { padding-top: 16px; }
.method-body { padding-left: 32px; }
.promo-tag {
  display: inline-block; margin-top: 16px;
  padding: 0 6px; border-radius: var(--radius-sm);
  background: var(--bg-medium);
  font-size: 13px; line-height: 15px;
}
.method-list .promo-tag { margin-top: 12px; }

.city-select { padding-top: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.chip {
  border: 0; border-radius: var(--radius-sm);
  background: var(--bg-medium); color: var(--text-secondary);
  padding: 6px 12px; font-size: 13px; line-height: 16px;
}
.chip[aria-pressed="true"] { background: var(--border-default); color: var(--text-primary); }
.method-list { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }
.method-option { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.method-option:hover { border-color: var(--border-default); }

/* Select (warehouse) */
.select { position: relative; padding-top: 16px; }
.select .input { padding-right: 40px; cursor: pointer; }
.select__chevron { position: absolute; right: 8px; top: calc(16px + (var(--input-h) - 36px) / 2); width: 36px; height: 36px; padding: 8px; color: var(--text-primary); pointer-events: none; transform: rotate(180deg); transition: transform .15s; }
.select--open .select__chevron { transform: rotate(0deg); }
.select--open .input { border-color: var(--text-secondary); }
.select__list {
  position: absolute; left: 0; right: 0; top: calc(16px + var(--input-h) + 4px); z-index: 20;
  max-height: 184px; overflow-y: auto; margin: 0; padding: 0; list-style: none;
  background: #fff; border: 1px solid var(--border-subtle); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.select__list li { padding: 4px 6px; font-size: 13px; line-height: 18px; cursor: pointer; }
.select__list li:hover, .select__list li.is-active { background: var(--bg-subtle); }
.select__empty { color: var(--text-hint); }
.schedule { display: flex; gap: 8px; padding-top: 16px; color: var(--text-muted); }
.courier-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 12px; row-gap: 0; padding-top: 4px; }
.courier-fields .field { padding-top: 8px; }
.courier-fields .field--full { grid-column: 1 / -1; }
.courier-fields .field__label { color: var(--text-primary); font-size: 14px; }
.lift-row { padding-top: 16px; }
.lift-row .toggle-row__label { font-weight: 400; font-size: 13px; line-height: 15px; color: var(--text-primary); }

/* ---------- Payment ---------- */
.payment { padding-top: 16px; }
.payment__list { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }
.pay-group { border: 1px solid var(--border-gray); border-radius: var(--radius-md); padding: 16px; cursor: pointer; background: #fff; }
.pay-group--active { border-color: var(--green); cursor: default; }
.pay-group__head { display: flex; gap: 12px; align-items: flex-start; }
.pay-group__icon { width: 20px; height: 22px; padding-top: 2px; flex-shrink: 0; }
.pay-group__title { font-size: 16px; line-height: 20px; font-weight: 600; color: var(--text-pay); }
.pay-group__desc { padding-top: 4px; font-size: 12px; line-height: 16px; color: var(--text-pay-desc); }
.pay-options { list-style: none; margin: 0; padding: 12px 0 0 32px; }
.pay-option { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14px; line-height: 20px; cursor: pointer; }
.radio { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-gray); flex-shrink: 0; background: #fff; transition: border .15s; }
.pay-option--active .radio { border: 5px solid var(--green); }
.pay-badge { display: inline-flex; height: 16px; vertical-align: middle; margin-left: 6px; }
.pay-badge svg { height: 16px; width: auto; }
.pay-placeholder { padding: 16px; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); text-align: center; font-size: 12px; line-height: 16px; color: var(--text-hint); }

/* ---------- Promo ---------- */
.promo { padding-top: 16px; }
.promo__title { padding: 16px 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.promo .card + .card { margin-top: 8px; }
.btn-apply {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 48px; margin-top: 16px; padding: 10px 14px;
  border: 0; border-radius: var(--radius-md);
  background: var(--bg-inverse); color: #fff;
  font-size: 18px; line-height: 28px; font-weight: 600;
}
.btn-apply:disabled { background: var(--text-secondary); color: var(--text-muted); opacity: .7; cursor: default; }
.promo .field__control { padding-top: 16px; }

/* ---------- Sidebar summary ---------- */
.summary { border: 1px solid var(--border-default); border-radius: var(--radius-md); overflow: hidden; }
.summary__rows { padding: 16px; }
.summary__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.summary__row + .summary__row { padding-top: 12px; }
.summary__row dd { margin: 0; font-weight: 600; text-align: right; max-width: 112px; }
.summary__row dt { white-space: nowrap; }
.summary__bottom { background: var(--bg-subtle); border-top: 1px solid var(--border-default); padding: 16px; }
.summary__total { display: flex; justify-content: space-between; font-size: 16px; line-height: 24px; }
.summary__total b { font-size: 18px; font-weight: 600; }
.summary__cta { padding-top: 32px; }
.btn-primary {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 48px;
  border: 2px solid var(--btn-dark); border-radius: var(--radius-md);
  background: var(--btn-dark); color: #fff;
  font-size: 16px; line-height: 24px; font-weight: 600;
}
.btn-primary span { position: relative; z-index: 1; }
.btn-primary.is-loading { background: #fff; color: var(--btn-dark); }
.btn-primary.is-loading::before {
  content: ""; position: absolute; inset: 0; background: var(--btn-dark);
  transform-origin: left; animation: cta-fill 1.2s ease-in-out forwards;
}
.btn-primary.is-loading span { mix-blend-mode: difference; color: #fff; }
@keyframes cta-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.summary__terms { padding-top: 16px; text-align: center; font-size: 13px; line-height: 15px; color: var(--text-secondary); }
.summary__terms a { color: inherit; }
.summary__cta-spacer { display: none; }

/* ---------- Mobile sticky CTA ---------- */
.mobile-cta { display: none; }

/* ---------- Modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; padding: 16px;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal { width: 344px; max-width: 100%; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overscroll-behavior: contain; overflow: auto; background: #fff; border-radius: 12px; padding: 20px 12px 32px; }
.modal--wide { width: 344px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; }
.modal__title { font-size: 18px; line-height: 24px; font-weight: 600; }
.modal__text { font-size: 14px; line-height: 18px; padding-bottom: 8px; }
.modal .field__label { font-weight: 400; font-size: 16px; line-height: 20px; color: var(--text-primary); height: auto; padding-top: 8px; }
.modal .btn-primary { margin-top: 12px; height: 37px; border-radius: 6px; font-size: 14px; }
.modal-products__bar { background: var(--bg-subtle); border-radius: var(--radius-sm); padding: 6px 12px; font-size: 12px; line-height: 16px; }
.modal-product { display: flex; gap: 16px; padding: 12px 0; }
.modal-product img { width: 40px; height: 56px; object-fit: contain; }
.modal-product__name { font-size: 12px; line-height: 16px; }
.modal-product__meta { display: flex; justify-content: space-between; padding-top: 8px; font-size: 12px; line-height: 16px; }
.btn-outline {
  width: 100%; height: 37px; margin-top: 8px;
  border: 1px solid var(--btn-dark); border-radius: var(--radius-md); background: #fff;
  font-size: 12px; font-weight: 600;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed; top: 32px; right: 32px; z-index: 200;
  width: 320px; padding: 12px 40px 14px 12px;
  background: #fdf1e6; color: var(--text-primary);
  border-radius: var(--radius-sm); font-size: 14px; line-height: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08); overflow: hidden;
  animation: fade .2s ease-out;
}
.toast__close { position: absolute; right: 10px; top: 10px; border: 0; background: none; padding: 2px; }
.toast__bar { position: absolute; left: 0; bottom: 0; height: 3px; background: #f58220; animation: toast-bar 4s linear forwards; }
@keyframes toast-bar { from { width: 100%; } to { width: 0; } }

/* ---------- Success ---------- */
.success { max-width: 560px; margin: 40px auto; text-align: center; }
.success__icon { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--green-tint); display: flex; align-items: center; justify-content: center; }
.success h1 { font-size: 24px; line-height: 32px; }
.success p { padding-top: 8px; color: var(--text-secondary); }
.success .btn-primary { margin-top: 24px; }

/* ===================================================================== */
/* Mobile (макет 360px)                                                  */
/* ===================================================================== */
@media (max-width: 1023px) {
  .layout { flex-direction: column; gap: 24px; }
  .sidebar { width: 100%; position: static; }
  .content { padding-bottom: 0; }
}
@media (max-width: 767px) {
  :root { --input-h: 50px; --input-fs: 16px; --input-lh: 24px; }
  .header__contacts { display: none; }
  .fields { grid-template-columns: 1fr; }
  .field--half { grid-column: 1; }
  .login-banner__text { max-width: 221px; }
  .summary__cta { display: none; }
  .summary__cta-spacer { display: block; height: 56px; margin-top: 32px; }
  .summary__terms { padding-top: 16px; }
  .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .main { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
  .overlay { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .mobile-cta {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 16px 16px calc(16px + env(safe-area-inset-bottom)); background: #fff;
    border-top: 1px solid var(--border-default);
    filter: drop-shadow(0 -4px 5px rgba(0,0,0,.05));
  }
  .method__title, .method__date { overflow-wrap: anywhere; }
  .courier-fields { grid-template-columns: 1fr; }
  .toast { left: 16px; right: 16px; top: 16px; width: auto; }
  .select__list li { font-size: 14px; padding: 8px; }
}

/* ===================================================================== */
/* Демо-панель сценаріїв                                                 */
/* ===================================================================== */
.demo { position: fixed; left: 16px; bottom: 16px; z-index: 90; width: 312px; max-width: calc(100vw - 32px); font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 13px; line-height: 1.35; color: #1b1b1b; }
.demo button { font: inherit; color: inherit; background: none; border: 0; text-align: left; cursor: pointer; }
.demo__toggle { display: inline-flex !important; align-items: center; gap: 8px; padding: 8px 12px !important; background: #1b1b1b !important; color: #fff !important; border-radius: 999px; font-weight: 600 !important; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.demo__toggle i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.demo__card { margin-bottom: 8px; background: #fff; border: 1px solid #e3e3e3; border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18); overflow: hidden auto; max-height: calc(100vh - 80px); max-height: calc(100dvh - 180px); }
.demo__card[hidden] { display: none; }
.demo__section { padding: 12px; }
.demo__section + .demo__section { border-top: 1px solid #eee; }
.demo__label { display: flex; justify-content: space-between; margin-bottom: 8px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8a8a8a; }
.demo__states { display: flex; flex-direction: column; gap: 2px; }
.demo__state { display: grid !important; grid-template-columns: 18px 1fr; gap: 0 8px; width: 100%; padding: 6px 8px !important; border-radius: 8px; }
.demo__state:hover { background: #f4f4f4 !important; }
.demo__state kbd { grid-row: span 2; height: 18px; font: 600 11px/18px system-ui, sans-serif; color: #8a8a8a; text-align: center; border: 1px solid #ddd; border-radius: 4px; }
.demo__state b { font-weight: 600; }
.demo__state small { font-size: 12px; color: #777; }
.demo__state[aria-pressed="true"] { background: #eef7e7 !important; }
.demo__state[aria-pressed="true"] kbd { background: var(--green); border-color: var(--green); color: #fff; }
.demo__seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; background: #f1f1f1; border-radius: 8px; }
.demo__seg button { padding: 6px 8px !important; border-radius: 6px; text-align: center !important; font-weight: 600 !important; color: #777 !important; }
.demo__seg button:hover { color: #1b1b1b !important; }
.demo__seg button[aria-checked="true"] { background: #fff !important; color: #1b1b1b !important; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.demo__reset { width: 100%; padding: 6px 8px !important; border-radius: 8px; font-weight: 600 !important; }
.demo__reset:hover { background: #f4f4f4 !important; }
@media (max-width: 767px) { .demo { bottom: calc(100px + env(safe-area-inset-bottom)); } }

/* ===================================================================== */
/* Сценарій 1 – обов'язкова авторизація                                */
/* ===================================================================== */
.auth-block__title { font-size: 18px; line-height: 24px; font-weight: 600; padding-bottom: 16px; }
/* сіра підкладка як в оригінальному банері (.login-banner) */
.login-banner--required { transition: border-color .2s, box-shadow .2s; }
.auth-block--error .login-banner--required { border-color: var(--error); }
.auth-block__error { padding-top: 6px; font-size: 13px; line-height: 18px; color: var(--error); }
.auth-block--pulse .login-banner--required { animation: auth-pulse 1.2s ease-out 1; }
@keyframes auth-pulse {
  0% { box-shadow: 0 0 0 0 rgba(229, 0, 0, .35); }
  100% { box-shadow: 0 0 0 10px rgba(229, 0, 0, 0); }
}

.btn-primary:disabled { background: var(--text-secondary); border-color: var(--text-secondary); color: var(--text-muted); cursor: default; }

/* Модалка входу (Figma «2.0. Авторизація») */
.auth-modal {
  position: relative;
  width: 448px; max-width: 100%;
  max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 16px; padding: 24px 16px;
}
.auth-modal--enter { animation: fade .15s ease-out; }
.overlay--still { animation: none; }
.auth-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-modal__head .icon-btn svg { width: 24px; height: 24px; }
.auth-modal__title { font-size: 20px; line-height: 26px; font-weight: 600; }
.auth-modal__text { padding-top: 24px; font-size: 16px; line-height: 22px; }
.auth-modal__text b, .auth-link { font-weight: 600; }
.auth-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 600; color: var(--text-primary); text-decoration: underline; text-underline-offset: 2px; }
.auth-field { padding-top: 24px; position: relative; }
.auth-field + .auth-field { padding-top: 16px; }
.auth-field__label { display: block; font-size: 16px; line-height: 20px; font-weight: 600; }
.auth-field__control { position: relative; padding-top: 12px; }
.auth-input {
  display: block; width: 100%; height: 48px; padding: 12px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: #fff; color: var(--text-primary);
  font-family: inherit; font-size: 16px; line-height: 24px; outline: none;
}
.auth-input::placeholder { color: var(--text-hint); }
.auth-input:focus { border-color: var(--text-primary); }
.auth-input--code:focus { border-color: var(--green); }
.auth-input:disabled { background: var(--bg-subtle); border-color: var(--border-subtle); }
.auth-input[readonly] { background: var(--bg-subtle); border-color: var(--border-subtle); color: var(--text-secondary); padding-right: 64px; }
.auth-input__action { position: absolute; right: 16px; bottom: 14px; border: 0; background: none; padding: 0; font: inherit; font-size: 16px; line-height: 20px; color: var(--text-primary); }
.auth-input__action:hover { text-decoration: underline; }
.auth-field--error .auth-input { border-color: var(--error); }
.auth-field__error { padding-top: 8px; font-size: 14px; line-height: 18px; color: var(--error); }
.auth-modal__btn { margin-top: 24px; }
.auth-modal__terms { padding-top: 24px; text-align: center; font-size: 14px; line-height: 16px; color: var(--text-secondary); }
.auth-modal__terms a { color: inherit; }
.auth-modal__demo { padding-top: 12px; text-align: center; font-size: 12px; line-height: 16px; color: var(--text-hint); }

/* Симуляція системної підказки автозаповнення OTP */
.otp-suggest {
  display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 8px;
  padding: 8px 12px; border: 1px solid var(--border-subtle); border-radius: 10px;
  background: #f7f7f8; text-align: left; font: inherit; color: var(--text-primary);
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  animation: otp-in .25s ease-out;
}
.otp-suggest:hover { background: #efeff1; }
.otp-suggest__icon { font-size: 18px; line-height: 1; }
.otp-suggest__text { display: flex; flex-direction: column; }
.otp-suggest__text b { font-size: 16px; line-height: 20px; letter-spacing: 2px; }
.otp-suggest__text span { font-size: 12px; line-height: 16px; color: var(--text-secondary); }
@keyframes otp-in { from { opacity: 0; transform: translateY(-4px); } }

@media (max-width: 767px) {
  .overlay--auth { align-items: flex-end; padding: 0; }
  .auth-modal {
    width: 100%; max-height: 92vh; max-height: 92dvh;
    border-radius: 16px 16px 0 0; padding: 24px 16px calc(32px + env(safe-area-inset-bottom));
  }
  .auth-modal--enter { animation: sheet-in .25s ease-out; }
  .auth-modal__title { font-size: 18px; line-height: 24px; }
  .auth-modal__text { padding-top: 24px; font-size: 14px; line-height: 20px; }
  .auth-field__label { font-size: 14px; line-height: 18px; }
  .auth-modal__terms { font-size: 13px; line-height: 16px; }
  .auth-block__title { font-size: 16px; line-height: 20px; padding-bottom: 12px; }
}
@keyframes sheet-in { from { transform: translateY(100%); } }

/* ===================================================================== */
/* Сценарій 3 – вхід у картці на сторінці (Figma Checkout 3.0, node 4918:14954) */
/* ===================================================================== */
.layout--a3 .stack-24 > * + * { margin-top: 32px; }
.layout--a3 .fields .field__label { height: auto; padding-top: 0; font-size: 16px; line-height: 20px; color: var(--text-primary); }
.layout--a3 .fields .field__control { padding-top: 16px; }
.layout--a3 .fields .input { height: 48px; }
.layout--a3 .fields .field__icon { top: calc(16px + 14px); }

.a3-card {
  display: flex; flex-direction: column; gap: 36px;
  padding: 16px; background: #fff;
  border: 1px solid var(--border-default); border-radius: 10px;
  transition: border-color .2s;
}
.a3-card--error { border-color: var(--error); }
.a3-card__title { font-size: 16px; line-height: 20px; font-weight: 600; text-align: center; }
.a3-card__text { margin: -20px 0 0; font-size: 14px; line-height: 18px; text-align: center; color: var(--text-secondary); }
.a3-card__text b { color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.a3-card__hint { margin: 12px 0 0; font-size: 13px; line-height: 16px; color: var(--text-secondary); }
.a3-card__demo { margin: -24px 0 0; font-size: 12px; line-height: 16px; text-align: center; color: var(--text-hint); }
.a3-field { display: flex; flex-direction: column; }
.a3-field__label { font-size: 16px; line-height: 20px; font-weight: 600; color: var(--text-primary); }
.a3-field__label .req { color: #eb0000; }
.a3-input { height: 48px; margin-top: 16px; }
.a3-input--code { letter-spacing: 4px; }
.a3-input--code::placeholder { letter-spacing: 0; }
.a3-field--error .a3-input { border-color: var(--error); }
.a3-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 40px; padding: 10px 16px;
  border: 0; border-radius: var(--radius-md);
  background: var(--bg-inverse); color: #fff;
  font: inherit; font-size: 14px; line-height: 18px; font-weight: 600;
}
.a3-btn:hover:not(:disabled) { background: #000; }
.a3-btn:disabled { background: var(--text-secondary); color: var(--text-muted); cursor: default; }
.a3-btn.is-busy:disabled { background: var(--bg-inverse); cursor: progress; }
.a3-card--user { flex-direction: row; align-items: center; gap: 12px; animation: otp-in .25s ease-out; }
.a3-user__icon { display: flex; width: 20px; height: 20px; flex: none; }
.a3-user__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.a3-user__info b { font-size: 16px; line-height: 20px; font-weight: 600; }
.a3-user__info span { font-size: 14px; line-height: 18px; color: var(--text-secondary); }
@media (max-width: 767px) {
  .layout--a3 .fields .input, .a3-input { font-size: 16px; }
}

/* ===================================================================== */
/* Вхід через Google / Apple / пошту (симуляція) – флоу 1 і 3            */
/* ===================================================================== */
.soc-divider { display: flex; align-items: center; gap: 12px; margin: 20px 0 16px; font-size: 13px; line-height: 16px; color: var(--text-hint); }
.soc-divider::before, .soc-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-subtle); }
.a3-card .soc-divider { margin: -12px 0 -20px; }
.soc-list { display: flex; flex-direction: column; gap: 8px; }
.soc-provider {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 40px; padding: 0 16px;
  border: 1px solid var(--border-default); border-radius: var(--radius-md);
  background: #fff; color: var(--text-primary);
  font: inherit; font-size: 14px; line-height: 18px; font-weight: 600;
  transition: background .15s, border-color .15s;
}
.soc-provider:hover { background: var(--bg-subtle); border-color: var(--text-hint); }
.soc-provider svg { flex: none; }

.soc { display: flex; flex-direction: column; gap: 16px; animation: otp-in .2s ease-out; }
.soc--center { align-items: center; text-align: center; }
.soc-text { margin: 0; font-size: 14px; line-height: 18px; color: var(--text-secondary); }
.soc-text b { color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.soc-note { margin: -4px 0 0; font-size: 12px; line-height: 16px; color: var(--text-hint); text-align: center; }
.soc-logo { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; border-radius: 50%; background: var(--bg-subtle); }
.soc-logo svg { width: 28px; height: 28px; }
.soc-account {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px;
  border: 1px solid var(--border-default); border-radius: 10px; background: #fff;
  font: inherit; text-align: left; color: var(--text-primary);
  transition: border-color .15s, background .15s;
}
.soc-account:hover:not(:disabled) { border-color: var(--text-primary); }
.soc-account:disabled { cursor: progress; background: var(--bg-subtle); }
.soc-avatar { display: flex; align-items: center; justify-content: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; font-weight: 600; font-size: 15px; }
.soc-account__info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.soc-account__info b { font-size: 15px; line-height: 20px; font-weight: 600; }
.soc-account__info span { font-size: 13px; line-height: 16px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soc-account__logo { display: flex; flex: none; }
.soc-field { display: flex; flex-direction: column; }
.soc-field .auth-input, .soc-field .a3-input { margin-top: 8px; }
.soc-field--error .auth-input, .soc-field--error .a3-input { border-color: var(--error); }
.soc-code { letter-spacing: 4px; }
.soc-code::placeholder { letter-spacing: 0; }
.soc-phone { margin: 0; font-size: 22px; line-height: 28px; font-weight: 700; letter-spacing: .3px; }
.soc-actions { display: flex; flex-direction: column; gap: 8px; width: 100%; }
.soc-btn { margin-top: 0; }
.auth-modal .soc-btn { margin-top: 0; }
.soc-outline { width: 100%; height: 40px; margin: 0; font-size: 14px; }
.soc-back { align-self: center; border: 0; background: none; padding: 4px; font: inherit; font-size: 14px; line-height: 18px; color: var(--text-secondary); }
.soc-back:hover { color: var(--text-primary); text-decoration: underline; }
.auth-modal > .soc-back { display: block; margin: 12px auto 0; }
.a3-card > .soc-back { margin-top: -20px; }
.a3-card--soc { gap: 20px; }
.auth-modal .soc-outline { height: 48px; font-size: 16px; }
.auth-modal--soc .soc { padding-bottom: 8px; }

.soc-warning { margin: -4px 0 0; padding: 8px 12px; border-radius: var(--radius-md); background: #fff4e5; color: #8a4b00; font-size: 13px; line-height: 16px; }
.demo__seg button { font-size: 12px; line-height: 15px; }
.demo__toggle { white-space: nowrap; }

/* Флоу 3: картка входу в стилі модалки (заголовок + текст → поле → кнопки) */
.a3-card { display: block; padding: 24px 16px; border-radius: 16px; }
.a3-card__title { font-size: 20px; line-height: 26px; font-weight: 600; text-align: left; }
.a3-card__text { margin: 0; padding-top: 12px; font-size: 16px; line-height: 22px; text-align: left; color: var(--text-primary); }
.a3-card__text b { font-weight: 600; }
.a3-field { padding-top: 24px; }
.a3-field__label { font-size: 16px; line-height: 20px; }
.a3-input { height: 48px; margin-top: 12px; font-size: 16px; line-height: 24px; }
.a3-btn { height: 48px; margin-top: 24px; font-size: 16px; line-height: 24px; }
.a3-card__hint { margin: 12px 0 0; font-size: 14px; line-height: 18px; }
.a3-card__demo { margin: 0; padding-top: 12px; }
.a3-card .soc-divider { margin: 20px 0 16px; }
.a3-card > .soc-back { display: block; margin: 12px auto 0; }
.a3-card--soc .soc { margin-top: 24px; }
.a3-card .soc-provider { height: 48px; font-size: 16px; }
.a3-card .soc-outline { height: 48px; font-size: 16px; }
.a3-card .soc-text { font-size: 16px; line-height: 22px; color: var(--text-primary); }
.a3-card .soc--center .soc-text { color: var(--text-secondary); }
.a3-card--soc .soc-field .a3-input { margin-top: 12px; }
.a3-card--soc .a3-btn { margin-top: 0; }
.a3-card--user { display: flex; padding: 16px; }
.a3-card--error .a3-input { border-color: var(--error); }

/* ===================================================================== */
/* Флоу 4: головна eva.ua + попап входу (віджет із флоу 3) з хрестиком    */
/* ===================================================================== */
.gate { position: fixed; inset: 0; z-index: 80; background: #fff; }
.gate__bg { position: absolute; inset: 0; background: #fff url("assets/home-desktop.jpg") top center / 1440px auto no-repeat; }
.gate__overlay { position: absolute; z-index: 1; }
.gate__modal { position: relative; padding: 0; }
.gate__close { position: absolute; top: 22px; right: 16px; z-index: 1; }
.gate__close svg { width: 24px; height: 24px; }
.gate__modal .a3-card { border: 0; border-radius: inherit; }
.gate__modal .a3-card__title { padding-right: 40px; }
body.is-gate { overflow: hidden; }
@media (max-width: 767px) {
  .gate__bg { background-image: url("assets/home-mobile.jpg"); background-size: 100% auto; }
}
/* поки відкритий попап флоу 4 – перемикач демо вгорі, щоб не перекривати кнопки попапу */
body.is-gate .demo { top: 12px; bottom: auto !important; display: flex; flex-direction: column-reverse; }
body.is-gate .demo__card { margin: 8px 0 0; }
