/* /assets/css/account.css
 * Личный кабинет — в стиле сайта (как order_success.css: живой белый, мягкий зелёный, navy).
 * Принципы:
 *  - все стили строго внутри .acc (не конфликтуем с сайтом)
 *  - плоские карточки, аккуратные бордеры, тёплый фон
 *  - заметный notice под шапкой: sticky + плавное скрытие (.is-hide)
 *  - НОРМАЛЬНЫЙ КОНТРАСТ ok/err + крестик в правом верхнем углу, как на скрине
 */

.acc{
  padding: 14px 0 26px;
}

.acc .container{
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 12px;
}

/* Links */
.acc a{ color: inherit; text-decoration: none; }

/* =========================
   Header
   ========================= */
.acc-head{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 10px;
}

.acc-head__title{
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -.2px;
  font-weight: 950;
}

.acc-head__hello{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ui-muted);
}

.acc-head__right{
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

@media (max-width: 520px){
  .acc-head{
    flex-direction: column;
    align-items: stretch;
  }
  .acc-head__right{
    justify-content: flex-start;
  }
}

/* =========================
   Notice / Alerts (FIXED)
   Без искусственного отступа сверху
   ========================= */

.acc-alert{
  position: sticky;
  top: calc(var(--header-offset, 64px) + 16px);
  z-index: 40;
  width: 100%;
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 900;
}

/* иконка */
.acc-alert::before{
  content: "ℹ";
  position: absolute;
  left: 12px;
  top: 12px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
}

/* скрываем возможную старую иконку */
.acc-alert .acc-alert__icon{ display: none; }

.acc-alert__text{
  word-break: break-word;
}

/* крестик */
.acc-alert__close{
  position: absolute;
  right: 10px;
  top: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* OK */
.acc-alert--ok::before{
  content: "✓";
}

/* ERROR */
.acc-alert--err::before{
  content: "!";
}

/* анимация скрытия */
.acc-alert.is-hide{
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity .18s ease, transform .18s ease;
}


/* =========================
   Cards
   ========================= */
.acc-card{
  border-radius: var(--r2);
  overflow: hidden;
}

.acc-card--wide{ margin-top: 12px; }

.acc-card__head{
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  background: var(--ui-surface-muted);
}

.acc-card__title{
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 950;
  letter-spacing: -.1px;
}

.acc-card__subtitle{
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ui-muted);
}

.acc-card__body{ padding: 14px; }

/* =========================
   Quick grid (Быстрый доступ)
   - фикс “уехали вправо”: это обычно из-за min-width/переносов,
     поэтому делаем grid + min-width:0 для текста
   ========================= */
.acc-quick{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 860px){
  .acc-quick{ grid-template-columns: 1fr 1fr 1fr; }
}

.acc-quick__item{
  display: grid;
  grid-template-columns: 42px 1fr 18px;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--r);
  transition: transform .06s ease, border-color .12s ease, background-color .12s ease;
}

.acc-quick__item:hover{
  background: var(--ui-surface-muted);
}

.acc-quick__item:active{ transform: translateY(1px); }

.acc-quick__icon{
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.acc-quick__text{
  min-width: 0; /* важно, чтобы не “распирало” и не уезжало */
}

.acc-quick__title{
  font-size: 14px;
  font-weight: 950;
  line-height: 1.15;
}

.acc-quick__hint{
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--ui-muted);

  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.acc-quick__arrow{
  justify-self: end;
  font-size: 20px;
  color: var(--ui-muted);
}

/* CTA */
.acc-quick__item--cta:hover{
  border-color: rgba(37,72,168,.30);
  background: rgba(37,72,168,.10);
}

/* =========================
   Main grid
   ========================= */
.acc-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}

@media (min-width: 900px){
  .acc-grid{
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 16px;
  }
}

/* =========================
   Profile KV
   ========================= */
.acc-kv{ margin: 0; }

.acc-kv__row{
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--ui-border);
}
.acc-kv__row:last-child{ border-bottom: 0; }

.acc-kv dt{
  font-size: 12px;
  color: var(--ui-muted);
}
.acc-kv dd{
  margin: 0;
  font-size: 14px;
  color: var(--ui-text);
  word-break: break-word;
}

@media (max-width: 420px){
  .acc-kv__row{
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.acc-muted{
  font-size: 13px;
  color: var(--muted);
}

.acc-inlinehint{
  color: var(--ui-muted);
  font-size: 12px;
  margin-left: 6px;
  white-space: nowrap;
}
@media (max-width: 520px){
  .acc-inlinehint{
    display: block;
    margin-left: 0;
    margin-top: 6px;
    white-space: normal;
  }
}

/* =========================
   Actions (two buttons)
   ========================= */
.acc-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}
@media (max-width: 420px){
  .acc-actions{ grid-template-columns: 1fr; }
}

/* =========================
   Links list
   ========================= */
.acc-links{
  display: grid;
  gap: 8px;
}

.acc-links__item{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px;
  border-radius: var(--r);
  transition: transform .06s ease, border-color .12s ease, background-color .12s ease;
}

.acc-links__item:hover{
  background: var(--ui-surface-muted);
}

.acc-links__item:active{ transform: translateY(1px); }

.acc-links__label{
  font-size: 14px;
  font-weight: 900;
  color: var(--ui-text);
}

.acc-links__arrow{
  font-size: 20px;
  color: var(--ui-muted);
}

.acc-links__item--danger .acc-links__label{
  color: rgba(170,0,0,.90);
}

/* =========================
   Contact binding split
   ========================= */
.acc-split{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px){
  .acc-split{ grid-template-columns: 1fr 1fr; }
}

.acc-pane{
  border-radius: var(--r2);
  overflow: hidden;
}

.acc-pane__head{
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(23,27,24,.10);
  background: var(--ui-surface-muted);
}

.acc-pane__title{
  margin: 0;
  font-size: 14px;
  font-weight: 950;
  color: rgba(15,26,20,.90);
}

.acc-pane__current{
  margin-top: 6px;
  font-size: 12px;
  color: var(--ui-muted);
}

/* усиление строки "Текущий:" */
.acc-pane__current b,
.acc-currentval{
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 950;
}

/* верхняя строка в pane (если используешь acc-pane__top + acc-current*) */
.acc-pane__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.acc-current{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.acc-pane__body{ padding: 12px; }

.acc-field{ margin-top: 12px; }

.acc-label{
  display: block;
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 900;
  color: rgba(15,26,20,.86);
}

.acc-input{
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  outline: none;
  box-sizing: border-box;
}

.acc-input--small{ max-width: 220px; }

.acc-row{ margin-top: 10px; }

.acc-confirm{
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(23,27,24,.16);
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

/* Кнопки кабинета наследуются из ui-buttons.css. */

/* =========================
   Inner pages helpers
   ========================= */
.acc-subhead{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0 14px;
}

.acc-subhead__title{
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 950;
}

.acc-subhead__subtitle{
  margin-top: 8px;
  font-size: 13px;
  color: var(--ui-muted);
}

.acc-subhead__actions{ flex: 0 0 auto; }

@media (max-width: 520px){
  .acc-subhead{
    flex-direction: column;
    align-items: stretch;
  }
  .acc-subhead__actions{
    display: grid;
    gap: 10px;
  }
}

.acc-form{ max-width: 720px; }

.acc-form__grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 720px){
  .acc-form__grid{ grid-template-columns: 1fr 1fr; }
}

.acc-form__actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .acc-links__item,
  .acc-quick__item,
  .acc-alert,
  .acc-alert__close{
    transition: none !important;
  }
}