/*
 * Trade application — the form in ltb2b/trade-accounts/application-form.php.
 *
 * Loaded only on the page carrying [ltb2b_apply] (oaw_child_is_apply_page()).
 * Everything is scoped to .oaw-apply, so nothing here reaches Neve's header,
 * footer or any other page.
 *
 * The palette is a copy of lt-shop-tokens.css, which is the source of truth —
 * if a value changes there it has to change here. Declared on .oaw-apply
 * rather than relied on from oaw-content.css, so the form looks right whether
 * or not that stylesheet is on the page.
 */

.oaw-apply {
	--ground: #f4f6f9;
	--surface: #ffffff;
	--ink: #1d2a38;
	--ink-soft: #4c5b6d;
	--line: #dce3ec;
	--brand: #2f5aae;
	--deep: #132c54;
	--deep-2: #0e2140;
	--on-deep: #eef3fb;
	--on-deep-soft: #b9c8e2;
	--amber: #d98a2b;
	--amber-ink: #8a5410;
	--danger: #b42318;
	--danger-soft: #fdecea;
	--shadow: 0 1px 2px rgba(19, 44, 84, .06), 0 8px 24px rgba(19, 44, 84, .09);
	--display: "Fraunces", Georgia, serif;

	color: var(--ink);
	margin: 8px 0 48px;
}

.oaw-apply *,
.oaw-apply *::before,
.oaw-apply *::after {
	box-sizing: border-box;
}

.oaw-apply h2 {
	font-family: var(--display);
	font-weight: 600;
	line-height: 1.15;
	margin: 0;
}

.oaw-apply p {
	margin: 0;
}

.oaw-apply-eyebrow {
	font-size: 12.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--amber);
}

/* ---------- layout: the intro panel beside the form ---------- */

.oaw-apply-grid {
	display: grid;
	grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr);
	gap: 28px;
	align-items: start;
}

@media (max-width: 860px) {
	.oaw-apply-grid { grid-template-columns: 1fr; }
}

.oaw-apply-intro {
	background: var(--deep);
	color: var(--on-deep-soft);
	border-radius: 14px;
	padding: 28px 26px;
	position: sticky;
	top: calc(var(--oaw-header-h, 80px) + 20px);
}

@media (max-width: 860px) {
	.oaw-apply-intro { position: static; }
}

.oaw-apply-intro .oaw-apply-eyebrow {
	color: #ecc186;
}

.oaw-apply-intro h2 {
	color: #ffffff;
	font-size: clamp(24px, 2.6vw, 30px);
	margin: 10px 0 12px;
}

.oaw-apply-intro p {
	font-size: 15px;
	line-height: 1.6;
}

.oaw-apply-steps {
	list-style: none;
	counter-reset: oaw-step;
	margin: 22px 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.oaw-apply-steps li {
	counter-increment: oaw-step;
	position: relative;
	padding-left: 40px;
	font-size: 14.5px;
	line-height: 1.5;
}

.oaw-apply-steps li::before {
	content: counter(oaw-step);
	position: absolute;
	left: 0;
	top: -1px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	border: 2px solid var(--amber);
	color: #ffffff;
	font-weight: 700;
	font-size: 13px;
	display: grid;
	place-items: center;
}

.oaw-apply-steps strong {
	display: block;
	color: var(--on-deep);
}

.oaw-apply-login {
	border-top: 1px solid rgba(255, 255, 255, .14);
	padding-top: 16px;
}

.oaw-apply-intro a {
	color: #ffffff;
	font-weight: 700;
}

/* ---------- the form ---------- */

.oaw-apply-form {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	padding: 8px 28px 28px;
}

@media (max-width: 560px) {
	.oaw-apply-form { padding: 4px 18px 22px; }
}

.oaw-apply-form fieldset {
	border: 0;
	border-bottom: 1px solid var(--line);
	margin: 0;
	padding: 22px 0 24px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 18px;
	min-width: 0;
}

@media (max-width: 560px) {
	.oaw-apply-form fieldset { grid-template-columns: 1fr; }
}

/*
 * A legend cannot be a grid item, so it is floated out of the grid and given
 * the full width — the documented way to put one on its own row.
 */
.oaw-apply-form legend {
	float: left;
	width: 100%;
	grid-column: 1 / -1;
	padding: 0;
	margin-bottom: 2px;
	font-family: var(--display);
	font-weight: 600;
	font-size: 20px;
	color: var(--ink);
}

.oaw-apply-wide {
	grid-column: 1 / -1;
}

.oaw-apply-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.oaw-apply-field label {
	font-size: 14px;
	font-weight: 700;
	color: var(--ink);
}

.oaw-apply-field .req {
	color: var(--amber-ink);
}

.oaw-apply-field .opt {
	font-weight: 400;
	color: var(--ink-soft);
	font-size: 13px;
}

.oaw-apply-form input[type="text"],
.oaw-apply-form input[type="email"],
.oaw-apply-form input[type="tel"],
.oaw-apply-form input[type="number"],
.oaw-apply-form select,
.oaw-apply-form textarea {
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	font: inherit;
	font-size: 15.5px;
	color: var(--ink);
	background: var(--ground);
	border: 1.5px solid var(--line);
	border-radius: 9px;
	box-shadow: none;
	transition: border-color .15s, background-color .15s;
}

.oaw-apply-form textarea {
	resize: vertical;
	min-height: 110px;
}

.oaw-apply-form :is(input, select, textarea):focus {
	outline: none;
	border-color: var(--brand);
	background: var(--surface);
	box-shadow: 0 0 0 3px rgba(47, 90, 174, .15);
}

/* Red only once the visitor has typed something and moved on. */
.oaw-apply-form :is(input, select):user-invalid {
	border-color: var(--danger);
}

.oaw-apply-phone {
	display: flex;
	gap: 8px;
}

.oaw-apply-phone select {
	flex: 0 0 auto;
	width: auto !important;
}

.oaw-apply-phone input {
	flex: 1 1 auto;
	min-width: 0;
}

.oaw-apply-hint {
	font-size: 13px;
	color: var(--danger);
}

/* Beside the postcode box on a wide screen, under it on a phone. */
.oaw-apply-lookup {
	align-self: end;
	font-size: 13px;
	color: var(--ink-soft);
	padding-bottom: 12px;
}

@media (max-width: 560px) {
	.oaw-apply-lookup { padding-bottom: 0; }
}

.oaw-apply-check {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	font-size: 14.5px;
	color: var(--ink-soft);
	cursor: pointer;
}

.oaw-apply-check input {
	margin-top: 4px;
	width: 17px;
	height: 17px;
	accent-color: var(--brand);
	flex: 0 0 auto;
}

.oaw-apply-submit {
	padding-top: 24px;
}

/* 9px is the shop's button radius (.lt-st-backbtn, .lt-st-checkout). */
.oaw-apply-btn,
.oaw-apply-btn:visited {
	display: inline-block;
	background: var(--deep);
	color: #ffffff;
	border: 0;
	border-radius: 9px;
	padding: 13px 26px;
	font: inherit;
	font-size: 16px;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background-color .15s;
}

.oaw-apply-btn:hover,
.oaw-apply-btn:focus {
	background: var(--brand);
	color: #ffffff;
}

.oaw-apply :focus-visible {
	outline: 3px solid var(--amber);
	outline-offset: 2px;
}

/* ---------- messages ---------- */

.oaw-apply-errors {
	background: var(--danger-soft);
	border: 1px solid #f3c2bd;
	border-left: 4px solid var(--danger);
	border-radius: 9px;
	padding: 14px 18px;
	margin-bottom: 18px;
	color: var(--ink);
	font-size: 15px;
}

.oaw-apply-errors ul {
	margin: 6px 0 0 18px;
	padding: 0;
}

.oaw-apply-done {
	max-width: 640px;
	margin: 0 auto;
	text-align: center;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: 14px;
	box-shadow: var(--shadow);
	padding: 40px 32px;
	display: grid;
	gap: 14px;
}

.oaw-apply-done h2 {
	font-size: clamp(24px, 3vw, 30px);
}

.oaw-apply-done p {
	color: var(--ink-soft);
}
