/**
 * Belle Nove Affiliate System — public signup form ([bas_affiliate_signup]).
 *
 * Premium beauty aesthetic. Uses the Belle Nove theme tokens when present
 * (--be-gold, --be-cream, …) and falls back to literal rose/mauve values so it
 * still looks luxe on any theme. Mobile-first, framework-free.
 */

.bas-signup {
	--bas-gold: var(--be-gold, #c47189);
	--bas-gold-dark: var(--be-gold-dark, #8b3e57);
	--bas-blush: var(--be-leaf-soft, #f2c8d0);
	--bas-cream: var(--be-cream, #fce5e3);
	--bas-bg: var(--be-bg, #fdf6f3);
	--bas-ink: var(--be-ink, #2a1820);
	--bas-muted: var(--be-muted, #8a6c75);
	--bas-line: var(--be-line, #f1dee2);
	--bas-surface: var(--be-surface, #fff);
	--bas-serif: var(--be-serif, "Cormorant Garamond", Georgia, serif);
	--bas-sans: var(--be-sans, "Montserrat", -apple-system, "Segoe UI", sans-serif);
	--bas-radius: var(--be-radius-lg, 14px);
	--bas-ease: var(--be-ease, cubic-bezier(.22, .61, .36, 1));
	--bas-shadow: var(--be-shadow-lg, 0 24px 64px rgba(42, 24, 32, 0.12));

	font-family: var(--bas-sans);
	color: var(--bas-ink);
	max-width: 1040px;
	margin: clamp(1.5rem, 5vw, 3.5rem) auto;
	padding-inline: clamp(1rem, 4vw, 1.5rem);
	box-sizing: border-box;
}
.bas-signup *, .bas-signup *::before, .bas-signup *::after { box-sizing: border-box; }

/* ------------------------------- Card shell ------------------------------ */
.bas-signup__card {
	display: grid;
	grid-template-columns: 1fr;
	background: var(--bas-surface);
	border: 1px solid var(--bas-line);
	border-radius: var(--bas-radius);
	overflow: hidden;
	box-shadow: var(--bas-shadow);
}
@media (min-width: 860px) {
	.bas-signup__card { grid-template-columns: 0.85fr 1.15fr; }
}

/* --------------------------------- Aside --------------------------------- */
.bas-signup__aside {
	position: relative;
	overflow: hidden;
	color: #fff;
	background: linear-gradient(150deg, var(--bas-gold-dark) 0%, var(--bas-gold) 55%, #d4889d 100%);
	padding: clamp(2rem, 5vw, 3.25rem);
	display: flex;
	align-items: flex-end;
}
.bas-signup__aside::before {
	content: "";
	position: absolute; inset: 0; pointer-events: none;
	background:
		radial-gradient(45% 40% at 80% 12%, rgba(255, 255, 255, .25) 0%, transparent 60%),
		radial-gradient(50% 45% at 10% 95%, rgba(26, 14, 20, .22) 0%, transparent 60%);
}
.bas-signup__aside-inner { position: relative; z-index: 1; }
.bas-signup__eyebrow {
	margin: 0 0 1rem;
	font-size: .7rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
	color: rgba(255, 255, 255, .85);
}
.bas-signup__aside-title {
	font-family: var(--bas-serif);
	font-weight: 500;
	font-size: clamp(1.7rem, 3.4vw, 2.5rem);
	line-height: 1.1;
	margin: 0 0 1.5rem;
}
.bas-signup__perks { list-style: none; margin: 0; padding: 0; display: grid; gap: .85rem; }
.bas-signup__perks li {
	position: relative; padding-left: 1.75rem;
	font-size: .92rem; line-height: 1.4; color: rgba(255, 255, 255, .92);
}
.bas-signup__perks li::before {
	content: ""; position: absolute; left: 0; top: 2px;
	width: 18px; height: 18px; border-radius: 50%;
	background: rgba(255, 255, 255, .2)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* --------------------------------- Main ---------------------------------- */
.bas-signup__main { padding: clamp(1.75rem, 4vw, 3rem); }
.bas-signup__title {
	font-family: var(--bas-serif);
	font-weight: 500;
	font-size: clamp(1.6rem, 4vw, 2.4rem);
	line-height: 1.1;
	margin: 0 0 .4rem;
	color: var(--bas-ink);
}
.bas-signup__sub { margin: 0 0 1.75rem; color: var(--bas-muted); font-size: .95rem; }

/* --------------------------------- Alerts -------------------------------- */
.bas-signup__alert {
	border-radius: 10px;
	padding: .9rem 1.1rem;
	margin-bottom: 1.5rem;
	font-size: .9rem;
}
.bas-signup__alert--error {
	background: #fbe4e8;
	border: 1px solid #f3b8c4;
	color: #8c1d33;
}
.bas-signup__alert ul { margin: 0; padding-left: 1.1rem; display: grid; gap: .3rem; }

/* --------------------------------- Fields -------------------------------- */
.bas-field { margin-bottom: 1.15rem; min-width: 0; border: 0; padding: 0; }
.bas-field > label,
.bas-field > legend {
	display: block;
	font-size: .8rem; font-weight: 600; letter-spacing: .02em;
	color: var(--bas-ink);
	margin-bottom: .4rem;
}
.bas-req { color: var(--bas-gold-dark); }
.bas-opt { color: var(--bas-muted); font-weight: 400; font-size: .76rem; }

.bas-field input {
	width: 100%;
	font-family: var(--bas-sans);
	font-size: .95rem;
	color: var(--bas-ink);
	background: var(--bas-bg);
	border: 1px solid var(--bas-line);
	border-radius: 10px;
	padding: .8rem .95rem;
	transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.bas-field input::placeholder { color: #c4abb2; }
.bas-field input:focus {
	outline: none;
	background: #fff;
	border-color: var(--bas-gold);
	box-shadow: 0 0 0 3px rgba(196, 113, 137, .15);
}
.bas-field.has-error input { border-color: #e0607a; background: #fdf2f4; }
.bas-field.has-error input:focus { box-shadow: 0 0 0 3px rgba(224, 96, 122, .18); }

.bas-field__err {
	display: none;
	margin-top: .35rem;
	font-size: .78rem;
	color: #c0314b;
}
.bas-field.has-error .bas-field__err { display: block; }

/* Two-up rows that stack on mobile */
.bas-field-row { display: grid; grid-template-columns: 1fr; gap: 0 1.1rem; }
@media (min-width: 560px) {
	.bas-field-row { grid-template-columns: 1fr 1fr; }
	.bas-field-row--wrap { grid-template-columns: 1fr 1fr; }
}

/* Password input + visibility toggle */
.bas-input-wrap { position: relative; }
.bas-input-wrap input { padding-right: 2.85rem; }
.bas-signup__toggle {
	position: absolute; right: .5rem; top: 50%; transform: translateY(-50%);
	display: inline-flex; align-items: center; justify-content: center;
	width: 2rem; height: 2rem;
	background: none; border: 0; cursor: pointer;
	color: var(--bas-muted);
	border-radius: 8px;
	transition: color .2s ease, background .2s ease;
}
.bas-signup__toggle:hover { color: var(--bas-gold-dark); background: var(--bas-cream); }
.bas-signup__toggle.is-on { color: var(--bas-gold-dark); }

/* Password strength meter */
.bas-strength { display: flex; align-items: center; gap: 4px; margin-top: .55rem; }
.bas-strength span {
	height: 4px; flex: 1; border-radius: 2px; background: var(--bas-line);
	transition: background .3s var(--bas-ease);
}
.bas-strength__label { flex: 0 0 auto; margin-left: .4rem; font-size: .72rem; font-style: normal; color: var(--bas-muted); min-width: 3.5em; }
.bas-strength[data-level="1"] span:nth-child(1) { background: #e0607a; }
.bas-strength[data-level="2"] span:nth-child(-n+2) { background: #e6a23c; }
.bas-strength[data-level="3"] span:nth-child(-n+3) { background: #c9a23a; }
.bas-strength[data-level="4"] span { background: #3fa46a; }

/* Social fieldset */
.bas-signup__social { border-top: 1px solid var(--bas-line); padding-top: 1.25rem; margin-top: .25rem; }

/* Honeypot — visually hidden but reachable by bots */
.bas-signup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Helper note */
.bas-signup__note {
	display: flex; align-items: center; gap: .55rem;
	font-size: .82rem; color: var(--bas-muted);
	background: var(--bas-bg);
	border: 1px dashed var(--bas-line);
	border-radius: 10px;
	padding: .7rem .9rem;
	margin: .5rem 0 1.5rem;
}
.bas-signup__note svg { color: var(--bas-gold); flex-shrink: 0; }

/* Submit */
.bas-signup__submit {
	display: inline-flex; align-items: center; justify-content: center;
	width: 100%;
	font-family: var(--bas-sans);
	font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
	color: #fff;
	background: var(--bas-gold);
	border: 1px solid var(--bas-gold);
	border-radius: 999px;
	padding: 1rem 1.5rem;
	cursor: pointer;
	text-decoration: none;
	transition: background .25s ease, border-color .25s ease, transform .2s var(--bas-ease);
}
.bas-signup__submit:hover { background: var(--bas-gold-dark); border-color: var(--bas-gold-dark); color: #fff; transform: translateY(-1px); }
.bas-signup__submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.bas-signup__submit--inline { width: auto; margin-top: 1.5rem; }

.bas-signup__login { text-align: center; margin: 1.25rem 0 0; font-size: .88rem; color: var(--bas-muted); }
.bas-signup__login a { color: var(--bas-gold-dark); font-weight: 600; }

/* -------------------------------- Success -------------------------------- */
.bas-signup__success {
	text-align: center;
	background: var(--bas-surface);
	border: 1px solid var(--bas-line);
	border-radius: var(--bas-radius);
	box-shadow: var(--bas-shadow);
	padding: clamp(2.25rem, 6vw, 3.75rem) clamp(1.5rem, 5vw, 3rem);
	max-width: 600px;
	margin-inline: auto;
}
.bas-signup__success-icon {
	display: inline-flex; align-items: center; justify-content: center;
	width: 64px; height: 64px; margin-bottom: 1.25rem;
	color: #fff; border-radius: 50%;
	background: linear-gradient(135deg, var(--bas-gold-dark), var(--bas-gold));
}
.bas-signup__success h2 { font-family: var(--bas-serif); font-weight: 500; font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .75rem; color: var(--bas-ink); }
.bas-signup__success p { color: var(--bas-muted); line-height: 1.65; margin: 0 auto 1.5rem; max-width: 440px; }

.bas-signup__code {
	display: inline-flex; flex-direction: column; gap: .35rem; align-items: center;
	background: var(--bas-cream);
	border-radius: 12px;
	padding: 1rem 2rem;
	margin-bottom: 1.25rem;
}
.bas-signup__code-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bas-gold-dark); }
.bas-signup__code code { font-family: monospace; font-size: 1.4rem; font-weight: 700; color: var(--bas-ink); letter-spacing: .05em; }

.bas-signup__link { display: flex; gap: .5rem; max-width: 440px; margin: 0 auto; }
.bas-signup__link input {
	flex: 1; min-width: 0;
	font-family: monospace; font-size: .82rem; color: var(--bas-ink);
	background: var(--bas-bg);
	border: 1px solid var(--bas-line);
	border-radius: 10px;
	padding: .7rem .85rem;
}
.bas-copy {
	flex-shrink: 0;
	font-family: var(--bas-sans); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
	color: #fff; background: var(--bas-gold); border: 1px solid var(--bas-gold);
	border-radius: 10px; padding: 0 1.1rem; cursor: pointer;
	transition: background .2s ease;
}
.bas-copy:hover { background: var(--bas-gold-dark); border-color: var(--bas-gold-dark); }
.bas-copy.is-copied { background: #3fa46a; border-color: #3fa46a; }
