/**
 * Phoenix B2B — 2.12.90 — REJESTRACJA REAL WORKING (CSS towarzyszący JS-flow).
 *
 * Cel: zagwarantować POPRAWNY wygląd elementów obsługiwanych przez nowy JS,
 * niezależnie od tego, czy starsze arkusze (2.12.85–89) są w cache:
 *   - modal sukcesu budowany przez JS (te same klasy co szablon PHP — twardo
 *     re-deklarowany overlay + karta, by zawsze był wyśrodkowany i ciemny),
 *   - błędy walidacji przy polach zwrócone AJAX-em (czerwone, czytelne),
 *   - ogólny alert błędu dla AJAX,
 *   - stan ładowania przycisku „Zarejestruj firmę".
 *
 * Plus lekkie wzmocnienie czytelności pól (ciemne tło, jasny tekst, autofill),
 * scoped do `.pb2b-register-page`, żeby kosmetyka nie psuła działania.
 *
 * Ładowany JAKO OSTATNI (zależny od 2.12.89). CSS-only.
 *
 * @package PhoenixB2B
 */

/* =======================================================================
 * §1 — MODAL SUKCESU: twarda re-deklaracja (overlay + karta), iOS-safe.
 *      Klasy identyczne z szablonem PHP → działa dla modala z PHP i z JS.
 * ===================================================================== */
.pb2b-reg-success-modal {
	position: fixed !important;
	inset: 0 !important;
	z-index: 2147483600 !important; /* ponad sticky topbar/menu */
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 24px !important;
	padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)) !important;
	background: rgba(6, 7, 14, .72) !important;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	-webkit-overflow-scrolling: touch;
	overflow: auto;
	animation: pb2b-reg90-fade .22s ease-out both;
}
.pb2b-reg-success-modal[hidden] { display: none !important; }

.pb2b-reg-success-card {
	width: 100%;
	max-width: 440px;
	margin: auto;
	background:
		radial-gradient(circle at top left, rgba(124, 58, 237, .20), transparent 40%),
		#111827 !important;
	border: 1px solid rgba(148, 163, 184, .16) !important;
	border-radius: 20px !important;
	box-shadow: 0 30px 90px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .05) !important;
	color: #F8FAFC !important;
	padding: 30px 28px 24px !important;
	text-align: center !important;
	animation: pb2b-reg90-pop .26s cubic-bezier(.2, .9, .3, 1.2) both;
}
.pb2b-reg-success-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	margin-bottom: 14px;
	color: #C4F7D4;
	background: radial-gradient(circle, rgba(34, 197, 94, .26), rgba(34, 197, 94, .08));
	border: 1px solid rgba(74, 222, 128, .35);
}
.pb2b-reg-success-card h2 {
	margin: 0 0 10px !important;
	font-size: 23px !important;
	font-weight: 700 !important;
	color: #F8FAFC !important;
}
.pb2b-reg-success-card p {
	margin: 0 0 10px !important;
	font-size: 14.5px !important;
	line-height: 1.55 !important;
	color: #CBD5E1 !important;
}
.pb2b-reg-success-extra { color: #E2E8F0 !important; font-weight: 600 !important; }
.pb2b-reg-success-redirect { margin-top: 14px !important; font-size: 13px !important; color: #94A3B8 !important; }
.pb2b-reg-success-count {
	display: inline-block;
	min-width: 26px;
	padding: 1px 8px;
	margin: 0 2px;
	border-radius: 999px;
	font-weight: 700;
	color: #EDE9FE;
	background: rgba(124, 58, 237, .28);
	border: 1px solid rgba(168, 139, 250, .5);
}
.pb2b-reg-success-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.pb2b-reg-success-actions .pb2b-btn {
	width: 100%;
	padding: 14px 18px;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.pb2b-reg-success-actions .pb2b-btn-primary {
	background: linear-gradient(135deg, #A855F7 0%, #7C3AED 45%, #3B82F6 100%) !important;
	color: #fff !important;
	box-shadow: 0 10px 26px rgba(124, 58, 237, .4);
}
.pb2b-reg-success-actions .pb2b-btn-primary:hover { filter: brightness(1.06); }
.pb2b-reg-success-actions .pb2b-reg-success-close,
.pb2b-reg-success-close {
	background: transparent !important;
	color: #CBD5E1 !important;
	border: 1px solid rgba(255, 255, 255, .14) !important;
}
.pb2b-reg-success-close:hover { background: rgba(255, 255, 255, .05) !important; }

/* Gdy modal aktywny — ukryj inline-fallback (PHP). */
.phoenix-b2b-panel.pb2b-reg-has-modal .pb2b-auth-success { display: none !important; }

@keyframes pb2b-reg90-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pb2b-reg90-pop {
	from { opacity: 0; transform: translateY(10px) scale(.97); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (max-width: 380px) {
	.pb2b-reg-success-card { padding: 24px 18px 18px !important; }
	.pb2b-reg-success-card h2 { font-size: 20px !important; }
}
@media (prefers-reduced-motion: reduce) {
	.pb2b-reg-success-modal,
	.pb2b-reg-success-card { animation: none !important; }
}

/* =======================================================================
 * §2 — BŁĘDY WALIDACJI (AJAX): czerwone, czytelne, przy polu.
 * ===================================================================== */
.pb2b-register-page .phoenix-b2b-field-error,
.phoenix-b2b-registration .phoenix-b2b-field-error {
	display: block;
	margin-top: 6px;
	font-size: 12.5px;
	line-height: 1.4;
	color: #FCA5A5 !important;
	font-weight: 600;
}
.pb2b-register-page .pb2b-field-has-error input,
.pb2b-register-page .pb2b-field-has-error select,
.pb2b-register-page .pb2b-field-has-error textarea,
.phoenix-b2b-registration .pb2b-field-has-error input,
.phoenix-b2b-registration .pb2b-field-has-error select {
	border-color: #EF4444 !important;
	box-shadow: 0 0 0 2px rgba(239, 68, 68, .18) !important;
}

/* Ogólny alert błędu (AJAX) — spójny z PHP-owym .pb2b-form-alert-error. */
.pb2b-register-page .pb2b-form-alert-error,
.phoenix-b2b-registration .pb2b-form-alert-error {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 16px;
	padding: 12px 14px;
	border-radius: 12px;
	background: rgba(239, 68, 68, .12);
	border: 1px solid rgba(239, 68, 68, .4);
	color: #FECACA !important;
	font-size: 13.5px;
	line-height: 1.45;
}
.pb2b-register-page .pb2b-form-alert-error[hidden] { display: none !important; }
.pb2b-register-page .pb2b-form-alert-error svg { flex: 0 0 auto; margin-top: 1px; color: #FCA5A5; }

/* =======================================================================
 * §3 — STAN ŁADOWANIA przycisku „Zarejestruj firmę".
 * ===================================================================== */
.pb2b-register-page .pb2b-btn-loading,
.phoenix-b2b-registration .pb2b-btn-loading {
	opacity: .72 !important;
	cursor: progress !important;
	pointer-events: none !important;
}

/* =======================================================================
 * §4 — CZYTELNOŚĆ PÓL (wzmocnienie; działanie > kosmetyka).
 *      Ciemne tło, jasny tekst, jasnoszary placeholder, autofill bez bieli.
 * ===================================================================== */
.pb2b-register-page .phoenix-b2b-form input[type="text"],
.pb2b-register-page .phoenix-b2b-form input[type="email"],
.pb2b-register-page .phoenix-b2b-form input[type="tel"],
.pb2b-register-page .phoenix-b2b-form input[type="password"],
.pb2b-register-page .phoenix-b2b-form input[type="number"],
.pb2b-register-page .phoenix-b2b-form select,
.pb2b-register-page .phoenix-b2b-form textarea {
	color: #F1F5F9 !important;
	-webkit-text-fill-color: #F1F5F9 !important;
	caret-color: #F1F5F9;
}
.pb2b-register-page .phoenix-b2b-form input::placeholder,
.pb2b-register-page .phoenix-b2b-form textarea::placeholder { color: #94A3B8 !important; opacity: 1; }

/* Kraj (select) — ciemne tło listy + jasny tekst. */
.pb2b-register-page .phoenix-b2b-form select { background-color: #0F172A !important; }
.pb2b-register-page .phoenix-b2b-form select option { background-color: #0F172A !important; color: #F1F5F9 !important; }

/* Autofill Safari/Chrome — bez białych pól. */
.pb2b-register-page .phoenix-b2b-form input:-webkit-autofill,
.pb2b-register-page .phoenix-b2b-form input:-webkit-autofill:hover,
.pb2b-register-page .phoenix-b2b-form input:-webkit-autofill:focus,
.pb2b-register-page .phoenix-b2b-form input:-webkit-autofill:active {
	-webkit-text-fill-color: #F1F5F9 !important;
	caret-color: #F1F5F9 !important;
	transition: background-color 9999s ease-in-out 0s !important;
	-webkit-box-shadow: 0 0 0 1000px #0F172A inset !important;
	box-shadow: 0 0 0 1000px #0F172A inset !important;
}

/* Zgoda regulaminowa — nie łam wyrazów (regul amin / prywatnoś ci). */
.pb2b-register-page .pb2b-consent-text {
	word-break: keep-all;
	overflow-wrap: normal;
	hyphens: none;
	-webkit-hyphens: none;
}
.pb2b-register-page .pb2b-consent-text a { color: #C4B5FD !important; text-decoration: underline; }
