/**
 * AutoPro Core — auth & dashboard components.
 * Scoped under .apc-auth / .apc-dashboard so Elementor globals are untouched.
 * Palette follows the site direction: red / white / black.
 */

:root {
	--apc-red: #e10600;
	--apc-red-dark: #b00500;
	--apc-black: #111111;
	--apc-white: #ffffff;
	--apc-border: #e3e3e3;
	--apc-muted: #6b6b6b;
	--apc-radius: 10px;
	/* Dark-surface tokens (Phase 22): defined at the dependency root so every
	   stylesheet and DevTools inspection sees them. Dark scopes re-declare
	   the same values; nothing changes visually, they were simply missing. */
	--apc-card: #171717;
	--apc-card-2: #121212;
	--apc-input-bg: #0e0e0e;
	--apc-text: #f5f5f5;
}

/* ---------- Shell ---------- */

.apc-auth {
	--apc-accent: var(--apc-red);
	display: flex;
	justify-content: center;
	width: 100%;
	font-family: inherit;
}

.apc-auth__card {
	background: var(--apc-white);
	border: 1px solid var(--apc-border);
	border-radius: var(--apc-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
	width: 100%;
	max-width: 440px;
	padding: 32px 28px;
	box-sizing: border-box;
}

.apc-auth__title {
	margin: 0 0 6px;
	font-size: 24px;
	line-height: 1.2;
	color: var(--apc-black);
	font-weight: 700;
}

.apc-auth__subtitle {
	margin: 0 0 20px;
	color: var(--apc-muted);
	font-size: 14px;
}

/* ---------- Messages ---------- */

.apc-auth__message {
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 14px;
	margin: 0 0 16px;
	border: 1px solid transparent;
}

.apc-auth__message--error {
	background: #fdecea;
	border-color: #f5c6c2;
	color: #8a1c12;
}

.apc-auth__message--success {
	background: #eaf7ee;
	border-color: #bfe3cb;
	color: #14522a;
}

/* ---------- Role tabs ---------- */

.apc-auth__roles {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin: 0 0 10px;
}

.apc-auth__role-tab {
	appearance: none;
	border: 2px solid var(--apc-border);
	background: var(--apc-white);
	color: var(--apc-black);
	border-radius: 8px;
	padding: 12px 10px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.apc-auth__role-tab:hover,
.apc-auth__role-tab:focus-visible {
	border-color: var(--apc-accent);
	outline: none;
}

.apc-auth__role-tab.is-active {
	border-color: var(--apc-accent);
	background: rgba(225, 6, 0, 0.06);
	color: var(--apc-black);
}

.apc-auth__role-hint {
	margin: 0 0 18px;
	font-size: 13px;
	color: var(--apc-muted);
	min-height: 1.2em;
}

/* ---------- Form ---------- */

.apc-auth__form {
	margin: 0;
}

.apc-auth__field {
	margin: 0 0 14px;
}

.apc-auth__field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--apc-black);
	margin-bottom: 6px;
}

.apc-auth__field input[type="text"],
.apc-auth__field input[type="email"],
.apc-auth__field input[type="password"] {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--apc-border);
	border-radius: 8px;
	font-size: 15px;
	background: var(--apc-input-bg, #121212);
	color: var(--apc-text, #f5f5f5);
	box-sizing: border-box;
}

.apc-auth__field input::placeholder {
	color: #9a9a9a;
}

.apc-auth__field input:focus {
	border-color: var(--apc-accent);
	outline: 2px solid rgba(225, 6, 0, 0.18);
	outline-offset: 1px;
}

.apc-auth__field--inline label {
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 400;
	font-size: 14px;
	color: var(--apc-muted);
}

.apc-auth__password-wrap {
	position: relative;
	display: block;
}

.apc-auth__password-toggle {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	padding: 6px 8px;
	font-size: 12px;
	font-weight: 600;
	color: var(--apc-muted);
	cursor: pointer;
}

.apc-auth__submit[class] {
	display: block;
	width: 100%;
	padding: 13px 16px;
	background: var(--apc-accent);
	color: var(--apc-white);
	border: 0;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}

.apc-auth__submit[class]:hover,
.apc-auth__submit[class]:focus-visible {
	background: var(--apc-red-dark);
	color: #171717;
	outline: none;
}

/* ---------- Honeypot (visually hidden, not display:none for bot realism) */

.apc-auth__hp {
	position: absolute !important;
	left: -9999px;
	height: 1px;
	width: 1px;
	overflow: hidden;
}

/* ---------- Footer links ---------- */

.apc-auth__switch {
	margin: 18px 0 0;
	font-size: 14px;
	color: var(--apc-muted);
	text-align: center;
}

.apc-auth__switch a {
	color: var(--apc-accent);
	font-weight: 600;
	text-decoration: none;
}

.apc-auth__switch a:hover {
	text-decoration: underline;
}

.apc-auth__text {
	font-size: 14px;
	color: var(--apc-muted);
}

.apc-auth__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 14px;
}

.apc-auth__button {
	display: inline-block;
	padding: 11px 18px;
	border-radius: 8px;
	background: var(--apc-accent);
	color: var(--apc-white);
	font-weight: 700;
	font-size: 14px;
	text-decoration: none;
}

.apc-auth__button--ghost {
	background: transparent;
	color: var(--apc-black);
	border: 2px solid var(--apc-black);
}

/* ---------- Dashboard placeholder ---------- */

.apc-dashboard {
	background: var(--apc-white);
	border: 1px solid var(--apc-border);
	border-radius: var(--apc-radius);
	padding: 28px;
}

.apc-dashboard__title {
	margin: 0 0 4px;
	color: var(--apc-black);
}

.apc-dashboard__role {
	margin: 0 0 14px;
	color: var(--apc-muted);
	font-size: 14px;
}

.apc-dashboard__hint {
	color: var(--apc-muted);
	font-size: 14px;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
	.apc-auth__card {
		padding: 24px 18px;
	}

	.apc-auth__roles {
		grid-template-columns: 1fr;
	}
}

/* ---------- Combined auth panel (dark, matches the site brand) ---------- */

.apc-auth--combined {
	--apc-red: #e10012;
	--apc-red-dark: #b8000f;
	--apc-card-bg: #171717;
	--apc-border: #363636;
	--apc-input-bg: #0e0e0e;
	--apc-text: #f5f5f5;
	--apc-muted: #f5f5f5bf;
}

.apc-auth--combined .apc-auth__card--combined {
	background: var(--apc-card-bg);
	border: 1px solid var(--apc-border);
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
	color: var(--apc-text);
	max-width: none;
	width: 100%;
}

/* Guest / verify gates stay compact even though the auth card is full-width. */

.apc-auth--gate .apc-auth__card--combined,
.apc-auth--verify .apc-auth__card--combined {
	max-width: 440px;
}

/* Panel tabs — active tab carries the brand red background */

.apc-auth--combined .apc-auth__tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 0 0 22px;
}

.apc-auth--combined .apc-auth__tab {
	appearance: none;
	border: 2px solid var(--apc-border);
	background: transparent;
	color: var(--apc-muted);
	border-radius: 8px;
	padding: 12px 10px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.apc-auth--combined .apc-auth__tab[class]:hover,
.apc-auth--combined .apc-auth__tab[class]:focus-visible {
	background: #ffffff;
	border-color: #ffffff;
	color: #000000;
	outline: none;
}

.apc-auth--combined .apc-auth__tab.is-active {
	background: var(--apc-red);
	border-color: var(--apc-red);
	color: #ffffff;
}

.apc-auth--combined [data-apc-panel][hidden] {
	display: none !important;
}

/* Headings & copy inside the dark card */

.apc-auth--combined .apc-auth__title {
	color: var(--apc-text);
	font-family: "Space Grotesk", var(--apc-black);
}

.apc-auth--combined .apc-auth__subtitle {
	color: var(--apc-muted);
}

/* Dark messages */

.apc-auth--combined .apc-auth__message--error {
	background: rgba(225, 0, 18, 0.12);
	border-color: rgba(225, 0, 18, 0.45);
	color: #ff9c9c;
}

.apc-auth--combined .apc-auth__message--success {
	background: rgba(0, 208, 132, 0.1);
	border-color: rgba(0, 208, 132, 0.35);
	color: #8fe3b4;
}

/* Role tabs — active also gets the red background */

.apc-auth--combined .apc-auth__role-tab {
	border-color: var(--apc-border);
	background: transparent;
	color: var(--apc-text);
}

.apc-auth--combined .apc-auth__role-tab:hover,
.apc-auth--combined .apc-auth__role-tab:focus-visible {
	border-color: var(--apc-red);
}

.apc-auth--combined .apc-auth__role-tab.is-active {
	background: var(--apc-red);
	border-color: var(--apc-red);
	color: #ffffff;
}

.apc-auth--combined .apc-auth__role-hint {
	margin: 10px 0 18px;
	font-size: 13px;
	color: var(--apc-muted);
}

/* ---------- OTP code boxes (verify + password reset) — one row, six columns, kit-immune ---------- */
.apc-otp[class] {
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	justify-content: center;
	align-items: stretch;
	width: 100%;
	margin: 0 0 18px;
}

.apc-otp__box[class] {
	flex: 1 1 0;
	width: auto;
	min-width: 0;
	max-width: 56px;
	height: 56px;
	padding: 0;
	margin: 0;
	text-align: center;
	font-size: 22px;
	font-weight: 700;
	line-height: 1;
	color: #ededed;
	background: #0e0e0e;
	border: 1px solid #363636;
	border-radius: 10px;
	outline: none;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.apc-otp__box[class]:focus {
	border-color: #e10012;
	box-shadow: 0 0 0 3px rgba(225, 0, 18, 0.25);
}

/* ---------- Forgot-password row + link-style button ---------- */
.apc-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.apc-auth__forgot {
	color: #a3a3a3;
	font-size: 13px;
	text-decoration: none;
}

.apc-auth__forgot:hover,
.apc-auth__forgot:focus {
	color: #fff;
}

.apc-auth__linkbtn[class] {
	background: none;
	border: 0;
	padding: 0;
	margin: 14px 0 0;
	color: #e10012;
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
	text-decoration: none;
}

/* ---------- Forgot-password wizard (3 steps) ---------- */
.apc-fp__badge {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #E10012;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 16px;
	box-shadow: 0 8px 24px rgba(225, 0, 18, 0.35);
}

.apc-fp__badge svg {
	width: 24px;
	height: 24px;
}

[data-apc-fp-step][hidden] {
	display: none !important;
}

.apc-fp__resend {
	margin-top: 14px;
}

.apc-fp__resend[class] {
	background: none;
	border: 0;
	padding: 0;
	color: #E10012;
	font: inherit;
	font-size: 13.5px;
	cursor: pointer;
}

.apc-fp__resend[class]:hover,
.apc-fp__resend[class]:focus {
	color: #ff1a2c;
	text-decoration: underline;
}

.apc-fp__reuse {
	margin: 0 0 16px;
	padding: 12px 14px;
	border: 1px dashed #363636;
	border-radius: 10px;
}


/* ---------- Password eye toggle (kit-immune: !important beats kit button rules) ---------- */
.apc-auth__password-toggle[class] {
	position: absolute !important;
	right: 10px !important;
	top: 50% !important;
	transform: translateY(-50%) !important;
	background: none !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 6px !important;
	margin: 0 !important;
	color: #a3a3a3 !important;
	cursor: pointer !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	line-height: 0;
}

.apc-auth__password-toggle[class]:hover,
.apc-auth__password-toggle[class]:focus {
	color: #ffffff !important;
}

.apc-auth__password-toggle .apc-eye {
	width: 20px;
	height: 20px;
}

.apc-auth__password-wrap {
	position: relative;
	display: block;
}

.apc-auth__password-wrap input[type="password"],
.apc-auth__password-wrap input[type="text"] {
	padding-right: 44px;
}

/* ---------- Inline signup verification box ---------- */
.apc-auth__verifybox {
	margin-top: 20px;
}

/* ---------- Inline SVG arrows ---------- */
.apc-arrow {
	vertical-align: -2px;
	margin-right: 4px;
}

/* ---------- Button busy spinner (every AJAX step) ---------- */
.apc-btn-busy[class] {
	position: relative;
	pointer-events: none;
	opacity: 0.8;
}

.apc-btn-busy[class]::after {
	content: "";
	display: inline-block;
	width: 13px;
	height: 13px;
	margin-left: 9px;
	vertical-align: -2px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: apc-spin 0.7s linear infinite;
}

@keyframes apc-spin {
	to {
		transform: rotate(360deg);
	}
}

.apc-fp__reuse legend {
	color: #a3a3a3;
	font-size: 12px;
	padding: 0 6px;
}

.apc-fp__reuse input {
	width: 100%;
	color: #ededed;
	background: #0e0e0e;
	border: 1px solid #363636;
	border-radius: 8px;
	padding: 10px 12px;
	letter-spacing: 4px;
	font-size: 18px;
}

.apc-auth__linkbtn[class]:hover,
.apc-auth__linkbtn[class]:focus {
	color: #ff1a2c;
	text-decoration: underline;
}

/* Fields */

.apc-auth--combined .apc-auth__field label {
	color: var(--apc-text);
}

.apc-auth--combined .apc-auth__field input[type="text"],
.apc-auth--combined .apc-auth__field input[type="email"],
.apc-auth--combined .apc-auth__field input[type="password"] {
	background: var(--apc-input-bg);
	border-color: var(--apc-border);
	color: var(--apc-text);
}

.apc-auth--combined .apc-auth__field input::placeholder {
	color: #6f6f6f;
}

.apc-auth--combined .apc-auth__field input:focus {
	border-color: var(--apc-red);
	outline: none;
	box-shadow: 0 0 0 3px rgba(225, 0, 18, 0.18);
}

.apc-auth--combined .apc-auth__field--inline label {
	color: var(--apc-muted);
}

.apc-auth--combined .apc-auth__field input[type="checkbox"] {
	accent-color: var(--apc-red);
	width: 16px;
	height: 16px;
}

.apc-auth--combined .apc-auth__hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: var(--apc-muted);
}

.apc-auth--combined .apc-auth__password-toggle {
	color: #8a8a8a;
}

.apc-auth--combined .apc-auth__submit {
	background: var(--apc-red);
	border-radius: 6px;
}

.apc-auth--combined .apc-auth__submit:hover,
.apc-auth--combined .apc-auth__submit:focus-visible {
	background: var(--apc-red-dark);
}

.apc-auth--combined .apc-auth__switch {
	color: var(--apc-muted);
}

.apc-auth--combined .apc-auth__switch a {
	color: var(--apc-red);
}

.apc-auth--combined .apc-auth__button--ghost {
	background: transparent;
	color: var(--apc-text);
	border: 2px solid var(--apc-border);
}

.apc-auth--combined .apc-auth__button--ghost:hover,
.apc-auth--combined .apc-auth__button--ghost:focus-visible {
	border-color: var(--apc-red);
	color: #ffffff;
}

@media (max-width: 600px) {
	.apc-auth--combined .apc-auth__card--combined {
		padding: 24px 18px;
	}
}

/* ===== Phase 18 — Elementor integration =====
   Doubled-ancestor rules (specificity 0,2,1) so the Elementor kit's global
   element rules (e.g. .elementor-kit-N input = 0,1,1) can never restyle
   plugin-rendered form controls, whichever stylesheet loads last. Values
   mirror each surface's base rules exactly — nothing new is introduced. */

/* Auth: dark card inputs (Phase 21 — was white, user corrected). */
.apc-auth .apc-auth__field input[type="text"],
.apc-auth .apc-auth__field input[type="email"],
.apc-auth .apc-auth__field input[type="password"] {
	width: 100% !important;
	padding: 11px 12px !important;
	background: var(--apc-input-bg, #121212) !important;
	color: var(--apc-text, #f5f5f5) !important;
	border: 1px solid var(--apc-border) !important;
	border-radius: 8px !important;
	font-size: 15px !important;
	box-sizing: border-box !important;
}

.apc-auth .apc-auth__field input:focus {
	border-color: var(--apc-accent) !important;
	outline: 2px solid rgba(225, 6, 0, 0.18) !important;
	outline-offset: 1px !important;
}

/* Account settings: dark fields. */
.apc-settings .apc-field input,
.apc-settings .apc-field select,
.apc-settings .apc-field textarea {
	width: 100% !important;
	padding: 12px 14px !important;
	background: var(--apc-input-bg) !important;
	color: var(--apc-text) !important;
	border: 1px solid #363636 !important;
	border-radius: 9px !important;
	font-family: inherit !important;
}

/* Messages: composer + conversation search. */
.apc-msgs .apc-composer textarea {
	width: auto !important;
	flex: 1 1 auto !important;
	min-width: 0 !important;
	height: 48px !important;
	min-height: 48px !important;
	max-height: 120px !important;
	background: var(--apc-card-2, #121212) !important;
	border: 1.5px solid var(--apc-border, #363636) !important;
	border-radius: 12px !important;
	color: var(--apc-text, #f5f5f5) !important;
	font-size: 13.5px !important;
}

.apc-msgs .apc-convsearch input {
	background: var(--apc-card-2, #121212) !important;
	border: 1.5px solid var(--apc-border, #363636) !important;
	border-radius: 10px !important;
	color: var(--apc-text, #f5f5f5) !important;
	font-size: 13px !important;
	padding: 9px 38px 9px 12px !important;
}

/* Jobs: filter bar selects + near control. */
.apc-jobs .apc-bfilters select,
.apc-jobs .apc-near__where {
	background: #0e0e0e !important;
	border: 1px solid #363636 !important;
	border-radius: 10px !important;
	color: var(--apc-text, #f5f5f5) !important;
	font-size: 13px !important;
}

.apc-jobs .apc-bfilters select {
	font-weight: 600 !important;
	padding: 10px 34px 10px 12px !important;
}

.apc-jobs .apc-near__where {
	padding: 10px 12px !important;
}

/* Auth: combined-panel tabs — hover/focus turns the tab white with black
   text (kit-proof, Phase 22 — user-corrected from the earlier black fill).
   Scoped to :not(.is-active) so the active red tab keeps its state while
   hovered. */
.apc-auth .apc-auth__tab[class]:hover:not(.is-active),
.apc-auth .apc-auth__tab[class]:focus-visible:not(.is-active) {
	background: #ffffff !important;
	border-color: #ffffff !important;
	color: #000000 !important;
}

