/**
 * Plik: assets/css/pages/customer.css
 *
 * Odpowiada za:
 * - logowanie, rejestracja, odzyskiwanie hasła
 * - profil / moje konto i podstrony konta (klasa strony: .cercasa-customer)
 *
 * Nie umieszczać tutaj:
 * - logiki JS
 * - @import
 * - stylów .cercasa-account z headera (ikona konta — osobna klasa)
 *
 * Powiązane pliki:
 * - templates/customer/*
 * - assets/css/tokens.css
 */

body#authentication,
body#registration,
body#password,
body#my-account,
body#identity,
body#addresses,
body#address,
body#history,
body#order-detail,
body#order-follow,
body#order-return,
body#order-slip,
body#discount,
body#guest-tracking {
  --cercasa-cust-text: var(--cercasa-text, #1a1a1a);
  --cercasa-cust-muted: var(--cercasa-text-muted, #5a605b);
  --cercasa-cust-soft: var(--cercasa-text-soft, #8a908a);
  --cercasa-cust-line: var(--cercasa-line, #e4e8e3);
  --cercasa-cust-bg: var(--cercasa-bg, #fff);
  --cercasa-cust-bg-soft: var(--cercasa-bg-soft, #f5f5f5);
  --cercasa-cust-gutter: var(--cercasa-hero-gutter, clamp(1.25rem, 3vw, 3rem));
  font-family: var(--cercasa-font-sans, "Poppins", sans-serif);
  color: var(--cercasa-cust-text);
}

/* ——— Przyciski ——— */
body#authentication .btn-primary,
body#registration .btn-primary,
body#password .btn-primary,
body#my-account .btn-primary,
body#identity .btn-primary,
body#addresses .btn-primary,
body#address .btn-primary,
body#history .btn-primary,
body#order-detail .btn-primary,
body#order-follow .btn-primary,
body#order-return .btn-primary,
body#order-slip .btn-primary,
body#discount .btn-primary,
body#guest-tracking .btn-primary,
body#authentication .btn-outline-primary,
body#registration .btn-outline-primary,
body#password .btn-outline-primary,
body#my-account .btn-outline-primary,
body#identity .btn-outline-primary,
body#addresses .btn-outline-primary,
body#address .btn-outline-primary,
body#history .btn-outline-primary,
body#authentication .btn-outline-tertiary,
body#registration .btn-outline-tertiary,
body#password .btn-outline-tertiary,
body#my-account .btn-outline-tertiary,
body#identity .btn-outline-tertiary,
body#addresses .btn-outline-tertiary,
body#address .btn-outline-tertiary,
body#history .btn-outline-tertiary {
  --bs-btn-font-family: inherit;
  --bs-btn-border-radius: 0;
  --bs-btn-font-weight: 500;
  --bs-btn-padding-y: 0.7rem;
  --bs-btn-padding-x: 1.15rem;
}

body#authentication .btn-primary,
body#registration .btn-primary,
body#password .btn-primary,
body#my-account .btn-primary,
body#identity .btn-primary,
body#addresses .btn-primary,
body#address .btn-primary,
body#history .btn-primary,
body#order-detail .btn-primary,
body#order-follow .btn-primary,
body#order-return .btn-primary,
body#order-slip .btn-primary,
body#discount .btn-primary,
body#guest-tracking .btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: #111;
  --bs-btn-border-color: #111;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #000;
  --bs-btn-hover-border-color: #000;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #000;
  --bs-btn-active-border-color: #000;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #9aa0a6;
  --bs-btn-disabled-border-color: #9aa0a6;
}

body#authentication .btn-outline-primary,
body#registration .btn-outline-primary,
body#password .btn-outline-primary,
body#my-account .btn-outline-primary,
body#identity .btn-outline-primary,
body#addresses .btn-outline-primary,
body#address .btn-outline-primary,
body#history .btn-outline-primary,
body#authentication .btn-outline-tertiary,
body#registration .btn-outline-tertiary,
body#password .btn-outline-tertiary,
body#my-account .btn-outline-tertiary,
body#identity .btn-outline-tertiary,
body#addresses .btn-outline-tertiary,
body#address .btn-outline-tertiary,
body#history .btn-outline-tertiary {
  --bs-btn-color: #111;
  --bs-btn-bg: transparent;
  --bs-btn-border-color: #cfd3d7;
  --bs-btn-hover-color: #000;
  --bs-btn-hover-bg: var(--cercasa-cust-bg-soft);
  --bs-btn-hover-border-color: #b8bdc2;
  --bs-btn-active-color: #000;
  --bs-btn-active-bg: var(--cercasa-cust-bg-soft);
  --bs-btn-active-border-color: #b8bdc2;
}

body#authentication .btn-basic,
body#registration .btn-basic,
body#password .btn-basic,
body#my-account .btn-basic,
body#identity .btn-basic {
  color: var(--cercasa-cust-muted);
  text-decoration: none;
  font-weight: 500;
  border: 0;
  background: transparent;
  box-shadow: none;
}

body#authentication .btn-basic:hover,
body#registration .btn-basic:hover,
body#password .btn-basic:hover {
  color: #000;
  text-decoration: none;
}

/* ——— Breadcrumb ——— */
body#authentication .breadcrumb__wrapper,
body#registration .breadcrumb__wrapper,
body#password .breadcrumb__wrapper,
body#my-account .breadcrumb__wrapper,
body#identity .breadcrumb__wrapper,
body#addresses .breadcrumb__wrapper,
body#address .breadcrumb__wrapper,
body#history .breadcrumb__wrapper,
body#order-detail .breadcrumb__wrapper,
body#order-follow .breadcrumb__wrapper,
body#order-return .breadcrumb__wrapper,
body#order-slip .breadcrumb__wrapper,
body#discount .breadcrumb__wrapper,
body#guest-tracking .breadcrumb__wrapper {
  margin: 0;
  padding: 0.85rem 0;
  background: #fff;
  border-bottom: 1px solid var(--cercasa-cust-line);
}

body#authentication .breadcrumb__wrapper .container,
body#registration .breadcrumb__wrapper .container,
body#password .breadcrumb__wrapper .container,
body#my-account .breadcrumb__wrapper .container,
body#identity .breadcrumb__wrapper .container,
body#addresses .breadcrumb__wrapper .container,
body#address .breadcrumb__wrapper .container,
body#history .breadcrumb__wrapper .container,
body#order-detail .breadcrumb__wrapper .container,
body#discount .breadcrumb__wrapper .container {
  max-width: none;
  padding-inline: var(--cercasa-cust-gutter);
}

body#authentication .breadcrumb,
body#registration .breadcrumb,
body#password .breadcrumb,
body#my-account .breadcrumb,
body#identity .breadcrumb,
body#addresses .breadcrumb,
body#address .breadcrumb,
body#history .breadcrumb,
body#order-detail .breadcrumb,
body#discount .breadcrumb {
  margin: 0;
  padding: 0;
  font-size: 0.78rem;
  color: var(--cercasa-cust-soft);
  background: transparent;
}

body#authentication .breadcrumb-item + .breadcrumb-item::before,
body#registration .breadcrumb-item + .breadcrumb-item::before,
body#password .breadcrumb-item + .breadcrumb-item::before,
body#my-account .breadcrumb-item + .breadcrumb-item::before,
body#identity .breadcrumb-item + .breadcrumb-item::before,
body#addresses .breadcrumb-item + .breadcrumb-item::before,
body#address .breadcrumb-item + .breadcrumb-item::before,
body#history .breadcrumb-item + .breadcrumb-item::before {
  content: "/";
  color: var(--cercasa-cust-soft);
  padding-inline: 0.45rem;
}

body#authentication .breadcrumb-link,
body#registration .breadcrumb-link,
body#password .breadcrumb-link,
body#my-account .breadcrumb-link,
body#identity .breadcrumb-link,
body#addresses .breadcrumb-link,
body#history .breadcrumb-link {
  color: var(--cercasa-cust-muted);
  text-decoration: none;
}

body#authentication .breadcrumb-item:last-child > span,
body#registration .breadcrumb-item:last-child > span,
body#password .breadcrumb-item:last-child > span,
body#my-account .breadcrumb-item:last-child > span,
body#identity .breadcrumb-item:last-child > span,
body#addresses .breadcrumb-item:last-child > span,
body#address .breadcrumb-item:last-child > span,
body#history .breadcrumb-item:last-child > span {
  color: #7A9A7E;
  font-weight: 500;
}

/* ——— Tytuły stron ——— */
body#authentication .page-header,
body#registration .page-header,
body#password .page-header,
body#my-account .page-header,
body#identity .page-header,
body#addresses .page-header,
body#address .page-header,
body#history .page-header {
  margin: 0 0 1.1rem;
  padding: 0;
  text-align: left;
}

body#authentication .page-title-section,
body#registration .page-title-section,
body#password .page-title-section,
body#my-account .page-title-section,
body#identity .page-title-section,
body#addresses .page-title-section,
body#address .page-title-section,
body#history .page-title-section,
body#my-account .cercasa-customer__header .page-title-section {
  margin: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: left;
  color: var(--cercasa-cust-text);
}

body#authentication #content,
body#registration #content,
body#password #content,
body#authentication .page-content,
body#registration .page-content,
body#password .page-content {
  padding-block: 0;
}

body#authentication .columns-container,
body#registration .columns-container,
body#password .columns-container {
  padding-block: 0;
}

/* ——— Auth: logowanie / rejestracja / hasło ——— */
/* Ten sam górny odstęp co koszyk: body#cart .cercasa-cart-page { padding-block: 2rem … } */
body#authentication .cercasa-auth,
body#registration .cercasa-auth,
body#password .cercasa-auth {
  max-width: 28rem;
  margin-inline: auto;
  padding-block: 2rem 2.5rem;
}

body#registration .cercasa-auth {
  max-width: 40rem;
}

/* H1 jak na koszyku — nad kartą, z umiarkowanym odstępem */
body#authentication .cercasa-auth__header,
body#registration .cercasa-auth__header,
body#password .cercasa-auth__header {
  margin: 0 0 0.9rem;
  padding: 0;
  text-align: left;
}

body#authentication .cercasa-auth__title,
body#registration .cercasa-auth__title,
body#password .cercasa-auth__title {
  margin: 0;
  padding: 0;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-align: left;
  color: var(--cercasa-cust-text);
}

body#authentication .cercasa-auth__card,
body#registration .cercasa-auth__card,
body#password .cercasa-auth__card {
  padding: 1.35rem 1.35rem 1.45rem;
  border: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  background: var(--cercasa-cust-bg);
}

body#authentication .login__form-wrapper {
  margin: 0;
}

body#authentication .cercasa-auth__aside,
body#registration .cercasa-auth__aside,
body#password .cercasa-auth__aside {
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--cercasa-cust-line);
  text-align: center;
}

body#password .cercasa-auth__aside--footer {
  text-align: left;
}

body#password .cercasa-auth__aside--footer .btn-basic {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1;
}

body#password .cercasa-auth__aside--footer .material-icons {
  font-size: 1.1rem;
  line-height: 1;
}

body#authentication .cercasa-auth__aside-title,
body#authentication .login__register-prompt .h4 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cercasa-cust-text);
}

body#registration .register-form__login-prompt {
  margin: 1.15rem 0 0;
  font-size: 0.88rem;
  color: var(--cercasa-cust-muted);
}

body#registration .register-form__login-prompt a {
  color: #111;
  font-weight: 500;
  text-decoration: none;
}

body#registration .register-form__login-prompt a:hover {
  color: #000;
  text-decoration: none;
}

body#authentication .cercasa-auth__hook:empty {
  display: none;
}

body#authentication .cercasa-auth__hook {
  margin-top: 1rem;
}

body#authentication hr,
body#registration hr,
body#password hr {
  display: none;
}

/* Formularze */
/* Tylko formularze konta / auth — nie łapać wyszukiwarki w headerze */
body#authentication .cercasa-auth .form-label,
body#registration .cercasa-auth .form-label,
body#password .cercasa-auth .form-label,
body#identity .cercasa-customer .form-label,
body#address .cercasa-customer .form-label,
body#guest-tracking #content .form-label {
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--cercasa-cust-muted);
}

body#authentication .cercasa-auth .form-control,
body#registration .cercasa-auth .form-control,
body#password .cercasa-auth .form-control,
body#identity .cercasa-customer .form-control,
body#address .cercasa-customer .form-control,
body#guest-tracking #content .form-control,
body#authentication .cercasa-auth .form-select,
body#registration .cercasa-auth .form-select,
body#identity .cercasa-customer .form-select,
body#address .cercasa-customer .form-select {
  min-height: 2.65rem;
  border: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  box-shadow: none;
  font-size: 0.9rem;
  color: var(--cercasa-cust-text);
}

body#authentication .cercasa-auth .form-control:focus,
body#registration .cercasa-auth .form-control:focus,
body#password .cercasa-auth .form-control:focus,
body#identity .cercasa-customer .form-control:focus,
body#address .cercasa-customer .form-control:focus,
body#authentication .cercasa-auth .form-select:focus,
body#registration .cercasa-auth .form-select:focus,
body#identity .cercasa-customer .form-select:focus,
body#address .cercasa-customer .form-select:focus {
  border-color: #111;
  box-shadow: 0 0 0 1px #111;
}

body#authentication .cercasa-auth .form-check-input:checked,
body#registration .cercasa-auth .form-check-input:checked,
body#identity .cercasa-customer .form-check-input:checked {
  background-color: #111;
  border-color: #111;
}

body#authentication .cercasa-auth .form-check-label,
body#registration .cercasa-auth .form-check-label,
body#identity .cercasa-customer .form-check-label {
  font-size: 0.86rem;
  color: var(--cercasa-cust-muted);
}

body#authentication .cercasa-auth .buttons-wrapper,
body#registration .cercasa-auth .buttons-wrapper,
body#password .cercasa-auth .buttons-wrapper,
body#identity .cercasa-customer .buttons-wrapper,
body#address .cercasa-customer .buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 1.15rem;
}

body#authentication .buttons-wrapper--split {
  justify-content: space-between;
}

body#authentication #submit-login,
body#registration .form-control-submit,
body#registration button[type="submit"],
body#identity button[type="submit"],
body#address button[type="submit"],
body#password #send-reset-link,
body#password button[type="submit"] {
  min-height: 2.75rem;
  min-width: 8.5rem;
}

body#authentication .alert,
body#registration .alert,
body#password .alert,
body#identity .alert,
body#my-account .alert {
  border-radius: 0;
  font-size: 0.86rem;
}

body#password .send-renew-password-link,
body#identity .cercasa-customer__content > p {
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--cercasa-cust-muted);
}

/* ——— Konto klienta ——— */
body#my-account .cercasa-customer,
body#identity .cercasa-customer,
body#addresses .cercasa-customer,
body#address .cercasa-customer,
body#history .cercasa-customer,
body#order-detail .cercasa-customer,
body#order-follow .cercasa-customer,
body#order-slip .cercasa-customer,
body#discount .cercasa-customer {
  --bs-gutter-x: 1.75rem;
  --bs-gutter-y: 1.5rem;
  margin-block: 0;
  padding-block: 1.75rem 2.5rem;
}

body#my-account .cercasa-customer__back,
body#identity .cercasa-customer__back,
body#addresses .cercasa-customer__back,
body#address .cercasa-customer__back,
body#history .cercasa-customer__back,
body#order-detail .account-menu__back,
body#discount .account-menu__back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1rem;
  min-height: 2.4rem;
  line-height: 1;
}

body#my-account .cercasa-customer__back .material-icons,
body#identity .cercasa-customer__back .material-icons,
body#addresses .cercasa-customer__back .material-icons,
body#history .cercasa-customer__back .material-icons {
  font-size: 1.15rem;
  line-height: 1;
}

body#my-account .cercasa-customer__content,
body#identity .cercasa-customer__content,
body#addresses .cercasa-customer__content,
body#address .cercasa-customer__content,
body#history .cercasa-customer__content {
  padding: 1.25rem 1.3rem 1.4rem;
  border: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  background: #fff;
}

/* Sidebar */
body#my-account .account-menu--sidebar,
body#identity .account-menu--sidebar,
body#addresses .account-menu--sidebar,
body#address .account-menu--sidebar,
body#history .account-menu--sidebar,
body#order-detail .account-menu--sidebar,
body#order-follow .account-menu--sidebar,
body#order-slip .account-menu--sidebar,
body#discount .account-menu--sidebar {
  padding: 1.15rem 1rem;
  border: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  background: #fff;
}

body#my-account .account-menu__title,
body#identity .account-menu__title,
body#addresses .account-menu__title,
body#history .account-menu__title,
body#order-detail .account-menu__title {
  margin: 0 0 0.85rem;
  padding: 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cercasa-cust-text);
}

body#my-account .account-menu__nav,
body#identity .account-menu__nav,
body#addresses .account-menu__nav,
body#history .account-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

body#my-account .account-menu--sidebar .account-menu__link,
body#identity .account-menu--sidebar .account-menu__link,
body#addresses .account-menu--sidebar .account-menu__link,
body#address .account-menu--sidebar .account-menu__link,
body#history .account-menu--sidebar .account-menu__link,
body#order-detail .account-menu--sidebar .account-menu__link,
body#discount .account-menu--sidebar .account-menu__link {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--cercasa-cust-muted);
  text-decoration: none;
}

body#my-account .account-menu--sidebar .account-menu__link:hover,
body#identity .account-menu--sidebar .account-menu__link:hover,
body#addresses .account-menu--sidebar .account-menu__link:hover,
body#history .account-menu--sidebar .account-menu__link:hover,
body#order-detail .account-menu--sidebar .account-menu__link:hover {
  color: #000;
  background: var(--cercasa-cust-bg-soft);
}

body#my-account .account-menu--sidebar .account-menu__link--active,
body#identity .account-menu--sidebar .account-menu__link--active,
body#addresses .account-menu--sidebar .account-menu__link--active,
body#history .account-menu--sidebar .account-menu__link--active,
body#order-detail .account-menu--sidebar .account-menu__link--active {
  color: #111;
  background: var(--cercasa-cust-bg-soft);
  font-weight: 600;
}

body#my-account .account-menu--sidebar .account-menu__icon,
body#identity .account-menu--sidebar .account-menu__icon,
body#addresses .account-menu--sidebar .account-menu__icon,
body#history .account-menu--sidebar .account-menu__icon {
  font-size: 1.15rem;
  line-height: 1;
  color: inherit;
}

body#my-account .account-menu--sidebar .account-menu__link--signout,
body#identity .account-menu--sidebar .account-menu__link--signout,
body#addresses .account-menu--sidebar .account-menu__link--signout,
body#history .account-menu--sidebar .account-menu__link--signout {
  margin-top: 0.5rem;
  border-top: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  padding-top: 0.75rem;
  color: var(--cercasa-cust-soft);
}

/* Dashboard „Moje konto” — treść bez dodatkowej ramki zewnętrznej */
body#my-account .cercasa-customer--dashboard .cercasa-customer__content {
  padding: 0;
  border: 0;
  background: transparent;
}

/* Siatka „Moje konto” */
body#my-account .account-menu--main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

body#my-account .account-menu--main .account-menu__link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  min-height: 6.5rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  background: #fff;
  color: var(--cercasa-cust-text);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

body#my-account .account-menu--main .account-menu__link:hover,
body#my-account .account-menu--main .account-menu__link:focus-visible {
  border-color: #111;
  background: var(--cercasa-cust-bg-soft);
  color: #000;
}

body#my-account .account-menu--main .account-menu__icon {
  font-size: 1.45rem;
  line-height: 1;
  color: var(--cercasa-cust-soft);
}

body#my-account .account-menu--main .account-menu__link--signout {
  grid-column: 1 / -1;
  min-height: auto;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  color: var(--cercasa-cust-muted);
}

/* Adresy */
body#addresses .addresses__list,
body#addresses .row {
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

body#addresses .address-card,
body#addresses .addresses article {
  height: 100%;
  padding: 1.1rem 1.15rem;
  border: 1px solid var(--cercasa-cust-line);
  border-radius: 0;
  background: #fff;
}

body#addresses .address-card__alias,
body#addresses .address .alias {
  font-weight: 600;
  color: var(--cercasa-cust-text);
}

/* Historia zamówień */
body#history .order-history,
body#history table {
  width: 100%;
  font-size: 0.88rem;
}

body#history .order-history__row,
body#history table tbody tr {
  border-bottom: 1px solid var(--cercasa-cust-line);
}

body#history .badge,
body#order-detail .badge {
  border-radius: 0;
  font-weight: 500;
}

body#history a,
body#order-detail a:not(.btn) {
  color: #111;
}

@media (max-width: 991.98px) {
  body#my-account .account-menu--sidebar,
  body#identity .account-menu--sidebar,
  body#addresses .account-menu--sidebar,
  body#history .account-menu--sidebar {
    margin-bottom: 0.5rem;
  }

  body#my-account .account-menu--main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  body#authentication .cercasa-auth__card,
  body#registration .cercasa-auth__card,
  body#password .cercasa-auth__card,
  body#my-account .cercasa-customer__content,
  body#identity .cercasa-customer__content {
    padding: 1.1rem;
  }

  body#authentication .buttons-wrapper--split {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  body#authentication #submit-login {
    width: 100%;
  }
}
