/* SEVD accounts, personalization and consent. Builds on sevd.css tokens. */

/* Header account icon */
.sevd-account-link { color: var(--sevd-bone); }
.sevd-account-link.is-in::after { content: ""; position: absolute; top: 9px; right: 9px; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 2px var(--sevd-ink); }

/* Generic bits */
.sevd-link { color: var(--sevd-bone); font: 600 14px/1 var(--sevd-font); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--sevd-line-2); }
.sevd-link:hover { color: #fff; text-decoration-color: var(--sevd-bone); }
.sevd-link-btn { padding: 0; border: 0; background: none; color: inherit; font: 700 14px/1.2 var(--sevd-font); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sevd-help { margin: 6px 0 0; color: var(--sevd-steel); font: 400 13px/1.5 var(--sevd-font); }
.sevd-help a { color: var(--sevd-bone); }
.sevd-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sevd-btn--danger { --b-bg: transparent; --b-fg: var(--sevd-red-text); --b-bd: rgba(241, 27, 37, .5); }
.sevd-btn--danger:hover { --b-bg: var(--sevd-red); --b-fg: #fff; --b-bd: var(--sevd-red); }

.sevd-notice { margin: 0 0 24px; padding: 14px 18px; border-radius: 12px; border: 1px solid var(--sevd-line-2); background: var(--sevd-ink-2); color: var(--sevd-bone); font: 500 14px/1.5 var(--sevd-font); }
.sevd-notice.is-ok { border-color: rgba(61, 220, 132, .35); background: rgba(61, 220, 132, .07); }
.sevd-notice.is-error { border-color: rgba(241, 27, 37, .45); background: rgba(241, 27, 37, .08); color: #ffd6d8; }
.sevd-notice.is-wait { border-color: rgba(255, 196, 61, .35); background: rgba(255, 196, 61, .06); }
.sevd-notice--row { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* Forms */
.sevd-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.sevd-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sevd-form__group { display: flex; flex-direction: column; gap: 18px; padding: 20px; border-radius: 14px; border: 1px dashed var(--sevd-line-2); }
.sevd-form__group-title { margin: 0; color: var(--sevd-bone); font: 700 15px/1.3 var(--sevd-font); }
.sevd-form__group-title span { color: var(--sevd-steel); font-weight: 500; }
.sevd-check { display: flex; align-items: flex-start; gap: 10px; color: var(--sevd-bone); font: 500 14px/1.45 var(--sevd-font); cursor: pointer; }
.sevd-check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--sevd-red); flex: none; }

/* Page frame */
.sevd-acct { display: flex; flex-direction: column; padding-top: 56px; min-height: 50vh; }
.sevd-acct__intro { max-width: 720px; margin-bottom: 36px; }
.sevd-acct__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.sevd-acct__title { margin: 0; color: var(--sevd-bone); font: 800 clamp(2.2rem, 4.6vw, 3.8rem)/0.98 var(--sevd-font); font-stretch: 125%; letter-spacing: -0.035em; }
.sevd-acct__sub { margin: 12px 0 0; color: var(--sevd-steel); font: 500 16px/1.55 var(--sevd-font); max-width: 62ch; }
.sevd-acct__h2 { margin: 0; color: var(--sevd-bone); font: 800 24px/1.1 var(--sevd-font); font-stretch: 112.5%; letter-spacing: -0.015em; }

.sevd-acct__tabs { display: flex; gap: 6px; margin-bottom: 36px; padding-bottom: 0; border-bottom: 1px solid var(--sevd-line); overflow-x: auto; scrollbar-width: none; }
.sevd-acct__tabs::-webkit-scrollbar { display: none; }
.sevd-acct__tab { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; color: var(--sevd-steel); font: 600 15px/1 var(--sevd-font); text-decoration: none; white-space: nowrap; }
.sevd-acct__tab:hover { color: var(--sevd-bone); }
.sevd-acct__tab.is-current { color: var(--sevd-bone); }
.sevd-acct__tab.is-current::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--sevd-red); }
.sevd-acct__count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sevd-surface-2); color: var(--sevd-bone); font: 700 11px/1 var(--sevd-font); }
.sevd-acct__section { margin-bottom: 56px; }
.sevd-acct__section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.sevd-acct__section-head .sevd-acct__sub { margin-top: 8px; }

/* Sign in / sign up */
.sevd-auth { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; align-items: start; }
.sevd-auth__card { display: flex; flex-direction: column; gap: 22px; padding: 32px; border-radius: 22px; background: var(--sevd-ink-2); border: 1px solid var(--sevd-line); }
.sevd-auth__title { margin: 0; color: var(--sevd-bone); font: 800 24px/1.1 var(--sevd-font); font-stretch: 112.5%; }
.sevd-auth__lost { border-top: 1px solid var(--sevd-line); padding-top: 18px; }
.sevd-auth__lost summary { color: var(--sevd-steel); font: 500 14px/1 var(--sevd-font); cursor: pointer; }
.sevd-auth__lost summary:hover { color: var(--sevd-bone); }
.sevd-auth__lost .sevd-form { margin-top: 16px; }

/* Overview */
.sevd-stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 56px; }
.sevd-kpi { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px; border-radius: 18px; background: var(--sevd-ink-2); border: 1px solid var(--sevd-line); text-decoration: none; transition: border-color .2s ease; }
a.sevd-kpi:hover { border-color: var(--sevd-line-2); }
.sevd-kpi__label { color: var(--sevd-steel); font: 500 13px/1 var(--sevd-font); }
.sevd-kpi strong { color: var(--sevd-bone); font: 800 32px/1 var(--sevd-font); font-stretch: 112.5%; letter-spacing: -0.02em; }

/* Orders */
.sevd-orders { display: flex; flex-direction: column; gap: 14px; }
.sevd-order { padding: 22px 24px; border-radius: 18px; background: var(--sevd-ink-2); border: 1px solid var(--sevd-line); }
.sevd-order__head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--sevd-line); }
.sevd-order__name { margin: 0; color: var(--sevd-bone); font: 700 16px/1.2 var(--sevd-font); }
.sevd-order__date { margin: 4px 0 0; color: var(--sevd-steel); font: 500 13px/1 var(--sevd-font); }
.sevd-order__total { color: var(--sevd-bone); font: 800 18px/1 var(--sevd-font); font-stretch: 112.5%; }
.sevd-order__items { margin: 0; padding: 12px 0; list-style: none; }
.sevd-order__items li { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; color: var(--sevd-bone); font: 500 14px/1.4 var(--sevd-font); }
.sevd-order__items li span:last-child { color: var(--sevd-steel); white-space: nowrap; }
.sevd-order__items a { color: var(--sevd-bone); text-decoration: none; }
.sevd-order__items a:hover { text-decoration: underline; text-underline-offset: 3px; }
.sevd-order__foot { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.sevd-order__foot:empty { display: none; }
.sevd-order__foot a, .sevd-order__foot span { color: var(--sevd-bone); font: 600 13px/1.4 var(--sevd-font); }
.sevd-order__foot a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--sevd-line-2); }
.sevd-status { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px; border-radius: 999px; font: 600 12px/1 var(--sevd-font); background: var(--sevd-surface-2); color: var(--sevd-bone); white-space: nowrap; }
.sevd-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.sevd-status.is-ok { color: #3ddc84; }
.sevd-status.is-wait { color: #ffc43d; }
.sevd-status.is-off { color: var(--sevd-steel); }

/* Panels (interests, privacy) */
.sevd-panels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.sevd-panel { padding: 28px; border-radius: 20px; background: var(--sevd-ink-2); border: 1px solid var(--sevd-line); max-width: 760px; }
.sevd-panel .sevd-btn { align-self: flex-start; }
.sevd-panel--danger { border-color: rgba(241, 27, 37, .3); }

/* Watch button */
.sevd-watch {
  display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; height: 40px; padding: 0 16px 0 12px; border-radius: 999px;
  border: 1px solid var(--sevd-line-2); background: transparent; color: var(--sevd-bone); font: 600 14px/1 var(--sevd-font); text-decoration: none; cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.sevd-watch:hover { border-color: var(--sevd-bone); color: var(--sevd-bone); }
.sevd-watch .sevd-i { width: 18px; height: 18px; transition: transform .2s ease; }
.sevd-watch.is-on { border-color: rgba(241, 27, 37, .5); background: rgba(241, 27, 37, .1); }
.sevd-watch.is-on .sevd-i { fill: var(--sevd-red); stroke: var(--sevd-red); }
.sevd-watch:active .sevd-i { transform: scale(.85); }
.sevd-watch:disabled { opacity: .6; }
.sevd-watch-row { margin-top: 12px; }

/* Homepage "Picked for you" */
.sevd-foryou { margin: 0 0 112px; }
.sevd-foryou__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.sevd-foryou__title { margin: 0; color: var(--sevd-bone); font: 800 clamp(2rem, 3.6vw, 3.1rem)/1 var(--sevd-font); font-stretch: 118%; letter-spacing: -0.03em; }
.sevd-foryou__sub { margin: 10px 0 0; color: var(--sevd-steel); font: 500 16px/1.5 var(--sevd-font); }
.sevd-foryou__more { flex: none; display: inline-flex; align-items: center; height: 42px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--sevd-line-2); color: var(--sevd-bone); font: 600 14px/1 var(--sevd-font); text-decoration: none; }
.sevd-foryou__more:hover { border-color: var(--sevd-bone); color: var(--sevd-bone); }

/* Cart drawer suggestions */
.sevd-cart-recs { padding: 16px 24px; border-top: 1px solid var(--sevd-line); }
.sevd-cart-recs[hidden] { display: none; }
.sevd-cart-recs__title { margin: 0 0 8px; color: var(--sevd-steel); font: 600 13px/1 var(--sevd-font); }
.sevd-cart-rec { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 0; text-decoration: none; }
.sevd-cart-rec .sevd-line__img { width: 44px; }
.sevd-cart-rec__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sevd-cart-rec__title { color: var(--sevd-bone); font: 600 13px/1.3 var(--sevd-font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sevd-cart-rec:hover .sevd-cart-rec__title { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* Cookie notice */
.sevd-consent {
  position: fixed; left: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 2147482000; display: flex; flex-direction: column; gap: 14px;
  max-width: 420px; padding: 20px; border-radius: 16px; background: var(--sevd-surface); border: 1px solid var(--sevd-line-2); box-shadow: 0 30px 60px -25px rgba(0,0,0,.9);
  transform: translateY(20px); opacity: 0; transition: transform .3s var(--sevd-ease), opacity .3s ease;
}
.sevd-consent.is-on { transform: none; opacity: 1; }
.sevd-consent[hidden] { display: none; }
.sevd-consent p { margin: 0; color: var(--sevd-bone); font: 500 14px/1.5 var(--sevd-font); }
.sevd-consent a { color: var(--sevd-bone); text-decoration: underline; text-underline-offset: 3px; }
.sevd-consent__actions { display: flex; gap: 8px; justify-content: flex-end; }

@media (max-width: 1023px) {
  .sevd-auth { grid-template-columns: minmax(0, 1fr); }
  .sevd-panels { grid-template-columns: minmax(0, 1fr); }
  .sevd-foryou { margin-bottom: 88px; }
}
@media (max-width: 767px) {
  .sevd-acct { padding-top: 32px; }
  .sevd-acct__head, .sevd-acct__section-head, .sevd-foryou__head { flex-direction: column; align-items: flex-start; }
  .sevd-auth__card, .sevd-panel { padding: 22px 18px; }
  .sevd-form__row { grid-template-columns: minmax(0, 1fr); }
  .sevd-stats-row { grid-template-columns: minmax(0, 1fr); margin-bottom: 40px; }
  .sevd-order { padding: 18px; }
  .sevd-order__head { grid-template-columns: minmax(0, 1fr) auto; }
  .sevd-order__total { grid-column: 2; grid-row: 1; }
  .sevd-status { grid-column: 1 / -1; justify-self: start; }
  .sevd-consent { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  .sevd-foryou { margin-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .sevd-consent, .sevd-watch .sevd-i { transition: none; }
}
