/* =========================================================================
   ACCOUNT — кабінет покупця (2026-10-05)

   Підключається лише на page_type == 'account' (header.twig). Спирається на
   глобальні .button-* (form-components.css), .container (critical.css) і
   шрифти Tektur/Inter. Старий stylesheet/style.css на цих сторінках ще
   підключений, тому поля форм, списки й заголовки задані тут явно.
   ========================================================================= */

.account-page {
  padding: 40px 0 80px;
}
.account-page > .container {
  max-width: 1400px;
}

/* ---------- Каркас: бічне меню + вміст ---------- */
.account-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
.account-content {
  min-width: 0;
}

.account-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border-color);
}
.account-nav__item {
  border-bottom: 1px solid var(--border-color);
  list-style: none;
}
.account-nav__item a {
  display: block;
  padding: 16px 0;
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-color-black);
  text-decoration: none;
}
.account-nav__item.is-active a {
  font-weight: 600;
  padding-left: 16px;
  border-left: 3px solid var(--text-color-black);
}
.account-nav__item--logout a {
  color: #69737c;
}

/* ---------- Заголовок розділу ---------- */
.account-head {
  margin-bottom: 32px;
}
.account-head--row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.account-title {
  font-family: "Tektur", sans-serif;
  font-weight: 600;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.account-head__meta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.acc-muted {
  color: #69737c;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.acc-strong {
  font-weight: 600;
}
.acc-back {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #69737c;
  text-decoration: none;
}
.acc-back:before {
  content: "\2190";
  margin-right: 8px;
}

/* ---------- Повідомлення ---------- */
.acc-alert {
  padding: 14px 18px;
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid;
}
.acc-alert--ok {
  border-color: #b7dfc4;
  background: #f1faf4;
  color: #1d5c32;
}
.acc-alert--error {
  border-color: #f0c2c2;
  background: #fcf3f3;
  color: #8a1f1f;
}
.acc-alert--info {
  border-color: #d9d9d9;
  background: #f6f7f9;
  color: #15161a;
}

/* Неоплачене замовлення P24: текст і кнопка «Zapłać» — у тонах статусу pending. */
.acc-pay {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding: 16px 18px;
  margin: 0 0 24px;
  border: 1px solid #e9d28b;
  background: #fdf8e6;
}
.acc-pay__text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: #7a5a00;
}
.account-page .acc-pay__btn {
  flex: none;
  height: 48px;
  padding: 0 28px;
  white-space: nowrap;
}
@media (max-width: 575px) {
  .acc-pay {
    flex-direction: column;
    align-items: stretch;
  }
  .account-page .acc-pay__btn {
    width: 100%;
  }
}

/* ---------- Статус замовлення ---------- */
.acc-status {
  display: inline-block;
  padding: 5px 10px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid #d9d9d9;
  color: #15161a;
  background: #fff;
}
.acc-status--pending,
.acc-status--failed {
  border-color: #e9d28b;
  background: #fdf8e6;
  color: #7a5a00;
}
.acc-status--processing,
.acc-status--other {
  border-color: #d9d9d9;
  background: #f6f7f9;
}
.acc-status--shipped {
  border-color: #b9d4ee;
  background: #eef5fc;
  color: #184a7a;
}
.acc-status--delivered,
.acc-status--completed {
  border-color: #b7dfc4;
  background: #f1faf4;
  color: #1d5c32;
}
.acc-status--cancelled,
.acc-status--returned,
.acc-status--refund {
  border-color: #e4c3c3;
  background: #fcf3f3;
  color: #8a1f1f;
}

/* ---------- Секції й блоки ---------- */
.acc-section {
  margin-bottom: 40px;
}
.acc-section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 16px;
}
.acc-section__title,
.acc-box__title {
  font-family: "Tektur", sans-serif;
  font-weight: 500;
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.acc-empty {
  padding: 32px 24px;
  border: 1px dashed #d9d9d9;
  color: #69737c;
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}
.acc-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.acc-grid-2 .acc-box {
  margin-bottom: 0;
}
.acc-box {
  padding: 24px;
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
}
.acc-box__line {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.5;
}
.acc-box__sub {
  margin: 16px 0 4px;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #69737c;
}
.acc-box--danger {
  border-color: #e4c3c3;
  margin-top: 40px;
}
.acc-box--password {
  margin-top: 40px;
}
.acc-intro {
  font-size: 15px;
  margin: 0 0 24px;
}

/* ---------- Рядок замовлення (дашборд і список) ---------- */
.acc-orders {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.acc-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "main status total";
  align-items: center;
  gap: 16px 24px;
  padding: 18px 20px;
  border: 1px solid var(--border-color);
  color: var(--text-color-black);
  text-decoration: none;
  transition: border-color 0.2s;
}
.acc-order--thumbs {
  grid-template-columns: auto minmax(0, 1fr) auto auto 16px;
  grid-template-areas: "thumbs main status total arrow";
}
.acc-order:hover {
  border-color: var(--text-color-black);
}
.acc-order__main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.acc-order .acc-status {
  grid-area: status;
}
.acc-order__no {
  font-weight: 600;
  font-size: 16px;
}
.acc-order__total {
  grid-area: total;
  font-weight: 600;
  font-size: 16px;
  white-space: nowrap;
}
.acc-order__thumbs {
  grid-area: thumbs;
  display: flex;
  align-items: center;
  gap: 6px;
}
.acc-order__thumbs img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: #f6f7f9;
}
.acc-order__more {
  font-size: 12px;
  color: #69737c;
}
.acc-order__arrow {
  grid-area: arrow;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-top: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.5;
}

/* ---------- Плитки розділів ---------- */
.acc-tiles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.acc-tile {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  border: 1px solid var(--border-color);
  color: var(--text-color-black);
  text-decoration: none;
  transition: border-color 0.2s;
}
.acc-tile:hover {
  border-color: var(--text-color-black);
}
.acc-tile__title {
  font-family: "Tektur", sans-serif;
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.acc-tile__desc {
  font-size: 14px;
  color: #69737c;
  line-height: 1.5;
}

/* ---------- Товари в замовленні ---------- */
.acc-product {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
}
.acc-product:first-child {
  border-top: 0;
  padding-top: 0;
}
.acc-product__img img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  background: #f6f7f9;
  display: block;
}
.acc-product__name {
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text-color-black);
  text-decoration: none;
  display: inline-block;
  margin-bottom: 4px;
}
.acc-product__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 13px;
  color: #69737c;
  margin-bottom: 6px;
}
.acc-product__qty {
  font-size: 14px;
  margin-bottom: 6px;
}
.acc-product__total {
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}
.acc-totals {
  width: 100%;
  max-width: 360px;
  margin: 16px 0 0 auto;
  border-collapse: collapse;
}
.acc-totals td {
  padding: 6px 0;
  font-size: 14px;
  border: 0;
  background: none;
}
.acc-totals td:last-child {
  text-align: right;
  white-space: nowrap;
}
.acc-totals__row--total td {
  font-weight: 600;
  font-size: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* ---------- Адреси ---------- */
.acc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.acc-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid var(--border-color);
}
.acc-card__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.acc-card__type {
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #69737c;
}
.acc-badge {
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 3px 8px;
  background: var(--text-color-black);
  color: #fff;
}
.acc-card__body p {
  margin: 0 0 2px;
  font-size: 15px;
  line-height: 1.5;
}
.acc-card__body p:first-child {
  font-weight: 600;
}
.acc-card__actions {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: auto;
  padding-top: 8px;
}
.acc-inline-form {
  display: inline;
  margin: 0;
}

/* ---------- Форми ---------- */
.acc-form {
  margin: 0;
}
/* Поля іншого типу адреси ховаються атрибутом hidden; .acc-form-grid задає
   display: grid і без цього правила його перебиває. */
.acc-form [data-type-group][hidden] {
  display: none !important;
}
.acc-form--narrow {
  max-width: 640px;
}
.acc-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px 24px;
  margin-bottom: 20px;
}
.acc-field {
  margin-bottom: 20px;
  min-width: 0;
}
.acc-form-grid .acc-field {
  margin-bottom: 0;
}
.acc-field--wide {
  grid-column: 1 / -1;
}
.acc-field > label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.acc-field input[type="text"],
.acc-field input[type="email"],
.acc-field input[type="tel"],
.acc-field input[type="password"],
.acc-field select,
.acc-field textarea {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  border: 1px solid #d9d9d9;
  border-radius: 0;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--text-color-black);
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}
.acc-field input:focus {
  outline: none;
  border-color: var(--text-color-black);
}
.acc-field input.is-readonly {
  background: #f6f7f9;
  color: #69737c;
}
/* Дата народження — три селекти в ряд; стрілку знято appearance: none вище. */
.acc-birthday {
  display: grid;
  grid-template-columns: 1fr 2fr 1.4fr;
  gap: 12px;
}
.acc-birthday select {
  padding-right: 36px;
  background: #fff url("../img/icons/caret-down-black.svg") no-repeat right 14px center / 12px;
  cursor: pointer;
}
.acc-field select:focus {
  outline: none;
  border-color: var(--text-color-black);
}
.acc-field__hint {
  margin-top: 8px;
  font-size: 13px;
  line-height: 1.5;
  color: #69737c;
}
.acc-field__hint.is-ok {
  color: #1d5c32;
}
.acc-field__hint.is-error {
  color: #8a1f1f;
}
.acc-field__error {
  margin-top: 8px;
  font-size: 13px;
  color: #8a1f1f;
}
.acc-upper {
  text-transform: uppercase;
}
.acc-inpost {
  display: flex;
  gap: 12px;
}
.acc-inpost input[type="text"] {
  flex: 1;
  min-width: 0;
}
.account-page .acc-inpost__map {
  flex: none;
  height: 56px;
  padding: 0 24px;
  font-size: 14px;
  white-space: nowrap;
}

/* Мапа пачкоматів: геовіджет — iframe, без явної висоти схлопується в нуль. */
.inpost-map-popup {
  max-width: 900px;
  padding: 16px;
}
.inpost-map-popup .popup-title {
  font-size: 20px;
  margin-bottom: 16px;
}
.inpost-map-holder {
  height: 70vh;
  min-height: 420px;
}
.inpost-map-holder inpost-geowidget,
.inpost-map-holder iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.inpost-map-holder .inpost-map-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  height: 100%;
  padding: 0 24px;
  font-size: 14px;
  line-height: 20px;
  color: #69737c;
}
.inpost-map-holder .inpost-map-status[hidden] {
  display: none;
}
.inpost-map-holder .inpost-map-status p {
  max-width: 420px;
  margin: 0;
  color: #15161a;
}
.acc-field input.acc-code {
  font-family: "Tektur", monospace;
  font-size: 28px;
  letter-spacing: 10px;
  text-align: center;
  height: 64px;
}
.acc-checkbox {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-size: 15px;
  margin: 4px 0 24px;
}
.acc-checkbox input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: #15161a;
}
.acc-form__actions {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin: 8px 0 0;
}
.acc-tabs {
  display: flex;
  border: 1px solid #15161a;
}
.acc-tab {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 8px;
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #69737c;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
}
.acc-tab input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.acc-tab.is-active {
  background: #15161a;
  color: #fff;
}

/* ---------- Кнопки й посилання ---------- */
.account-page .acc-btn {
  height: 56px;
  font-size: 14px;
}
.acc-btn--block {
  width: 100%;
}
.account-page .acc-btn--danger {
  background: #8a1f1f;
  border-color: #8a1f1f;
}
.acc-link {
  background: none;
  border: 0;
  padding: 0 0 2px;
  margin: 0;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--text-color-black);
  border-bottom: 1px solid currentColor;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.3;
}
.acc-link--sm {
  font-size: 12px;
}
.acc-link--danger {
  color: #8a1f1f;
}
.acc-track {
  margin-bottom: 24px;
}

/* ---------- Вхід ---------- */
.account-login__card {
  max-width: 520px;
  margin: 0 auto;
  padding: 40px;
  border: 1px solid var(--border-color);
}
.account-login__title {
  font-family: "Tektur", sans-serif;
  font-weight: 600;
  font-size: 28px;
  line-height: 36px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.account-login__intro {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 24px;
}
.account-login__hint {
  font-size: 13px;
  line-height: 1.6;
  color: #69737c;
  margin: 20px 0 0;
}
.account-login__actions {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.account-login__actions form {
  margin: 0;
}
.account-login__row {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 20px;
}
.account-login__alt {
  margin-top: 24px;
  text-align: center;
}
.account-login__hint a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- Пароль і Google ---------- */
.acc-password {
  position: relative;
}
.acc-password input {
  padding-right: 80px;
}
.acc-password__toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  padding: 4px;
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #69737c;
  cursor: pointer;
}
.acc-password__toggle:hover {
  color: var(--text-color-black);
}
.acc-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 56px;
  border: 1px solid #15161a;
  background: #fff;
  color: #15161a;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.3s;
}
.acc-google:hover {
  background: #f3f3f3;
  color: #15161a;
}
.acc-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: #69737c;
  font-size: 13px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.acc-divider::before,
.acc-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}
.account-login .acc-checkbox {
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
}
.account-login .acc-checkbox input {
  flex: none;
  margin-top: 2px;
}
.account-login .acc-checkbox a {
  color: inherit;
  text-decoration: underline;
}

/* ---------- Пагінація (розмітка OpenCart) ---------- */
.acc-pagination {
  margin-top: 24px;
}
.acc-pagination .pagination {
  display: flex;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.acc-pagination .pagination li a,
.acc-pagination .pagination li span {
  display: inline-block;
  min-width: 40px;
  height: 40px;
  line-height: 38px;
  padding: 0 10px;
  text-align: center;
  border: 1px solid var(--border-color);
  color: var(--text-color-black);
  text-decoration: none;
  font-size: 14px;
}
.acc-pagination .pagination li.active span {
  background: var(--text-color-black);
  color: #fff;
  border-color: var(--text-color-black);
}

/* ---------- Адаптив ---------- */
@media (max-width: 1200px) {
  .account-layout {
    gap: 40px;
    grid-template-columns: 200px minmax(0, 1fr);
  }
}
@media (max-width: 991px) {
  .account-page {
    padding: 24px 0 56px;
  }
  .account-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .account-nav {
    position: relative;
    margin: 0 -24px;
    padding: 0 24px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
    mask-image: linear-gradient(to right, #000 85%, transparent);
  }
  .account-nav::-webkit-scrollbar {
    display: none;
  }
  .account-nav__list {
    display: flex;
    gap: 18px;
    padding-right: 40px;
    border-top: 0;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
  }
  .account-nav__item {
    border-bottom: 0;
  }
  .account-nav__item a {
    padding: 12px 0;
    font-size: 13px;
    letter-spacing: 0.5px;
  }
  .account-nav__item.is-active a {
    padding-left: 0;
    border-left: 0;
    border-bottom: 2px solid var(--text-color-black);
    margin-bottom: -1px;
  }
  .acc-tiles,
  .acc-grid-2,
  .acc-cards {
    grid-template-columns: 1fr;
  }
  .account-title {
    font-size: 24px;
    line-height: 32px;
  }
}
@media (max-width: 767px) {
  .acc-form-grid {
    grid-template-columns: 1fr;
  }
  .acc-birthday {
    grid-template-columns: minmax(96px, 1fr) 1.6fr minmax(88px, 1fr);
    gap: 8px;
  }
  .acc-birthday select {
    padding: 0 30px 0 12px;
    background-position: right 10px center;
  }
  .acc-order {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "main main"
      "status total";
    gap: 12px 16px;
    padding: 16px;
  }
  .acc-order--thumbs {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
      "thumbs main main"
      "status status total";
  }
  .acc-order__thumbs img {
    width: 44px;
    height: 44px;
  }
  .acc-order__thumbs img:not(:first-child),
  .acc-order__more,
  .acc-order__arrow {
    display: none;
  }
  .acc-order .acc-status {
    justify-self: start;
  }
  .acc-order__total {
    justify-self: end;
  }
  .acc-section__head {
    flex-wrap: wrap;
  }
  .acc-product {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .acc-product__img img {
    width: 64px;
    height: 64px;
  }
  .acc-product__total {
    grid-column: 2;
  }
  .acc-totals {
    max-width: none;
  }
  .account-login__card {
    padding: 24px 20px;
    border: 0;
  }
  .acc-tabs {
    flex-direction: column;
  }
  .acc-tab {
    flex: none;
    height: 44px;
  }
  .account-head--row .acc-btn {
    width: 100%;
  }
  .acc-inpost {
    flex-direction: column;
  }
  .acc-inpost input[type="text"] {
    flex: none;
  }
  .account-page .acc-inpost__map {
    width: 100%;
  }
  .inpost-map-popup {
    padding: 12px;
  }
  .inpost-map-popup .popup-title {
    font-size: 16px;
    margin-bottom: 12px;
  }
  /* На мобайлі віджет забирає верх під пошук і фільтри — вікно майже на весь екран. */
  .inpost-map-holder {
    height: calc(var(--vh, 1vh) * 100 - 96px);
    min-height: 320px;
  }
}
