/* ───────────────────────────────────────────────────────────────────────────
 * RNT — WooCommerce checkout: Person type (Private / Business) selector
 *
 * IMPORTANT — this file deliberately styles ONLY:
 *   • the custom pill selector (which has no WC equivalent), and
 *   • lightweight wrapper containers for the business panel / VAT row toggle.
 *
 * The fields themselves (company name, registration number, VAT, legal
 * address, and any admin-defined custom fields) are rendered with
 * woocommerce_form_field() so they inherit the active theme's checkout
 * styling. Do NOT add CSS for inputs / labels / .form-row / textareas /
 * checkboxes here — leave those to the theme.
 * ─────────────────────────────────────────────────────────────────────────── */

/* ── Section heading above the pill buttons ─────────────────────────────── */
.rnt-person-type {
	margin: 0 0 22px;
}

/* Improved Checkout: title lives in .ic-card-hd — pills only in card body */
.ic-card--person-type .rnt-person-type {
	margin-bottom: 0;
}

.rnt-person-type__title {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 10px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

.rnt-person-type__title .required {
	color: #dc2626;
	margin-left: 2px;
}

/* ── Pill selector ──────────────────────────────────────────────────────── */
/* The active pill uses the global site accent (set by RD_Site_Settings via
   --rd-site-accent on :root). Falls back to the original blue if the accent
   isn't defined, so the UI keeps working on sites that haven't picked one. */
.rnt-person-type {
	--rnt-pt-accent: var(--rd-site-accent, #1f73e8);
}

.rnt-person-type__choices {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 480px) {
	.rnt-person-type__choices { grid-template-columns: 1fr; }
}

.rnt-person-type__choice {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 56px;
	padding: 8px 16px;
	border: 1.5px solid #d3d8e0;
	border-radius: 10px;
	background: #fff;
	color: #1a1a2e;
	cursor: pointer;
	font-size: 15px;
	font-weight: 500;
	transition: all .18s ease;
	user-select: none;
}

.rnt-person-type__choice:hover {
	border-color: var(--rnt-pt-accent);
}

.rnt-person-type__choice input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
	width: 1px;
	height: 1px;
}

.rnt-person-type__choice.is-active {
	border-color: var(--rnt-pt-accent);
	background: var(--rnt-pt-accent);
	color: #fff;
}

.rnt-person-type__icon {
	display: inline-flex;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.rnt-person-type__label { line-height: 1.2; }

/* ── Business panel container ───────────────────────────────────────────── */
/* Just a thin wrapper to visually group the business fields and let JS
   toggle visibility. Fields inside keep WooCommerce / theme styling. */
.rnt-person-business {
	margin: 22px 0 6px;
	clear: both;
}

/* Improved Checkout: business fields live in their own step card */
.ic-card--business .rnt-person-business {
	margin: 0;
	clear: none;
}

.ic-card--business .rnt-person-business__title {
	display: none;
}

.rnt-person-business.is-hidden { display: none; }

.rnt-person-business__title {
	font-size: 14px;
	font-weight: 700;
	margin: 0 0 14px;
	text-transform: uppercase;
	letter-spacing: .04em;
}

/* VAT number row is toggled by the VAT-payer checkbox — purely visibility. */
.rnt-pt-vat-wrapper.is-hidden { display: none; }

/* Extras containers (private/business/both audiences). No field styling,
   just a wrapper to scope JS visibility toggles. */
.rnt-person-extras { display: block; }
.rnt-person-extras + .rnt-person-extras { margin-top: 0; }
