/* ════════════════════════════════════════════════════════════════════════
   BobrCraft Account modals + empty states.
   Шарються токени з AuthModal (#392923 brand, #DDDDDD borders, Inter, 480px).
   ════════════════════════════════════════════════════════════════════════ */

:root {
  --otac-modal-w: 480px;
  --otac-modal-pad: 24px;
  --otac-modal-radius: 8px;
  --otac-backdrop: rgba(0, 0, 0, .2);
  --otac-border: #DDDDDD;
  --otac-text: #131314;
  --otac-text-muted: #7D7D7D;
  --otac-text-body: #606162;
  /* --otac-brand fallback на --otc-btn-primary (керовано з admin onetap_setting_template) */
  --otac-brand: var(--otc-btn-primary, #392923);
  --otac-brand-hover: var(--otc-btn-primary-hover, #4d382e);
  --otac-danger: #D32F2F;
  --otac-danger-hover: #B71C1C;
}

/* ══════════════════════════════════════════════════════════════════════
   Universal confirm modal (Delete address / payment / account, etc.)
   ══════════════════════════════════════════════════════════════════════ */
.otac-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10010;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--otac-backdrop);
  font-family: 'Inter', sans-serif;
  padding: 16px;
}
.otac-backdrop.is-open { display: flex; }
body.otac-open { overflow: hidden; }

.otac-modal {
  width: var(--otac-modal-w);
  max-width: 100%;
  background: #FFFFFF;
  border-radius: var(--otac-modal-radius);
  padding: var(--otac-modal-pad);
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-sizing: border-box;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
}
/* Birthday modal — per Figma 640×350 (wider than default 480). */
.otac-modal--bday {
  width: 640px;
  min-height: 350px;
}
@media (max-width: 700px) {
  .otac-modal--bday {
    width: 100%;
    min-height: auto;
  }
}

.otac-modal__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.otac-modal__top-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.otac-modal__title {
  flex: 1;
  margin: 0;
  font: 500 24px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
}
.otac-modal__close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--otac-text);
  transition: background .15s;
}
.otac-modal__close:hover { background: rgba(0, 0, 0, .06); }
.otac-modal__close svg { width: 24px; height: 24px; }
.otac-modal__subtitle {
  margin: 0;
  font: 400 16px/1.375 'Inter', sans-serif;
  color: var(--otac-text-muted);
}
.otac-modal__preview {
  padding: 12px;
  background: #fafafa;
  border-radius: 8px;
  font: 400 14px/1.43 'Inter', sans-serif;
  color: var(--otac-text-body);
}

/* Form fields shared with AuthModal */
.otac-field { display: flex; flex-direction: column; gap: 4px; }
.otac-field__label {
  /* line-height:1 щоб видимий gap між label-текстом і input був РІВНО 4px,
     а не 4 + прихований простір від міжстрочного інтервалу. */
  font: 500 16px/1 'Inter', sans-serif;
  color: var(--otac-text);
  margin: 0;
  padding: 0;
  text-transform: none;
  display: block;
}
.otac-field__input-wrap { position: relative; display: flex; align-items: center; }
.otac-field__input {
  width: 100%;
  height: 48px;
  padding: 12px;
  border: 1px solid var(--otac-border);
  border-radius: 8px;
  font: 400 16px/1.375 'Inter', sans-serif;
  color: var(--otac-text);
  background: #FFFFFF;
  outline: none;
  box-sizing: border-box;
}
.otac-field__input:focus { border-color: var(--otac-text); }
.otac-field__input--with-right { padding-right: 44px; }
.otac-field__right-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--otac-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.otac-field__right-btn svg { width: 24px; height: 24px; }
.otac-field--err .otac-field__input { border-color: var(--otac-danger); }
.otac-field__helper {
  font: 400 12px/1.4 'Inter', sans-serif;
  color: var(--otac-text-muted);
  margin-top: 2px;
}
.otac-field__helper--err { color: var(--otac-danger); }

.otac-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* DOB date-row — 3 selects (day / month / year) */
.otac-dob-row { display: grid; grid-template-columns: 1fr 1.6fr 1.2fr; gap: 8px; }
.otac-dob-row select { height: 48px; padding: 12px; border: 1px solid var(--otac-border); border-radius: 8px; background: #FFFFFF; font: 400 16px/1 'Inter', sans-serif; color: var(--otac-text); outline: none; }

/* Action buttons */
.otac-actions { display: flex; flex-direction: column; gap: 12px; }
.otac-actions--row { flex-direction: row; }
.otac-actions--row > * { flex: 1; }
.otac-btn {
  height: 48px;
  padding: 12px;
  border-radius: 10px;
  font: 500 16px/1.25 'Inter', sans-serif;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, color .15s;
}
.otac-btn--primary { background: var(--otac-brand);  color: #FFFFFF; }
.otac-btn--primary:hover { background: var(--otac-brand-hover); }
.otac-btn--outline { background: #FFFFFF; border-color: var(--otac-border); color: var(--otac-text); }
.otac-btn--outline:hover { border-color: #b5b5b5; background: #fafafa; }
.otac-btn--danger  { background: var(--otac-danger); color: #FFFFFF; }
.otac-btn--danger:hover { background: var(--otac-danger-hover); }
.otac-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ══════════════════════════════════════════════════════════════════════
   Empty state — universal partial reused across 6 screens
   (Favorites, Notification, Addresses, Payment, Promocodes, Loyalty empty)
   ══════════════════════════════════════════════════════════════════════ */
.otac-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 48px 24px;
  margin: 0 auto;
  max-width: 480px;
  font-family: 'Inter', sans-serif;
}
.otac-empty__icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F4F5;
  border-radius: 50%;
  color: var(--otac-text-muted);
  flex-shrink: 0;
}
.otac-empty__icon svg { width: 40px; height: 40px; }
.otac-empty__title {
  margin: 0;
  font: 600 20px/1.3 'Inter', sans-serif;
  color: var(--otac-text);
}
.otac-empty__sub {
  margin: 0;
  font: 400 14px/1.43 'Inter', sans-serif;
  color: var(--otac-text-muted);
  max-width: 380px;
}
.otac-empty__actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  flex-wrap: wrap;
  justify-content: center;
}
.otac-empty__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 12px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  font: 500 16px/1.25 'Inter', sans-serif;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s;
}
.otac-empty__cta--primary { background: var(--otac-brand); color: #FFFFFF; }
.otac-empty__cta--primary:hover { background: var(--otac-brand-hover); text-decoration: none; color: #FFFFFF; }
.otac-empty__cta--outline { background: #FFFFFF; border-color: var(--otac-border); color: var(--otac-text); }
.otac-empty__cta--outline:hover { border-color: #b5b5b5; background: #fafafa; text-decoration: none; color: var(--otac-text); }

@media (max-width: 575px) {
  .otac-empty { padding: 32px 16px; }
  .otac-empty__title { font-size: 18px; }
  .otac-backdrop { padding: 0; }
  .otac-modal {
    width: 100%;
    max-width: 100%;
    max-height: none;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    padding: 24px 16px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Delete-address confirm — Figma 1719-201849 (desktop) / 1719-201868 (mobile).
   Один рядок «Remove **{address}** from your delivery address?», хрестик угорі,
   кнопки по центру (Remove — червоний #EC2424).
   ══════════════════════════════════════════════════════════════════════ */
.otac-modal--confirm {
  width: 640px;
  gap: 40px;
  align-items: center;
}
.otac-modal--confirm .otac-modal__top { align-self: stretch; gap: 16px; }
.otac-modal--confirm .otac-modal__top-row--end { justify-content: flex-end; }
.otac-modal__message {
  margin: 0;
  align-self: stretch;
  /* Figma ts1/ts2 — реальний текст 16px Regular, адреса 16px SemiBold
     (base style 32px у ноді перекритий цими сегментами). */
  font: 400 16px/22px 'Inter', sans-serif;
  color: var(--otac-text);
  text-align: center;
}
.otac-modal__message strong { font-weight: 600; }
.otac-modal--confirm .otac-actions--row {
  flex: 0 0 auto;
  justify-content: center;
  gap: 24px;
}
.otac-modal--confirm .otac-actions--row > * { flex: 0 0 200px; width: 200px; }
.otac-modal--confirm .otac-btn--danger { background: #EC2424; }
.otac-modal--confirm .otac-btn--danger:hover { background: #d41f1f; }

@media (max-width: 575px) {
  /* Mobile — компактний шит (НЕ фул-скрін): padding 12, текст 16px,
     кнопки в рядок 44px/radius8. Іде після базового .otac-modal{height:100vh}. */
  .otac-modal--confirm {
    /* Плаваюча картка з бічними відступами (backdrop центрує). Базовий ≤575
       робить .otac-modal width:100%/фул-скрін — тут повертаємо відступи. */
    width: calc(100% - 32px);
    max-width: 400px;
    height: auto;
    max-height: calc(100vh - 32px);
    border-radius: 8px;
    padding: 12px;
    gap: 24px;
    align-items: stretch;
  }
  .otac-modal--confirm .otac-modal__top { gap: 12px; }
  .otac-modal--confirm .otac-modal__close { width: 32px; height: 32px; }
  .otac-modal--confirm .otac-modal__message { font-size: 16px; line-height: 22px; text-align: left; }
  .otac-modal--confirm .otac-actions--row { gap: 12px; }
  .otac-modal--confirm .otac-actions--row > * {
    flex: 1 1 0; width: auto; height: 44px; border-radius: 8px; font-size: 14px;
  }
}

/* ══════════════════════════════════════════════════════════════════════
   Toggle switches — Notification settings rows
   ══════════════════════════════════════════════════════════════════════ */
/* Notification settings — Figma 698:60400 + 699:62658 Toggle button WEB.
   Row layout: text label (16px Medium #131314) | toggle pill (50×24, green ON). */
.otac-notif {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 720px;
}
.otac-notif-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--otac-border);
  border-radius: 8px;
  background: #FFFFFF;
}
.otac-notif-group__title {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.375;
  color: var(--otac-text);
}
.otac-notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--otac-border);
}
.otac-notif-row:first-of-type { border-top: 0; padding-top: 0; }
.otac-notif-row--head { border-top: 0; }
.otac-notif-row__label {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.375;
  color: var(--otac-text);
}
.otac-notif-row__label--muted { color: var(--otac-text-muted); font-weight: 400; }
.otac-notif-row__channels {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

/* Toggle — Figma 699:62658 spec: 50×24 pill, green #0FA379 ON, white 20×20 thumb */
.otac-switch { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.otac-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.otac-switch__track {
  width: 50px;
  height: 24px;
  background: #DDDDDD;
  border-radius: 100px;
  position: relative;
  transition: background .2s ease;
  flex-shrink: 0;
}
.otac-switch__track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  transition: transform .2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .20);
}
.otac-switch input:checked + .otac-switch__track { background: #0FA379; }
.otac-switch input:checked + .otac-switch__track::after { transform: translateX(26px); }
.otac-switch__label {
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  color: var(--otac-text-muted);
  text-transform: uppercase;
  letter-spacing: .02em;
}

/* ══════════════════════════════════════════════════════════════════════
   Return wizard (3 steps + success terminal) — Figma return_request flow
   ══════════════════════════════════════════════════════════════════════ */
.otac-wizard { max-width: 720px; margin: 0 auto; font-family: 'Inter', sans-serif; }
.otac-wizard__header { display: flex; flex-direction: column; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--otac-border); }
.otac-wizard__title { margin: 0; font: 500 28px/1.2 'Inter', sans-serif; color: var(--otac-text); }
.otac-wizard__order-meta { font: 400 14px/1.43 'Inter', sans-serif; color: var(--otac-text-muted); }

/* Stepper bar — 3 chips with progress */
.otac-stepper { display: flex; align-items: center; gap: 4px; padding: 16px 0; }
.otac-stepper__step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}
.otac-stepper__circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2px solid var(--otac-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 600 14px/1 'Inter', sans-serif;
  color: var(--otac-text-muted);
  z-index: 1;
}
.otac-stepper__step.is-active .otac-stepper__circle  { background: var(--otac-brand); border-color: var(--otac-brand); color: #FFFFFF; }
.otac-stepper__step.is-done   .otac-stepper__circle  { background: var(--otac-brand); border-color: var(--otac-brand); color: #FFFFFF; }
.otac-stepper__label { font: 400 12px/1.3 'Inter', sans-serif; color: var(--otac-text-muted); text-align: center; }
.otac-stepper__step.is-active .otac-stepper__label,
.otac-stepper__step.is-done   .otac-stepper__label { color: var(--otac-text); font-weight: 500; }
.otac-stepper__step + .otac-stepper__step::before {
  content: '';
  position: absolute;
  left: -50%;
  right: 50%;
  top: 15px;
  height: 2px;
  background: var(--otac-border);
}
.otac-stepper__step.is-done + .otac-stepper__step::before { background: var(--otac-brand); }

/* Step content */
.otac-wizard__step { display: none; padding: 24px 0; }
.otac-wizard__step.is-active { display: block; }
.otac-wizard__step-title { margin: 0 0 16px; font: 600 20px/1.3 'Inter', sans-serif; color: var(--otac-text); }
.otac-wizard__step-sub   { margin: 0 0 24px; font: 400 14px/1.43 'Inter', sans-serif; color: var(--otac-text-muted); }

/* Items list (step 1) */
.otac-ret-items { display: flex; flex-direction: column; gap: 12px; }
.otac-ret-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--otac-border);
  border-radius: 12px;
  background: #FFFFFF;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.otac-ret-item:hover { border-color: #b5b5b5; }
.otac-ret-item.is-selected { border-color: var(--otac-brand); background: #fafafa; }
.otac-ret-item__check {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--otac-border);
  border-radius: 6px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.otac-ret-item.is-selected .otac-ret-item__check { background: var(--otac-brand); border-color: var(--otac-brand); }
.otac-ret-item.is-selected .otac-ret-item__check::after {
  content: ''; position: absolute; left: 7px; top: 3px;
  width: 6px; height: 12px; border: solid #FFFFFF;
  border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.otac-ret-item__img { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; background: #f0f0f0; flex-shrink: 0; }
.otac-ret-item__info { flex: 1; min-width: 0; }
.otac-ret-item__name { font: 500 14px/1.43 'Inter', sans-serif; color: var(--otac-text); margin-bottom: 4px; }
.otac-ret-item__meta { font: 400 12px/1.4 'Inter', sans-serif; color: var(--otac-text-muted); }
.otac-ret-item__price { font: 600 14px/1 'Inter', sans-serif; color: var(--otac-text); flex-shrink: 0; }

/* Select-all toggle row */
.otac-ret-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; }
.otac-ret-toolbar__count { font: 400 14px/1.43 'Inter', sans-serif; color: var(--otac-text-muted); }
.otac-ret-toolbar__sel-all { background: 0; border: 0; padding: 0; font: 500 14px/1.43 'Inter', sans-serif; color: var(--otac-brand); cursor: pointer; }
.otac-ret-toolbar__sel-all:hover { text-decoration: underline; }

/* Step 2 — per-item reason cards */
.otac-ret-reason-card {
  padding: 16px;
  border: 1px solid var(--otac-border);
  border-radius: 12px;
  background: #FFFFFF;
  margin-bottom: 16px;
}
.otac-ret-reason-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.otac-ret-reason-card__img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.otac-ret-reason-card__name { font: 500 14px/1.43 'Inter', sans-serif; color: var(--otac-text); flex: 1; }

/* Step 3 — refund summary */
.otac-ret-summary {
  padding: 16px;
  border: 1px solid var(--otac-border);
  border-radius: 12px;
  background: #fafafa;
  margin-bottom: 24px;
}
.otac-ret-summary__row { display: flex; justify-content: space-between; padding: 8px 0; font: 400 14px/1.43 'Inter', sans-serif; color: var(--otac-text); }
.otac-ret-summary__row + .otac-ret-summary__row { border-top: 1px solid var(--otac-border); }
.otac-ret-summary__row--total { font-weight: 600; }

/* Refund method radios */
.otac-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--otac-border);
  border-radius: 10px;
  background: #FFFFFF;
  cursor: pointer;
  margin-bottom: 8px;
}
.otac-radio-card.is-selected { border-color: var(--otac-brand); }
.otac-radio-card input[type="radio"] { margin: 0; accent-color: var(--otac-brand); }
.otac-radio-card__label { flex: 1; font: 500 14px/1.43 'Inter', sans-serif; color: var(--otac-text); }
.otac-radio-card__hint  { font: 400 12px/1.4 'Inter', sans-serif; color: var(--otac-text-muted); }
.otac-radio-card__bonus { font: 600 12px/1 'Inter', sans-serif; color: #16a085; }

/* Wizard footer (sticky bottom bar) */
.otac-wizard__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--otac-border);
  margin-top: 24px;
}
.otac-wizard__footer .otac-btn { flex: 1; max-width: 200px; }

/* Success terminal */
.otac-ret-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 48px 24px;
}
.otac-ret-success__icon {
  width: 80px; height: 80px;
  display: flex; align-items: center; justify-content: center;
  background: #E8F5E9; border-radius: 50%;
}
.otac-ret-success__icon svg { width: 40px; height: 40px; color: #2D7A3E; }
.otac-ret-success__title { margin: 0; font: 500 24px/1.21 'Inter', sans-serif; color: var(--otac-text); }
.otac-ret-success__sub   { margin: 0; font: 400 16px/1.375 'Inter', sans-serif; color: var(--otac-text-muted); max-width: 480px; }
.otac-ret-success__id    { font: 600 16px/1 'Inter', sans-serif; color: var(--otac-text); padding: 8px 16px; background: #f4f4f5; border-radius: 8px; }
.otac-ret-success__cta   { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

@media (max-width: 575px) {
  .otac-wizard__title { font-size: 22px; }
  .otac-stepper__circle { width: 28px; height: 28px; font-size: 12px; }
  .otac-stepper__label  { font-size: 10px; }
  .otac-wizard__footer { position: sticky; bottom: 0; background: #FFFFFF; padding: 12px 0; }
  .otac-wizard__footer .otac-btn { max-width: 100%; }
}

/* ══════════════════════════════════════════════════════════════════════
   Referral Program — Figma 1128:123471 1:1 (account dashboard)
   Sections: page title + 4 stat chips + Invite card + Friends list + How-it-works
   ══════════════════════════════════════════════════════════════════════ */
.otac-referral {
  display: flex; flex-direction: column; gap: 24px;
  font-family: 'Inter', sans-serif;
}

/* H1 — page title (24px Semibold) */
.otac-referral__title {
  margin: 0;
  font: 600 24px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
}

/* ─── 4 stat chips ─────────────────────────────────────────── */
.otac-referral__chips {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.otac-ref-chip {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 12px; min-height: 50px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 8px;
  box-sizing: border-box;
}
.otac-ref-chip__label {
  font: 400 16px/1.375 'Inter', sans-serif;
  color: #606162;
}
.otac-ref-chip__value {
  font: 600 18px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
}

/* ─── Invite card (white bordered) ─────────────────────────── */
.otac-ref-card {
  display: flex; flex-direction: column; gap: 24px;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 9px;
}
.otac-ref-card__header {
  display: flex; flex-direction: column; gap: 6px;
}
.otac-ref-card__title {
  margin: 0;
  font: 600 20px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
}
.otac-ref-card__sub {
  margin: 0;
  font: 400 16px/1.375 'Inter', sans-serif;
  color: #606162;
}

/* 2-col inputs row: referral link (LEFT) + email share (RIGHT) */
.otac-ref-card__inputs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  align-items: start;
}
.otac-ref-field {
  display: flex; flex-direction: column; gap: 4px;
}
.otac-ref-field__label {
  font: 500 16px/22px 'Inter', sans-serif;   /* Figma: 16px Medium / 22 */
  color: var(--otac-text);
  margin: 0; padding: 0;
  display: block;
}
.otac-ref-field__input {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 8px;
  height: 48px;                               /* Figma: 48 */
  box-sizing: border-box;
  transition: border-color .15s;
}
.otac-ref-field__value {
  flex: 1; min-width: 0;
  font: 400 16px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
  background: transparent;
  border: 0; outline: none; padding: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.otac-ref-field__copy {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 0; padding: 0;
  color: var(--otac-text);
  cursor: pointer;
  transition: color .15s;
}
.otac-ref-field__copy:hover { color: var(--otc-btn-primary, #392923); }
.otac-ref-field__copy.is-copied { color: #2D7A3E; }
.otac-ref-field__copy.is-copied::after {
  content: "✓"; position: absolute;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #FFFFFF;
  font-weight: 600;
}
.otac-ref-field__hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 400 14px/1.43 'Inter', sans-serif;
  color: #F79E02;
  margin-top: 6px;
}
.otac-ref-field__hint svg { flex-shrink: 0; }
.otac-ref-field__hint--ok { color: #0a8a52; }

/* Email-share variant: warning state — yellow border + helper text */
.otac-ref-field--email.is-error .otac-ref-field__input {
  border-color: #F79E02;
}
.otac-ref-card__send {
  align-self: flex-end;
  display: inline-flex; align-items: center; justify-content: center;
  height: 48px; padding: 12px 24px;
  background: var(--otc-btn-primary, #392923);
  color: var(--otc-btn-primary-text, #FFFFFF);
  border: 0; border-radius: 10px;
  font: 500 16px/1.25 'Inter', sans-serif;
  cursor: pointer;
  transition: background .15s;
  margin-top: 16px;
}
.otac-ref-card__send:hover {
  background: var(--otc-btn-primary-hover, #4D382E);
  color: #FFFFFF;
}

/* ─── Friends list ─────────────────────────────────────────── */
.otac-ref-friends {
  display: flex; flex-direction: column; gap: 16px;
  padding: 24px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 8px;
}
.otac-ref-friends__search {
  position: relative;
}
.otac-ref-friends__search-input {
  width: 100%;
  height: 46px;
  padding: 12px 44px 12px 12px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 8px;
  font: 400 16px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s;
}
.otac-ref-friends__search-input::placeholder { color: #7D7D7D; }
.otac-ref-friends__search-input:focus { border-color: var(--otc-btn-primary, #392923); }
.otac-ref-friends__search-icon {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px;
  color: #7D7D7D;
  pointer-events: none;
}
.otac-ref-friends__list {
  display: flex; flex-direction: column;
}
.otac-ref-friend-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--otac-border, #DDDDDD);
}
.otac-ref-friend-row:last-child { border-bottom: 0; }
.otac-ref-friend-row__main {
  display: flex; flex-direction: column; gap: 4px;
}
.otac-ref-friend-row__date {
  font: 400 14px/1.43 'Inter', sans-serif;
  color: #7D7D7D;
}
.otac-ref-friend-row__name {
  font: 400 16px/1.375 'Inter', sans-serif;
  color: var(--otac-text);
}
.otac-ref-friend-row__status {
  font: 600 16px/1.375 'Inter', sans-serif;
  flex-shrink: 0;
}
.otac-ref-friend-row__status--joined { color: #BCBCBC; }
.otac-ref-friend-row__status--rewarded { color: #577B28; }
.otac-ref-friend-row__status--pending { color: #BCBCBC; }

/* OC's default pagination: style to match Figma chip-style */
.otac-ref-pagination {
  display: flex; justify-content: flex-start; align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.otac-ref-pagination .pagination {
  display: flex; gap: 8px; margin: 0; padding: 0;
  list-style: none;
}
.otac-ref-pagination .pagination > li > a,
.otac-ref-pagination .pagination > li > span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; height: 40px; padding: 0 12px;
  background: #F7F7F7;
  border: 0;
  border-radius: 8px;
  font: 400 16px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
  text-decoration: none;
}
.otac-ref-pagination .pagination > .active > a,
.otac-ref-pagination .pagination > .active > span {
  background: #FFFFFF;
  border: 1px solid #7D7D7D;
}

/* ─── How it works (3 cards з ілюстраціями) ──────────────── */
.otac-ref-how {
  display: flex; flex-direction: column; gap: 24px;
}
.otac-ref-how__title {
  margin: 0;
  font: 600 20px/1.21 'Inter', sans-serif;
  color: var(--otac-text);
}
.otac-ref-how__cards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.otac-ref-how-card {
  position: relative;
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 120px 8px 12px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 16px;
  min-height: 116px;
  overflow: hidden;
}
.otac-ref-how-card__badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: #FFFFFF;
  border: 1px solid var(--otac-border, #DDDDDD);
  border-radius: 100px;
  color: var(--otac-text);
  font: 600 14px/1 'Inter', sans-serif;
  letter-spacing: 0;
}
.otac-ref-how-card__body {
  display: flex; flex-direction: column; gap: 4px;
}
.otac-ref-how-card__title {
  margin: 0;
  font: 500 14px/1.43 'Inter', sans-serif;
  color: var(--otac-text);
}
.otac-ref-how-card__sub {
  margin: 0;
  font: 400 14px/1.43 'Inter', sans-serif;
  color: #606162;
}
.otac-ref-how-card__img {
  position: absolute;
  right: 8px;
  top: 17px;
  width: 103px; height: 112px;
  object-fit: contain;
  pointer-events: none;
}
.otac-ref-how-card__img--lg {
  width: 133px; height: 145px;
  right: -10px; top: 6px;
}
.otac-ref-how-card__img--xl {
  width: 159px; height: 173px;
  right: -10px; top: -48px;
}

/* Per-step Figma dimensions — exact w/h match macet 1128:123339.
   Step 1 (megaphone): 120×100, нижче від badge
   Step 2 (phone hands): 130×120, центр по vertical
   Step 3 (sale tag): 90×120, виступає за нижній край (вгорі вирізаний "ремінь") */
.otac-ref-how-card__img--step1 {
  width: 120px; height: 100px;
  right: 0; top: 16px;
}
.otac-ref-how-card__img--step2 {
  width: 130px; height: 120px;
  right: -4px; top: 8px;
}
.otac-ref-how-card__img--step3 {
  width: 90px; height: 120px;
  right: 12px; top: -4px;
}

/* ══════════════════════════════════════════════════════════════════════
   Mobile responsive — OneTap breakpoints 1367/992/501/500
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1367px) {
  .otac-referral__chips { gap: 16px; }
  .otac-ref-card__inputs { gap: 24px; }
  .otac-ref-how__cards { gap: 16px; }
  .otac-ref-how-card { padding: 10px 100px 8px 12px; }
}
@media (max-width: 992px) {
  .otac-referral__title { font-size: 20px; }
  .otac-referral__chips { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .otac-ref-chip__label { font-size: 14px; }
  .otac-ref-chip__value { font-size: 16px; }
  .otac-ref-card { padding: 16px; gap: 16px; }
  .otac-ref-card__inputs { grid-template-columns: 1fr; gap: 16px; }
  .otac-ref-card__send { align-self: stretch; width: 100%; }
  .otac-ref-friends { padding: 16px; }
  .otac-ref-how__cards { grid-template-columns: 1fr; }
  /* How it works mobile padding handled by ≤500px block (per-step image rules
     positioned absolute right). Legacy `position: static` override removed —
     it broke the right-side image placement after numbered-badge refactor. */
}
@media (max-width: 501px) {
  .otac-referral__chips { grid-template-columns: 1fr; }
  .otac-ref-card__send { font-size: 14px; }
  .otac-ref-pagination .pagination > li > a,
  .otac-ref-pagination .pagination > li > span { min-width: 32px; height: 32px; padding: 0 8px; font-size: 14px; }
}

/* ══════════════════════════════════════════════════════════════════════
   Add pickup point modal — Leaflet/OSM map + manual entry + Nominatim search.
   Two-column layout: left = map + search, right = form fields. Mobile stacks.
   ══════════════════════════════════════════════════════════════════════ */
.otac-pp-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10020;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: 'Inter', sans-serif;
}
body.otac-pp-open { overflow: hidden; }

.otac-pp-modal {
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  background: #FFFFFF;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.otac-pp-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(255, 255, 255, .9);
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.otac-pp-modal__close:hover { background: rgba(0, 0, 0, .06); }
.otac-pp-modal__close svg { width: 20px; height: 20px; color: var(--otac-text); }
.otac-pp-modal__title {
  margin: 0;
  padding: 20px 60px 16px 24px;
  font: 600 20px/1.3 'Inter', sans-serif;
  color: var(--otac-text);
  border-bottom: 1px solid var(--otac-border);
}
.otac-pp-modal__body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  flex: 1;
  min-height: 0;
}
.otac-pp-modal__left,
.otac-pp-modal__right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px;
}
.otac-pp-modal__left { gap: 12px; padding-right: 8px; }
.otac-pp-modal__right { gap: 16px; overflow-y: auto; }

.otac-pp-modal__search-wrap { position: relative; }
.otac-pp-modal__search {
  width: 100%;
  height: 44px;
  padding: 12px;
  border: 1px solid var(--otac-border);
  border-radius: 8px;
  font: 400 14px/1.43 'Inter', sans-serif;
  outline: none;
  box-sizing: border-box;
}
.otac-pp-modal__search:focus { border-color: var(--otac-brand); }
.otac-pp-modal__results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 240px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid var(--otac-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
  z-index: 5;
  display: flex;
  flex-direction: column;
}
.otac-pp-modal__result {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  font: 400 13px/1.4 'Inter', sans-serif;
  color: var(--otac-text);
  border-bottom: 1px solid var(--otac-border);
}
.otac-pp-modal__result:hover { background: #fafafa; }
.otac-pp-modal__result:last-child { border-bottom: 0; }

.otac-pp-modal__map {
  flex: 1;
  min-height: 320px;
  border-radius: 10px;
  overflow: hidden;
  background: #f0f0f0;
}

.otac-pp-modal__form { display: flex; flex-direction: column; gap: 16px; }
.otac-pp-modal__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.otac-pp-modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px;
  border-top: 1px solid var(--otac-border);
}
.otac-pp-modal__footer .otac-btn { flex: 0 0 auto; min-width: 140px; }

@media (max-width: 768px) {
  .otac-pp-backdrop { padding: 0; }
  .otac-pp-modal { width: 100%; max-height: 100vh; max-height: 100dvh; height: 100%; border-radius: 0; }
  .otac-pp-modal__body { grid-template-columns: 1fr; overflow-y: auto; }
  .otac-pp-modal__map { min-height: 240px; }
  .otac-pp-modal__row { grid-template-columns: 1fr; }
  .otac-pp-modal__footer { padding: 12px 16px; }
  .otac-pp-modal__footer .otac-btn { flex: 1; min-width: 0; }
}

/* ══════════════════════════════════════════════════════════════════════
   Profile dashboard — tier card per-rank styling + order-card status chips.
   Compositional: existing `.acc-tier`, `.acc-order-card` shells live elsewhere
   (theme css); these tokens style only the variant chrome.
   ══════════════════════════════════════════════════════════════════════ */
.acc-tier--silver { background: linear-gradient(135deg, #E5E7EB 0%, #C4C9D1 100%); color: #1f2937; }
.acc-tier--silver .acc-tier__badge { background: transparent; color: #1f2937; }
.acc-tier--silver .acc-tier__progress-bar span { background: #4B5563; }

.acc-tier--gold { background: linear-gradient(135deg, #FBBF24 0%, #D97706 100%); color: #1f2937; }
.acc-tier--gold .acc-tier__badge { background: transparent; color: #fff; }
.acc-tier--gold .acc-tier__progress-bar span { background: #92400E; }

.acc-tier--platinum { background: linear-gradient(135deg, #C4B5FD 0%, #7C3AED 100%); color: #FFFFFF; }
.acc-tier--platinum .acc-tier__badge { background: transparent; color: #FFFFFF; }
.acc-tier--platinum .acc-tier__progress-bar span { background: #4C1D95; }

/* Order-card status — простий текст без фону (Figma): колір за станом. */
.acc-order-card__status {
  font: 400 14px/20px 'Inter', sans-serif;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--otac-status-green);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-transform: none;
  letter-spacing: 0;
}
.acc-order-card__status--delivered,
.acc-order-card__status--received   { background: none; color: var(--otac-status-green); }
.acc-order-card__status--shipped,
.acc-order-card__status--pending,
.acc-order-card__status--processing { background: none; color: var(--otac-status-orange); }
.acc-order-card__status--cancelled,
.acc-order-card__status--canceled   { background: none; color: var(--otac-status-muted); }

/* ══════════════════════════════════════════════════════════════════════
   Profile DOB pill (shown on dashboard when DOB not set)
   ══════════════════════════════════════════════════════════════════════ */
.otac-dob-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px dashed var(--otac-border);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--otac-text);
  cursor: pointer;
  font: 500 14px/1 'Inter', sans-serif;
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.otac-dob-pill:hover { border-color: var(--otac-brand); background: #fafafa; text-decoration: none; color: var(--otac-text); }
.otac-dob-pill--set { border-style: solid; }
.otac-dob-pill svg { width: 16px; height: 16px; }

/* ══════════════════════════════════════════════════════════════════════
   Birthday celebration popup — 1:1 з Figma 806:83919 (Desktop).
   Дiалог 640×auto, padding 24px, gap 40px. Hero banner 592×120
   (aspect 4.93:1). Balloons позиціоновані як абсолютні діти діалогу
   з негативними offset'ами що співпадають з Figma координатами.
   ══════════════════════════════════════════════════════════════════════ */
.acc-modal--bday .acc-modal__dialog {
  padding: 24px !important;
  max-width: 640px;
  width: 640px;
  border-radius: 8px;
  overflow: visible !important;       /* щоб кулі визирали за межі */
  position: relative;
  gap: 40px;
  display: flex;
  flex-direction: column;
}
.acc-bday-dialog { padding: 24px !important; }

/* Hero banner — Birthday banner component (1121:123126), 592×120. */
.acc-bday-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 592 / 120;
  background: var(--otc-btn-primary, #392923);
  overflow: hidden;
  border-radius: 8px;
  margin: 0;
}
.acc-bday-hero__img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Frame 2085661570 — column 12px gap (hero+title+subtitle stack). */
.acc-bday-head { padding: 0; flex-direction: column; gap: 12px; border-bottom: 0; }
.acc-bday-title {
  font: 500 32px/1.21 'Inter', sans-serif;
  color: #131314;
  text-align: center;
  margin: 0;
}

/* Body — 40px gap inherited from dialog flex column. */
.acc-bday-body {
  padding: 0 !important;
  gap: 40px;
  display: flex;
  flex-direction: column;
}
.acc-bday-lead {
  font: 400 16px/1.375 'Inter', sans-serif;
  color: #606162;
  text-align: center;
  margin: 0;
}

/* Promocode card — Figma 715:78130 (Desktop variant), 260px wide centered. */
.acc-bday-card {
  width: 260px;
  margin: 0 auto;
  border: 1px solid #DDDDDD;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
}
.acc-bday-card__top {
  padding: 8px 8px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.acc-bday-card__badge-img {
  width: 56px; height: 56px;
  display: block;
}
.acc-bday-card__discount {
  font: 500 16px/1.375 'Inter', sans-serif;
  color: #577B28;
  text-align: center;
}
.acc-bday-card__name {
  font: 400 12px/1.21 'Inter', sans-serif;
  color: #7D7D7D;
  text-align: center;
  padding: 4px 8px 8px;
  margin: 0;
}
.acc-bday-card__code-wrap {
  padding: 8px;
  display: flex; flex-direction: column; gap: 6px;
}
.acc-bday-card__code-row {
  background: #F7F7F7;
  border-radius: 8px;
  padding: 12px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.acc-bday-card__code {
  font: 500 12px/1.21 'Inter', 'JetBrains Mono', monospace;
  color: #131314;
  letter-spacing: 0.5px;
  background: transparent;
}
.acc-bday-card__copy {
  background: transparent; border: 0; padding: 0;
  color: #131314; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  transition: color .15s;
}
.acc-bday-card__copy:hover { color: #577B28; }
.acc-bday-card__valid {
  font: 400 12px/1.21 'Inter', sans-serif;
  color: #7D7D7D;
  text-align: center;
}

/* Buttons — Frame 2085661780: row, space-between, fill width. */
.acc-bday-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0;
}
.acc-bday-actions .acc-btn { min-height: 44px; padding: 12px; }
.acc-bday-actions .acc-btn--outline,
.acc-bday-actions .acc-btn--ghost { flex: 0 0 auto; }
.acc-bday-actions .acc-btn--primary,
.acc-bday-actions .acc-btn--dark  { width: 160px; }
.acc-bday-skip { text-decoration: none !important; }

/* ── Floating balloons (Figma координати, normalize до 640px дiалогу) ─
   Pink/Orange (large) = 200×340; Red/Green (medium) = 152×259.
   Position offsets вираховані з Figma node 806:83919:
     dialog X: 644-1284, Y: 129.5 → balloon coords relative to dialog origin. */
.acc-bday-balloon {
  position: absolute;
  pointer-events: none;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.10));
  z-index: 1;
}
.acc-bday-balloon--tl {  /* Pink (919:98574) — top-left, overlaps modal corner */
  width: 200px; height: 340px;
  top: -55px; left: -137px;
  animation: acc-bday-float 6s ease-in-out infinite;
}
.acc-bday-balloon--tr {  /* Orange (919:98585) — top-right */
  width: 200px; height: 340px;
  top: 144px; right: -148px;
  animation: acc-bday-float 7s ease-in-out infinite -1s;
}
.acc-bday-balloon--bl {  /* Red (939:97473) — bottom-left */
  width: 152px; height: 259px;
  top: 346px; left: -99px;
  animation: acc-bday-float 8s ease-in-out infinite -2s;
}
.acc-bday-balloon--br {  /* Green (939:97483) — bottom-right */
  width: 152px; height: 259px;
  top: 392px; right: -76px;
  animation: acc-bday-float 7.5s ease-in-out infinite -3s;
}
@keyframes acc-bday-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

/* Адаптив — пропорційне зменшення під ширину вьюпорту. */
@media (max-width: 1100px) {
  .acc-bday-balloon--tl,
  .acc-bday-balloon--tr { width: 150px; height: 255px; }
  .acc-bday-balloon--bl,
  .acc-bday-balloon--br { width: 114px; height: 195px; }
  .acc-bday-balloon--tl { left: -100px; }
  .acc-bday-balloon--tr { right: -110px; }
  .acc-bday-balloon--bl { left: -70px; }
  .acc-bday-balloon--br { right: -55px; }
}
@media (max-width: 768px) {
  .acc-modal--bday .acc-modal__dialog { width: calc(100vw - 32px); max-width: 460px; padding: 16px !important; gap: 24px; }
  .acc-bday-head { gap: 8px; }
  .acc-bday-title { font-size: 22px; }
  .acc-bday-lead { font-size: 14px; }
  .acc-bday-body { gap: 24px; }
  .acc-bday-balloon--tl,
  .acc-bday-balloon--tr { width: 90px; height: 153px; }
  .acc-bday-balloon--bl,
  .acc-bday-balloon--br { width: 70px; height: 119px; }
  .acc-bday-balloon--tl { top: -30px; left: -45px; }
  .acc-bday-balloon--tr { top: 80px; right: -45px; }
  .acc-bday-balloon--bl { top: 220px; left: -30px; }
  .acc-bday-balloon--br { top: 260px; right: -30px; }
}
@media (max-width: 500px) {
  .acc-modal--bday .acc-modal__dialog { width: calc(100vw - 16px); padding: 12px !important; }
  /* Balloons stay visible per Figma — small offsets handled in personal-acc.css */
  .acc-bday-actions { flex-direction: column-reverse; }
  .acc-bday-actions .acc-btn,
  .acc-bday-actions .acc-btn--primary,
  .acc-bday-actions .acc-btn--dark { width: 100%; }
}

/* ════════════════════════════════════════════════════════════════════
   Referral Program — mobile audit fixes (Figma 1128:123339)
   Tasks: stats 2×2 grid, inputs vertical stack, friends-row wrap,
   how-it-works vertical stack.
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Inputs row → vertical stack on tablet+ to avoid 2×40px gap squash */
  .otac-ref-card__inputs { grid-template-columns: 1fr; gap: 20px; }
  /* Stats 4→2 cols already roomy on tablet */
  .otac-referral__chips { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  /* How it works → 1 col on mobile so cards remain readable */
  .otac-ref-how__cards { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 500px) {
  /* Stats 2×2 with tighter typography so values + labels не overlap */
  .otac-referral__chips { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .otac-ref-chip { padding: 10px 12px; min-height: 56px; }
  .otac-ref-chip__label { font-size: 13px; line-height: 1.3; }
  .otac-ref-chip__value { font-size: 16px; }

  /* Invite card — reduce padding so 12px page gutter не overlapped */
  .otac-ref-card { padding: 16px; gap: 16px; }
  .otac-ref-card__title { font-size: 18px; }
  .otac-ref-card__sub { font-size: 14px; }

  /* Email-share: input + Send button stack vertically on phone (Task 1).
     `width: 100%` alone is not enough — the form is a grid item, so we must also
     enforce `min-width: 0` so the placeholder text doesn't blow the column width. */
  .otac-ref-card__inputs > * { min-width: 0; }
  .otac-ref-field--email {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .otac-ref-field--email .otac-ref-field__input { width: 100%; box-sizing: border-box; }
  .otac-ref-field--email .otac-ref-field__value { font-size: 14px; min-width: 0; }
  .otac-ref-card__send {
    align-self: stretch;
    width: 100%;
    max-width: 100%;
    height: 44px;
    margin-top: 4px;
    box-sizing: border-box;
  }

  /* Friends list — wrap rows so status badge не cropped (Task 4) */
  .otac-ref-friends { padding: 16px; }
  .otac-ref-friend-row {
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 10px 0;
  }
  .otac-ref-friend-row__main { flex: 1 1 100%; }
  .otac-ref-friend-row__date { font-size: 13px; }
  .otac-ref-friend-row__name { font-size: 14px; }
  .otac-ref-friend-row__status {
    flex: 0 0 auto;
    margin-left: auto;
    font-size: 14px;
  }

  /* How it works — 1 col vertical stack з більшим padding-right для image (Task 5).
     Per-step dimensions 1:1 з Figma macet (megaphone / phone / sale-tag). */
  .otac-ref-how__cards { grid-template-columns: 1fr; gap: 10px; }
  .otac-ref-how__title { font-size: 18px; }
  .otac-ref-how-card { padding: 12px 120px 12px 14px; min-height: 110px; }
  .otac-ref-how-card__img--step1 { width: 115px; height: 95px;  right: 0;   top: 12px; }
  .otac-ref-how-card__img--step2 { width: 120px; height: 120px; right: -4px; top: 0; }
  .otac-ref-how-card__img--step3 { width: 80px;  height: 120px; right: 16px; top: -4px; }
}
