/* ============================================================
   Moje konto — logowanie/rejestracja (FAZA B).
   Override: woocommerce/myaccount/form-login.php + form-lost-password.php + form-reset-password.php.
   Klasy tech-acct*. Wygląd 1:1 z „Collibre Konto standalone.html".
   ⚠️ GOTCHA 3 Astry: input/button/select stylowane globalnie selektorem atrybutowym (0,1,1) >
   nasza klasa (0,1,0) → wygląd pól i przycisków MUSI mieć !important.
   ============================================================ */

/* ---------- Layout strony konta (page-builder + no-sidebar via inc/konto.php) ---------- */
.tech-konto-page .entry-header,
.tech-konto-page .entry-title,
.tech-konto-page .ast-title-bar,
.tech-konto-page .page-title { display: none !important; }
/* GOTCHA page-builder: .ast-container = flex → wracamy do block (jak o-nas/b2b).
   Konto renderuje się w ast-plain-container (filtr page-builder nie łapie na WC account),
   więc celujemy w KAŻDY .ast-container na stronie konta (zakres body .tech-konto-page = tylko
   konto) — pełna szerokość, a wyśrodkowanie 80rem daje .tech-konto-page .woocommerce niżej. */
.tech-konto-page .site-content .ast-container {
	display: block !important;
	padding-left: 0 !important; padding-right: 0 !important; max-width: 100% !important;
}
/* Kontener treści konta = 80rem wyśrodkowany (jak reszta stron); offset góra: .tech-acct. */
.tech-konto-page .woocommerce { max-width: var(--tech-container); margin-inline: auto; padding-inline: 1.5rem; }
/* STANDARD odstępu góra (jak page-top-standard.css) — celowane wprost w konto, gdyby nie dostało
   ast-page-builder-template: zerujemy zmienny spacing wrappera Astry, offset daje .tech-acct. */
.tech-konto-page #primary,
.tech-konto-page .site-main,
.tech-konto-page .site-main > article,
.tech-konto-page .entry-content { margin-top: 0 !important; padding-top: 0 !important; }

.tech-acct { padding-top: 2rem; }
@media (min-width: 1024px) { .tech-acct { padding-top: 3rem; } }
.tech-acct .tech-breadcrumbs { margin-bottom: 2rem; }

/* ---------- Zakładki (mobile) ---------- */
.tech-acct__tabs {
	display: grid; grid-template-columns: 1fr 1fr; gap: .5rem;
	max-width: 24rem; margin: 0 auto 2rem; padding: .25rem;
	border: 1px solid var(--tech-gray-200, #e5e7eb); border-radius: var(--tech-radius-pill);
}
@media (min-width: 1024px) { .tech-acct__tabs { display: none; } }
.tech-acct__tab {
	padding: .625rem 1rem !important; border: 0 !important; background: transparent !important;
	border-radius: var(--tech-radius-pill) !important; min-width: 0 !important;
	font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-semibold); color: var(--tech-slate) !important;
	cursor: pointer; transition: background .15s ease, color .15s ease;
}
.tech-acct__tab.is-active { background: var(--tech-ink) !important; color: var(--tech-white) !important; }

/* ---------- Siatka paneli ---------- */
.tech-acct__grid {
	display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: stretch;
}
@media (min-width: 1024px) { .tech-acct__grid { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.tech-acct__grid--single { max-width: 32rem; margin-inline: auto; }
/* Jedna kolumna także na desktopie — wcześniej dziedziczyła `1fr 1fr` z siatki logowania
   i karta (odzyskiwanie / nowe hasło) miała połowę z 32rem (~270px, łamany tytuł). */
@media (min-width: 1024px) { .tech-acct__grid--single { grid-template-columns: 1fr; } }
/* Mobile: odstęp karty od stopki (na desktopie daje go kontener strony). */
@media (max-width: 1023px) { .tech-acct__grid--single { margin-bottom: 2.5rem; } }

/* Komunikaty WC wewnątrz karty (odzyskiwanie / nowe hasło) — odstęp od leadu. */
.tech-acct__card > .woocommerce-notices-wrapper:not(:empty) { margin-top: 1.25rem; }
.tech-acct__card > .woocommerce-notices-wrapper .woocommerce-error,
.tech-acct__card > .woocommerce-notices-wrapper .woocommerce-message,
.tech-acct__card > .woocommerce-notices-wrapper .woocommerce-info { margin-bottom: 0 !important; }

/* Ekran „link wysłany" */
.tech-acct__card--sent { text-align: center; }
.tech-acct__sent-ico {
	width: 3.5rem; height: 3.5rem; margin: 0 auto 1.25rem; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--tech-mint-50, #eaf7f4); color: var(--tech-mint, #2faf98);
}

/* ---------- Karty ---------- */
.tech-acct__card {
	border-radius: var(--tech-radius-lg); padding: 1.5rem;
}
@media (min-width: 640px) { .tech-acct__card { padding: 2.5rem; } }
.tech-acct__card--login { background: var(--tech-white); border: 1px solid var(--tech-gray-200, #e5e7eb); }
.tech-acct__card--register { background: var(--tech-mist); border: 1px solid var(--tech-border); }

.tech-acct__title {
	margin: 0 !important; font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: var(--tech-fw-extrabold);
	letter-spacing: var(--tech-tracking-tight); color: var(--tech-ink);
}
.tech-acct__lead { margin: .5rem 0 0 !important; color: var(--tech-slate); line-height: var(--tech-lh-normal); }

/* ---------- Benefity (rejestracja) ---------- */
.tech-acct__benefits {
	list-style: none; margin: 1.5rem 0 0 !important; padding: 0 !important;
	display: grid; grid-template-columns: 1fr; gap: 1rem;
}
@media (min-width: 640px) { .tech-acct__benefits { grid-template-columns: 1fr 1fr; } }
.tech-acct__benefit { display: flex; align-items: flex-start; gap: .75rem; margin: 0; }
.tech-acct__benefit-ico {
	display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 2.25rem; height: 2.25rem; border-radius: .75rem;
	background: var(--tech-white); border: 1px solid var(--tech-border); color: var(--tech-ink);
}
.tech-acct__benefit-t { display: block; font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-semibold); color: var(--tech-ink); }
.tech-acct__benefit-d { display: block; margin-top: .125rem; font-size: var(--tech-fs-sm); color: var(--tech-slate); line-height: var(--tech-lh-snug); }

/* ---------- Formularz ---------- */
.tech-acct__form { margin-top: 1.75rem; }
.tech-acct__row { margin: 0 0 1.25rem !important; display: block; }
.tech-acct__row2 { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .tech-acct__row2 { grid-template-columns: 1fr 1fr; } }
.tech-acct__label { display: block; margin-bottom: .375rem; font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-semibold); color: var(--tech-ink); }
.tech-acct__opt { font-weight: 400; color: var(--tech-slate); }

/* Pola — !important (Astra styluje input atrybutowo) */
.tech-acct__input,
.tech-acct input[type="text"].tech-acct__input,
.tech-acct input[type="email"].tech-acct__input,
.tech-acct input[type="password"].tech-acct__input,
.tech-acct input[type="date"].tech-acct__input {
	width: 100% !important;
	padding: .75rem 1rem !important;
	border: 1px solid var(--tech-gray-200, #e5e7eb) !important;
	border-radius: .75rem !important;
	background: var(--tech-white) !important;
	color: var(--tech-ink) !important;
	font-size: var(--tech-fs-base) !important;
	box-shadow: none !important;
	transition: border-color .15s ease;
}
.tech-acct__input:focus { outline: none !important; border-color: var(--tech-ink) !important; }
.tech-acct__input::placeholder { color: #9aa1a9; }

/* Hasło + oko */
.tech-acct__pass { position: relative; display: block; }
.tech-acct__pass .tech-acct__input { padding-right: 3rem !important; }
.tech-acct__eye {
	position: absolute !important; right: .5rem; top: 50%; transform: translateY(-50%);
	width: 2.25rem !important; height: 2.25rem !important; min-width: 0 !important; padding: 0 !important;
	display: flex; align-items: center; justify-content: center;
	background: transparent !important; border: 0 !important; box-shadow: none !important;
	color: var(--tech-slate) !important; cursor: pointer;
}
.tech-acct__eye:hover { color: var(--tech-ink) !important; }
.tech-acct__eye.is-on { color: var(--tech-ink) !important; }

/* Podpowiedź (urodziny) */
.tech-acct__hint { display: flex; align-items: center; gap: .375rem; margin-top: .5rem; font-size: var(--tech-fs-xs); color: var(--tech-slate); }
.tech-acct__hint svg { color: var(--tech-mint); flex: 0 0 auto; }

/* Login meta: zapamiętaj + zapomniałem */
.tech-acct__loginmeta { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tech-acct__remember { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-size: var(--tech-fs-sm); color: var(--tech-slate); cursor: pointer; }
.tech-acct__remember input { width: 1rem; height: 1rem; accent-color: var(--tech-ink); }
.tech-acct__forgot { font-size: var(--tech-fs-sm); font-weight: var(--tech-fw-semibold); color: var(--tech-ink); text-decoration: none !important; }
.tech-acct__forgot:hover { opacity: .7; }

/* Zgoda regulaminu */
.tech-acct__terms { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1.5rem; font-size: var(--tech-fs-sm); color: var(--tech-slate); cursor: pointer; }
.tech-acct__terms input { margin-top: .15rem; width: 1rem; height: 1rem; accent-color: var(--tech-ink); flex: 0 0 auto; }
.tech-acct__terms a { color: var(--tech-ink); text-decoration: underline; text-underline-offset: 2px; }

/* Przycisk submit — pill ink pełnej szerokości (!important przeciw Astrze) */
.tech-acct__submit {
	width: 100% !important; height: 3.5rem !important; margin: 0 !important;
	border: 0 !important; border-radius: var(--tech-radius-pill) !important;
	background: var(--tech-ink) !important; color: var(--tech-white) !important;
	font-weight: var(--tech-fw-semibold) !important; font-size: var(--tech-fs-base) !important;
	min-width: 0 !important; cursor: pointer; transition: background .2s ease;
}
.tech-acct__submit:hover { background: var(--tech-ink-hover) !important; }

/* Link „wróć do logowania" (lost/reset) */
.tech-acct__back { margin: 1.25rem 0 0; text-align: center; font-size: var(--tech-fs-sm); }
.tech-acct__back a { color: var(--tech-slate); text-decoration: none !important; font-weight: var(--tech-fw-semibold); }
.tech-acct__back a:hover { color: var(--tech-ink); }

/* ---------- Komunikaty WC (błędy/sukces) w stylu Collibre ---------- */
.tech-konto-page .woocommerce-error,
.tech-konto-page .woocommerce-message,
.tech-konto-page .woocommerce-info {
	list-style: none; margin: 0 0 1.5rem !important; padding: 1rem 1.25rem !important;
	border-radius: var(--tech-radius) !important; border: 1px solid var(--tech-border) !important;
	background: var(--tech-mist) !important; color: var(--tech-ink) !important;
	font-size: var(--tech-fs-sm); box-shadow: none !important;
}
.tech-konto-page .woocommerce-error { border-color: #f3c2c2 !important; background: #fdf3f3 !important; color: #b42318 !important; }
.tech-konto-page .woocommerce-error::before,
.tech-konto-page .woocommerce-message::before,
.tech-konto-page .woocommerce-info::before { display: none !important; }
.tech-konto-page .woocommerce-message { border-color: var(--tech-mint-100, #d6efe9) !important; background: var(--tech-mint-50, #eaf7f4) !important; }

/* Puste stany WC z guzikiem akcji (np. „Nie masz aktywnych abonamentów", brak pobrań) —
   domyślnie WC daje tekst po lewej + guzik `float:right` → pionowo nierówno. Układamy w JEDEN
   rząd: tekst lewo, guzik prawo, wyrównane pionowo do środka. `:has(.button)` łapie TYLKO notice
   z akcją, nie zwykłe info. Markup WC = [tekst, guzik] → normalny `row`: tekst lewo, guzik prawo. */
.tech-konto-page .woocommerce-info:has(.button) {
	display: flex; align-items: center; justify-content: space-between;
	gap: 1.25rem; flex-wrap: wrap;
	color: var(--tech-slate) !important;
}
.tech-konto-page .woocommerce-info:has(.button) .button {
	float: none !important; margin: 0 !important; flex: 0 0 auto;
}
/* WC/Astra dokleja clearfix `::after` (content:"") → w kontenerze flex staje się 3. elementem
   i zabiera prawą krawędź (guzik ląduje na środku). Kasujemy go, żeby guzik dosunął się do prawej. */
.tech-konto-page .woocommerce-info:has(.button)::after { content: none !important; display: none !important; }
