/* Este 2.0 - grupa „konto": logowanie i rejestracja PRO, pulpit, zamówienia,
   szczegóły zamówienia, listy zakupowe, dane i adresy, zwroty.
   Komponenty z prototypu (.auth, .seg, .acct-h, .chips, .ord, .lst, .rel, .pill,
   .stepper, .summary, .sumrow) są w este.css; tu tylko dopasowanie znaczników
   WooCommerce / Este B2B i elementy konta, których prototyp nie rysował. */

/* ---------- strona konta (szablon woocommerce/myaccount/page-account.php) ---------- */
.acct-page { padding-bottom: 72px; }
.acct-page > .woocommerce > .woocommerce-notices-wrapper { margin-top: 20px; }
.acct-content > .woocommerce-notices-wrapper { margin: 18px 0 0; }

/* ---------- logowanie i rejestracja ---------- */
.auth__lead { margin-top: 10px; }
.auth h1:focus { outline: none; }
.auth__row { display: flex; justify-content: space-between; align-items: center; gap: 4px 16px; flex-wrap: wrap; }
.auth__row .check { min-height: 44px; align-items: center; }
/* przyciski główne z klasą rdzenia .button (logowanie, rejestracja, zapis danych):
   .button z este-wp.css jest przezroczysty, tu wraca wypełnienie z prototypu */
.acct-page .btn--primary.button { background: var(--t400); border: 1px solid var(--t400); color: #fff; }
.acct-page .btn--primary.button:hover { background: var(--t500); border-color: var(--t500); color: #fff; }
.acct-page .btn--primary.button:focus-visible { outline: 2px solid var(--t400); outline-offset: 2px; }
.auth .pw button { cursor: pointer; }
.auth .pw button:focus-visible { outline: 2px solid var(--t400); outline-offset: -2px; border-radius: 8px; }
.auth .woocommerce-privacy-policy-text p { margin: 0; }
.auth__info { display: flex; gap: 12px; align-items: flex-start; margin: 28px 0 0; padding: 16px; background: var(--pearl); border-radius: var(--r); font-size: 14px; line-height: 1.55; color: var(--graphite); }
.auth__info svg { width: 20px; height: 20px; flex: none; margin-top: 1px; color: var(--t400); }
.auth__info .link { white-space: nowrap; color: var(--ink); }
.auth .alt .link { color: var(--ink); }

/* pola wtyczki Este B2B w rejestracji */
.auth .este-b2b-register { margin-top: 4px; border-top: 0; padding-top: 0; }
.auth .este-b2b-lookup__btn { border-color: var(--ink); color: var(--ink); background: transparent; min-height: 48px; }
.auth .este-b2b-register__legend:first-child { font: 400 13px var(--f-body); color: var(--graphite); margin-bottom: 6px; }
.auth .este-b2b-register__type { margin-top: 0 !important; }
.este-b2b-lookup { margin: -6px 0 16px; }
.este-b2b-lookup__btn { min-height: 48px; padding: 0 18px; border: 1px solid var(--ink); border-radius: var(--r-btn); background: transparent; font: 400 15px var(--f-body); color: var(--ink); cursor: pointer; }
.este-b2b-lookup__btn:hover { background: var(--pearl); }
.este-b2b-lookup__btn:disabled { opacity: .6; cursor: progress; }
.este-b2b-lookup__status { flex-basis: 100%; }
.auth .woocommerce-form-register select, .auth .woocommerce-form-register input.input-text { font-size: 16px; }
.auth .este-b2b-register__loyalty { margin-top: 4px; }

/* odzyskiwanie i ustawianie hasła (formularze rdzenia) */
.acct-pw-h { font: 300 32px/1.12 var(--f-display); letter-spacing: -.01em; max-width: 460px; margin: 30px auto 14px; }
.acct-page .woocommerce-ResetPassword { max-width: 460px; margin: 0 auto; color: var(--graphite); }
.acct-page .woocommerce-ResetPassword > p:first-child { margin: 0 0 18px; }
.acct-page .woocommerce-ResetPassword .form-row-first, .acct-page .woocommerce-ResetPassword .form-row-last { width: 100%; float: none; }
.acct-page .woocommerce-ResetPassword .button { width: 100%; min-height: 52px; background: var(--t400); border-color: var(--t400); color: #fff; font-size: 16px; }

/* ---------- nagłówek i nawigacja konta ---------- */
.acct-nav { margin: 0 0 6px; }
.acct-nav .chip:hover { border-color: var(--ink); }
.acct-content { padding-top: 6px; }
.acct-sec { margin: 26px 0 14px; }
.acct-sec .h2, .acct-hello .h2, .acct-order__head .h2, .acct-req .h2 { font-size: 22px; }
.seg--acct { max-width: 380px; margin: 0 0 18px; }
.acct-content > .seg--acct:first-child { margin-top: 22px; }
.acct-lead { color: var(--graphite); margin: 0 0 16px; max-width: 60ch; }
.acct-empty { border: 1px dashed var(--line-strong); border-radius: var(--r); padding: 22px; display: grid; gap: 14px; justify-items: start; color: var(--graphite); }

/* ---------- karty zamówień ---------- */
.ord__h { font: 400 16.5px var(--f-display); }
.ord__h a:hover { color: var(--t400); }
.ord__top .meta { display: block; margin-top: 4px; }
.ord__thumbs .thumb img, .acct-items .thumb img, .lst .rel .thumb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.acct-pager { margin-top: 28px; }
.acct-pager__btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- pulpit ---------- */
.acct-hello { margin: 26px 0 16px; }
.acct-status { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; max-width: 760px; color: var(--graphite); }
.acct-status--pending { background: #fdf8f1; border-color: #efe2cc; }
.acct-status__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.acct-status__top .h3 { color: var(--ink); }
.acct-status__group b { font-weight: 500; color: var(--ink); }
.acct-status .link { color: var(--ink); white-space: nowrap; }
.acct-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 32px; }
.acct-tile { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); min-height: 84px; color: var(--ink); }
.acct-tile:hover { border-color: var(--line-strong); background: var(--pearl); color: var(--ink); }
.acct-tile svg { width: 24px; height: 24px; flex: none; color: var(--t400); }
.acct-tile b { display: block; font: 400 17px var(--f-display); }
.acct-tile small { display: block; font-size: 13px; line-height: 1.45; color: var(--muted); margin-top: 4px; }

/* ---------- szczegóły zamówienia ---------- */
.acct-back { margin-top: 14px; }
.acct-order__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin: 4px 0 14px; }
.acct-order__head .meta { margin-top: 6px; }
.acct-order__acts { margin-bottom: 26px; }
.acct-order__acts:empty { display: none; }
.acct-order__cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.acct-h3 { margin: 0 0 10px; }
.acct-items { margin-bottom: 30px; }
.acct-items > li { grid-template-columns: 64px minmax(0, 1fr) auto; }
.acct-items__sum { font: 500 16px var(--f-display); font-feature-settings: "tnum" 1; white-space: nowrap; }
.acct-items .rel__name a:hover { color: var(--t400); }
.acct-items .wc-item-meta { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; color: var(--muted); }
.acct-items .wc-item-meta li { display: flex; gap: 4px; padding: 0; border: 0; }
.acct-items .wc-item-meta p { display: inline; margin: 0; }
.acct-notes { border-left: 2px solid var(--t200); padding: 2px 0 2px 16px; margin: 0 0 26px; max-width: 760px; }
.acct-notes ol { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; color: var(--graphite); }
.acct-notes p { margin: 2px 0 0; }
.acct-order__sum .sumrow span { color: var(--graphite); }
.acct-order__sum .sumrow b { text-align: right; }
.acct-order__sum .sumrow--total b { font-size: 22px; }
.acct-order__sum .sumrow b small, .acct-order__sum .includes_tax { display: block; font: 400 13px var(--f-body); color: var(--muted); margin-top: 2px; }

/* adresy: szczegóły zamówienia i „Adresy" */
.acct-addr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct-addr__box { border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; min-width: 0; }
.acct-addr__box h4 { font: 500 15px var(--f-display); margin: 0 0 8px; }
.acct-addr__box address, .acct-addr .woocommerce-Address address { font-style: normal; line-height: 1.6; color: var(--graphite); border: 0; padding: 0; overflow-wrap: anywhere; }
.acct-addr__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.acct-addr__note { margin-top: 12px; }

/* ---------- listy zakupowe ---------- */
.lst .rel li { grid-template-columns: 56px minmax(0, 1fr) auto; }
.lst .rel .thumb { display: flex; }
.lst .rel__name a:hover { color: var(--t400); }
.lst .rel li.is-updating { opacity: .6; }
.lst__rm { margin: 0; }
.lst__rm .linkbtn { font-size: 13px; color: var(--muted); }
.lst__empty { margin: 0; padding: 0 0 12px; color: var(--muted); font-size: 14px; }
.lst__foot:empty { display: none; }
.lst__foot form { margin: 0; }
.lst__total { color: var(--ink); font-weight: 400; font-size: 15px; }
.lst__manage { display: flex; gap: 0 22px; align-items: flex-start; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 2px 0 6px; }
.lst__manage form { margin: 0; }
.lst__rename > summary { list-style: none; cursor: pointer; }
.lst__rename > summary::-webkit-details-marker { display: none; }
.lst__rename[open] { flex-basis: 100%; }
.lst__del { color: #7c261f; }
.lst__inline { display: flex; gap: 8px; padding: 6px 0 10px; max-width: 560px; }
.lst__inline .field-lg { flex: 1; min-width: 0; }
.lst__inline .btn { height: 52px; flex: none; }
.lst-new { margin-top: 28px; padding: 18px; background: var(--pearl); border-radius: var(--r); scroll-margin-top: 20px; }
.lst-new .h3 { margin-bottom: 8px; }
.lst-new .lst__inline { padding-bottom: 0; }
.actionbar__form { flex: 1; display: flex; margin: 0; }
.actionbar__form .btn { flex: 1; }
.actionbar__sum span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }

/* ---------- dane konta, adresy, zwroty ---------- */
.acct-form { max-width: 760px; }
.acct-co { border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 8px; }
.acct-co__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.acct-co__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px 24px; margin: 0; }
.acct-co__grid dt { font-size: 13px; color: var(--muted); }
.acct-co__grid dd { margin: 2px 0 0; color: var(--ink); overflow-wrap: anywhere; }
.woocommerce-EditAccountForm .pw { display: block; }
.woocommerce-EditAccountForm .hint { display: block; }
.acct-pass { border: 0; padding: 0; margin: 0; min-width: 0; }
.acct-pass > .legend { padding: 0; }
.acct-pass__hint { margin: -6px 0 12px; }
.acct-form__submit { margin-top: 8px; }
.acct-form__submit .btn { border: 0; }
.acct-req .h2 { margin: 4px 0 12px; }
.acct-req form { max-width: 640px; }
.acct-req select.field-lg { color: var(--ink); }

/* edycja adresu (formularz rdzenia form-edit-address.php) */
.acct-content form > h2, .acct-content form > h3 { font: 400 22px var(--f-display); margin: 22px 0 16px; }
.acct-content .woocommerce-address-fields { max-width: 760px; }
.acct-content .woocommerce-address-fields button[name="save_address"] { min-height: 52px; padding: 0 28px; background: var(--t400); border-color: var(--t400); color: #fff; font-size: 16px; }

/* kupione produkty, rabaty */
.acct-bought { list-style: none; margin: 0; padding: 0; }
.este-acct__hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.este-acct__rabaty { max-width: 640px; display: grid; gap: 10px; color: var(--graphite); }
.este-acct__rabat-box { display: flex; align-items: baseline; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: var(--r); }
.este-acct__rabat-val { font: 300 36px var(--f-display); color: var(--t400); }

/* ---------- telefon ---------- */
@media (max-width: 760px) {
	.acct-page { padding-bottom: 32px; }
	.acct-h { margin-top: 18px; }
	.acct-nav { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scroll-padding-left: var(--gutter); }
	.seg--acct { max-width: none; }
	.acct-tiles { grid-template-columns: 1fr; margin-top: 24px; }
	.acct-order__cols { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.acct-order__sum { position: static; }
	.acct-addr { grid-template-columns: 1fr; }
	.acct-items > li { grid-template-columns: 56px minmax(0, 1fr); row-gap: 6px; }
	.acct-items .thumb { width: 56px; height: 56px; }
	.acct-items__sum { grid-column: 2; }
	.ord__acts .btn--sm { height: 48px; padding: 0 18px; }
	.lst { padding: 0 14px; }
	.lst__foot .btn { width: 100%; }
	.lst__foot form { flex: 1 1 100%; }
	.lst__inline { flex-wrap: wrap; }
	.lst__inline .btn { flex: 1 1 100%; }
	.acct-pw-h { font-size: 28px; margin-top: 18px; }
	.auth__info { margin-top: 22px; }
}

/* Zgody przy rejestracji i w „Dane konta” (inc/registration-consents.php):
   bez domyślnej ramki fieldset, w jednym rytmie z polem programu lojalnościowego. */
.este-consents { border: 0; padding: 0; margin: 0; min-width: 0; }
.este-consents legend:not(.sr-only) { font: 500 15px var(--f-display); color: var(--ink); margin-bottom: 6px; padding: 0; }
.este-consent a { color: var(--t400); text-decoration: underline; text-underline-offset: 3px; }
.este-consent a:hover { color: var(--t500); }
.este-consent .required { color: var(--muted); text-decoration: none; }
