/* Кабинет и вход: стандартная разметка WooCommerce (таблица заказов, формы, кнопки, уведомления) в стиле макета
   (account.html, классы .acc-* из style.css). Форма входа — template-parts/sms-login.php, её стили в style.css. */

.acc-page .woocommerce { display: block; }
.acc-content { min-width: 0; }
/* Раздел кабинета появляется как панель в макете (account.html: .acc-panel.is-entering) — при каждом переходе по меню */
.acc-content,
.acc-login { animation: step-in .45s var(--ease); }
@media (prefers-reduced-motion: reduce) {
  .acc-content,
  .acc-login { animation-name: fade-in; }
}
@keyframes fade-in { from { opacity: 0; } }
.acc-content > .acc-title + .acc-title { display: none; } /* на обзоре заголовок выводит dashboard.php */

/* ===== Вход по SMS ===== */
.acc-login { max-width: 480px; margin: 32px auto 0; padding: 36px 32px; background: #fff; }
.acc-login .acc-title { margin: 0; }
.acc-login .sms-lead { margin: 10px 0 28px; }
.acc-login .acc-perks { margin-top: 28px; }

/* ===== Заказы: таблица WooCommerce карточкой ===== */
.acc-content .woocommerce-orders-table,
.acc-content .shop_table {
  width: 100%;
  margin-top: 20px;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}
.acc-content .shop_table th,
.acc-content .shop_table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--c-line); }
.acc-content .shop_table thead th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.acc-content .woocommerce-orders-table__cell-order-number a { font-weight: 700; }
.acc-content .woocommerce-button,
.acc-content .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  background: var(--c-ink);
  color: #fff;
  border: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
@media (hover: hover) and (pointer: fine) {
.acc-content .woocommerce-button:hover,
.acc-content .button:hover { background: #333; }
}
.acc-content .woocommerce-orders-table__cell-order-actions .button + .button { margin-left: 6px; }
.acc-content .woocommerce-pagination { display: flex; gap: 8px; margin-top: 16px; }

/* Заказ подробно */
.acc-content mark { background: none; font-weight: 700; color: var(--c-ink); }
.acc-content .woocommerce-order-details,
.acc-content .woocommerce-customer-details { margin-top: 24px; }
.acc-content .woocommerce-order-details__title,
.acc-content .woocommerce-column__title { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.acc-content address { padding: 16px; background: #fff; font-style: normal; line-height: 1.6; }

/* ===== Формы (личные данные, адреса) ===== */
.acc-content form .form-row,
.acc-content form .woocommerce-form-row { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.acc-content form label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: #444; }
.acc-content form .required { color: var(--c-red); text-decoration: none; border: 0; }
.acc-content form .input-text,
.acc-content form select {
  width: 100%;
  max-width: 520px;
  height: 50px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid #d9d7d2;
  border-radius: 0;
  font: inherit;
  font-size: 15px;
}
.acc-content form .input-text:focus { outline: 0; border-color: var(--c-ink); }
.acc-content form .input-text[readonly] { background: #f6f5f2; color: var(--c-muted); }
.acc-content form fieldset { margin: 24px 0 0; padding: 0; border: 0; }
.acc-content form legend { margin-bottom: 12px; font-size: 16px; font-weight: 700; }
.acc-content form em { display: block; font-size: 12px; font-style: normal; color: var(--c-muted); }
.acc-content form [type="submit"] { min-height: 50px; padding: 0 28px; }

/* ===== Уведомления ===== */
.acc-page .woocommerce-message,
.acc-page .woocommerce-error,
.acc-page .woocommerce-info {
  margin: 0 0 16px;
  padding: 14px 18px;
  list-style: none;
  background: #fff;
  border-left: 3px solid var(--c-ink);
  font-size: 14px;
}
.acc-page .woocommerce-error { border-color: var(--c-red); }
.acc-page .woocommerce-message .button,
.acc-page .woocommerce-info .button { float: right; min-height: 32px; margin-left: 12px; }

@media (max-width: 640px) {
  .acc-login { margin: 16px; padding: 24px 16px; }
  .acc-content .shop_table thead { display: none; }
  .acc-content .shop_table tr { display: block; padding: 12px 16px; border-bottom: 1px solid var(--c-line); }
  .acc-content .shop_table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .acc-content .shop_table td::before { content: attr(data-title); color: var(--c-muted); }
}

/* ===== Разделы кабинета в дизайне макета (inc/account.php) ===== */
.bonus-card__notice { position: relative; margin: 12px 0 0; font-size: 14px; line-height: 1.5; opacity: .85; }
.acc-dashboard-hooks:empty { display: none; }
.acc-last--empty .order__date { margin-top: 8px; }
.acc-empty { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 20px; }
.acc-empty p { margin: 0; }

/* Заказы: тип покупки, миниатюры-фото, трекер из трёх шагов (у сайта нет статуса «передан курьеру») */
.order__type { margin-left: 6px; padding: 2px 8px; background: #f2f1ee; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--c-muted); vertical-align: 2px; }
.order__thumbs img { display: block; width: 56px; height: 75px; object-fit: cover; background: #f2f1ee; }
.order__actions .btn { min-height: 44px; }
.tracker--3 { grid-template-columns: repeat(3, 1fr); }
.tracker--3::before, .tracker--3::after { left: 16.667%; right: 16.667%; }
.tracker--3::after { right: auto; width: calc(66.667% * var(--step) / 2); }
.acc-pages { display: flex; gap: 10px; margin-top: 16px; }

/* Бонусы: 4 уровня сайта (в макете было 3) */
.acc-bonus { max-width: 520px; margin-top: 24px; }
.tiers--4 { grid-template-columns: repeat(4, 1fr); }
.tier:nth-child(4) .tier__rate { color: #5b6f86; }
.tier__cond { line-height: 1.4; }

/* Вывод плагина (истекающий кешбэк, история, правила) — в карточках и таблице макета */
.acc-plugin { margin-top: 32px; }
.acc-plugin section { margin: 0 0 24px; padding: 0; background: none; border: 0; box-shadow: none; }
.acc-plugin h3 { margin: 0 0 12px; font-size: 18px; font-weight: 700; }
.acc-plugin .smash-loyalty-expiring__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.acc-plugin .smash-loyalty-expiring__item { display: flex; flex-direction: column; gap: 4px; padding: 16px 20px; background: #fff; border: 0; }
.acc-plugin .smash-loyalty-expiring__amount { font-size: 16px; font-weight: 700; }
.acc-plugin .smash-loyalty-expiring__date, .acc-plugin .smash-loyalty-expiring__pending-copy { display: block; font-size: 13px; font-weight: 400; color: var(--c-muted); }
.acc-plugin .smash-loyalty-operations__table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.acc-plugin .smash-loyalty-operations__table th,
.acc-plugin .smash-loyalty-operations__table td { padding: 14px 20px; border: 0; border-bottom: 1px solid var(--c-line); text-align: left; background: none; }
.acc-plugin .smash-loyalty-operations__table th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }
.acc-plugin .smash-loyalty-operations__table td:last-child, .acc-plugin .smash-loyalty-operations__table th:last-child { text-align: right; white-space: nowrap; }
.acc-plugin .smash-loyalty-operation--positive { color: #2f7a3f; font-weight: 700; }
.acc-plugin .smash-loyalty-operation--negative { color: var(--c-red); font-weight: 700; }
.acc-plugin .smash-loyalty-operation--pending { color: var(--c-muted); font-weight: 700; }
.acc-rules .smash-loyalty-info__intro { max-width: 720px; margin: 0 0 16px; font-size: 14px; line-height: 1.6; color: #555; }
.acc-rules .smash-loyalty-info__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.acc-rules .smash-loyalty-info__block { padding: 24px; background: #fff; border: 0; box-shadow: none; }
.acc-rules .smash-loyalty-info__title { margin: 0 0 12px; font-size: 16px; font-weight: 700; }
.acc-rules .smash-loyalty-info__list { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; color: #444; }

/* Личные данные: форма WooCommerce карточкой, поля в две колонки */
.acc-content .woocommerce-EditAccountForm { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; margin-top: 20px; padding: 24px; background: #fff; }
.acc-content .woocommerce-EditAccountForm > * { grid-column: 1 / -1; }
.acc-content .woocommerce-EditAccountForm > .form-row-first,
.acc-content .woocommerce-EditAccountForm > .form-row-last { grid-column: auto; }
.acc-content .woocommerce-EditAccountForm .clear { display: none; }
.acc-content .woocommerce-EditAccountForm .input-text { max-width: none; }
.acc-content .woocommerce-EditAccountForm fieldset { margin: 8px 0 16px; }
.acc-content .smash-account-form-section { margin: 16px 0 12px; padding-top: 20px; border-top: 1px solid var(--c-line); }
.acc-content .smash-account-form-section__title { margin: 0; font-size: 16px; font-weight: 700; }
.acc-content .smash-account-form-section__text { margin: 4px 0 0; font-size: 13px; color: var(--c-muted); }
.acc-content .woocommerce-EditAccountForm [type="submit"] { justify-self: start; min-width: 240px; }

@media (max-width: 900px) {
  .tiers--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .acc-content .woocommerce-EditAccountForm { grid-template-columns: 1fr; padding: 20px 16px; }
  .acc-content .woocommerce-EditAccountForm > .form-row-first,
  .acc-content .woocommerce-EditAccountForm > .form-row-last { grid-column: 1 / -1; }
  .acc-rules .smash-loyalty-info__grid { grid-template-columns: 1fr; }
  .acc-empty { flex-direction: column; align-items: flex-start; }
  .acc-plugin .smash-loyalty-operations__table th, .acc-plugin .smash-loyalty-operations__table td { padding: 12px; }
}
/* Плагин сайта повторяет заголовок раздела над формой — оставляем только пояснение */
.acc-content .smash-account-intro__title { display: none; }
.acc-content .smash-account-intro__text { margin: 8px 0 0; font-size: 14px; color: var(--c-muted); }

/* Бонусы ещё загружаются из 1С (inc/account.php: carrera_bonus_card, account.js) */
.bonus-card__skeleton { display: inline-block; width: 140px; max-width: 60%; height: .9em; border-radius: 4px; background: linear-gradient(90deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .28), rgba(255, 255, 255, .12)); background-size: 200% 100%; animation: bonus-skeleton 1.2s linear infinite; vertical-align: middle; }
@keyframes bonus-skeleton { to { background-position: -200% 0; } }
