/* css/checkout.css — стили экрана «checkout». Классы — с префиксом .checkout-… .
 * Файл наполняет таск своего экрана; палитра — только токены styles.css.
 * Зона тона — «тихо»: спокойные поверхности, один розовый акцент на действии. */

.checkout-screen { padding: 4px 14px 28px; }
.checkout-title { font-size: 22px; padding: 8px 2px 14px; }

/* ── шаг аккордеона ── */
.checkout-step {
  background: var(--surface);
  border-radius: var(--r-m);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}
.checkout-step-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checkout-step.locked .checkout-step-head { cursor: default; opacity: 0.45; }
.checkout-step-num {
  width: 28px; height: 28px; flex: none;
  border-radius: 50%;
  background: var(--bg); color: var(--muted);
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.checkout-step.open .checkout-step-num { background: var(--pink); color: #fff; }
.checkout-step.done .checkout-step-num { background: var(--green); color: #fff; }
.checkout-step-titles { min-width: 0; }
.checkout-step-titles h2 { font-size: 15px; }
.checkout-step-sum {
  color: var(--muted); font-size: 12.5px; font-weight: 600;
  margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.checkout-step-body { padding: 2px 16px 16px; }

/* ── поля ── */
.checkout-field { display: block; margin-bottom: 12px; }
.checkout-label {
  display: block;
  color: var(--muted); font-size: 12.5px; font-weight: 700;
  margin-bottom: 6px;
}
.checkout-input {
  width: 100%;
  border: 1.5px solid rgba(36, 26, 46, 0.12);
  border-radius: var(--r-s);
  background: var(--bg);
  padding: 12px 14px;
  font-size: 15px; color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.checkout-input:focus { border-color: var(--pink); background: var(--surface); }
.checkout-comment { resize: vertical; min-height: 52px; font-family: inherit; }

/* ── согласие ПДн ── */
.checkout-agree {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 14px 0 4px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.checkout-agree input { display: none; }
.checkout-cb {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px;
  border: 2px solid rgba(36, 26, 46, 0.2);
  background: var(--surface);
  position: relative;
  transition: background 0.15s, border-color 0.15s;
  margin-top: 1px;
}
.checkout-cb::after {
  content: '';
  position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.checkout-agree input:checked + .checkout-cb { background: var(--pink); border-color: var(--pink); }
.checkout-agree input:checked + .checkout-cb::after { transform: rotate(45deg) scale(1); }
.checkout-agree-text { font-size: 13px; line-height: 1.45; color: var(--text); }
.checkout-agree-text a { color: var(--cobalt); font-weight: 600; }

/* ── доставка: способы ── */
.checkout-ways { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.checkout-way {
  border: 1.5px solid rgba(36, 26, 46, 0.12);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.checkout-way.on { border-color: var(--pink); background: var(--pink-soft); color: var(--pink); }

/* ── оплата: карточки ── */
.checkout-pays { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.checkout-pay {
  border: 1.5px solid rgba(36, 26, 46, 0.12);
  border-radius: var(--r-m);
  background: var(--surface);
  padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 700; color: var(--text);
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.checkout-pay.on { border-color: var(--pink); background: var(--pink-soft); }
.checkout-pay-ico { font-size: 22px; }
.checkout-quiet {
  color: var(--muted); font-size: 12.5px; line-height: 1.5;
  margin-top: 12px;
}

/* ── ошибки и кнопка «Дальше» ── */
.checkout-error {
  display: none;
  color: var(--pink); font-size: 13px; font-weight: 600; line-height: 1.4;
  margin-top: 10px;
}
.checkout-error.show { display: block; }
.checkout-next {
  display: block; width: 100%;
  margin-top: 14px;
  background: var(--pink); color: #fff;
  font-weight: 800; font-size: 15px;
  padding: 14px; border-radius: var(--r-m);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.checkout-next:active { transform: scale(0.97); }

/* ── итог ── */
.checkout-items { display: flex; flex-direction: column; gap: 8px; }
.checkout-item {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 13.5px; line-height: 1.4;
}
.checkout-item span { color: var(--text); font-weight: 600; }
.checkout-item b { white-space: nowrap; font-weight: 800; }
.checkout-total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px dashed rgba(36, 26, 46, 0.12);
  margin-top: 12px; padding-top: 12px;
  font-size: 15px; font-weight: 800;
}
.checkout-total b { font-size: 19px; color: var(--pink); }
.checkout-send {
  display: block; width: 100%;
  margin-top: 14px;
  background: var(--orange); color: #fff;
  font-weight: 800; font-size: 16px;
  padding: 16px; border-radius: var(--r-m);
  box-shadow: 0 8px 24px rgba(255, 122, 61, 0.35);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s;
}
.checkout-send:active { transform: scale(0.97); }
.checkout-send:disabled { opacity: 0.6; }

/* ── экран «Заказ собран» ── */
.checkout-done {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 48px 10px 24px;
}
.checkout-done-emoji { font-size: 46px; }
.checkout-done h1 { font-size: 22px; margin: 14px 0 10px; }
.checkout-done-num {
  background: var(--pink-soft); color: var(--pink);
  font-size: 15px; font-weight: 800;
  padding: 8px 18px; border-radius: 999px;
  letter-spacing: 0.04em;
}
.checkout-done p {
  color: var(--muted); font-size: 14px; line-height: 1.6;
  max-width: 320px; margin: 14px 0 22px;
}
.checkout-tg {
  display: block; width: 100%; max-width: 340px;
  background: var(--cobalt); color: #fff;
  font-weight: 800; font-size: 15px;
  padding: 15px; border-radius: var(--r-m);
  box-shadow: 0 8px 24px rgba(61, 91, 255, 0.3);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.checkout-tg:active { transform: scale(0.97); }
.checkout-copy {
  display: block; width: 100%; max-width: 340px;
  margin-top: 10px;
  background: var(--surface); color: var(--text);
  font-weight: 800; font-size: 15px;
  padding: 15px; border-radius: var(--r-m);
  box-shadow: var(--shadow);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.checkout-copy:active { transform: scale(0.97); }
.checkout-profile-link {
  margin-top: 16px;
  color: var(--muted); font-size: 13px; font-weight: 700;
  text-decoration: underline; text-underline-offset: 3px;
}

/* ── заглушка «нечего оформлять» ── */
.checkout-guard {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 64px 24px 40px; min-height: 55vh;
}
.checkout-guard-emoji { font-size: 44px; }
.checkout-guard h1 { font-size: 20px; margin: 16px 0 10px; }
.checkout-guard p { color: var(--muted); font-size: 14px; line-height: 1.6; max-width: 300px; }
.checkout-guard-btn {
  margin-top: 20px;
  background: var(--pink); color: #fff;
  font-weight: 800; font-size: 15px;
  padding: 13px 30px; border-radius: var(--r-m);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.checkout-guard-btn:active { transform: scale(0.95); }
