/* 5th Axis — "V2 RMA Form" (Formidable) custom styling.
 * Scoped entirely under #form_v2-rma-form (a stable ID Formidable derives
 * from the form_key, unlike the numeric field/container IDs which can
 * change on re-import) so nothing here leaks onto other Formidable forms
 * on the site. */

#form_v2-rma-form {
	--v2rma-accent: #dd2828;
	--v2rma-heading: #18181b;
	--v2rma-text: #6b6b6b;
	--v2rma-border: #d8d8d8;
}

#form_v2-rma-form .frm_fields_container {
	display: block;
}

/* ── Two-column layout ───────────────────────────────────────────────
   Section E + the submit message/button/legal notice get moved into a
   .v2rma-col--right wrapper by axis5th-v2-rma-form.js — Formidable
   renders every section as a flat sibling with its own fields nested
   inside it (confirmed from the live markup), so there's no existing
   wrapper element to grid a sidebar against without fighting CSS Grid's
   shared-row auto-placement (which creates gaps whenever the two
   columns' content heights don't line up 1:1 per row). Moving the
   sidebar content into its own container sidesteps that entirely. */

#form_v2-rma-form .v2rma-cols {
	display: grid;
	grid-template-columns: 1fr 360px;
	gap: 48px;
	align-items: start;
}

#form_v2-rma-form .v2rma-col--left {
	display: flex;
	flex-direction: column;
}

#form_v2-rma-form .v2rma-col--right {
	position: sticky;
	top: 24px;
	background: #fafafa;
	border: 1px solid var( --v2rma-border );
	padding: 28px;
	display: flex;
	flex-direction: column;
}

@media ( max-width: 900px ) {
	#form_v2-rma-form .v2rma-cols {
		grid-template-columns: 1fr;
	}

	#form_v2-rma-form .v2rma-col--right {
		position: static;
	}
}

/* ── Sections ─────────────────────────────────────────────────────── */

/* flex + wrap (not column) — the section's own <h3>/description AND its
   field divs are all flat children of this one element (Formidable nests
   a section's fields inside its own container, confirmed from the live
   markup), so this single flex context handles both the eyebrow/heading
   reordering below AND the frm_half side-by-side field pairing. */
#form_v2-rma-form .v2rma_section {
	display: flex;
	flex-wrap: wrap;
	column-gap: 24px;
	padding: 28px 0;
	border: 1px solid transparent; /* reserves space for the focus-within accent border, no layout shift */
}

#form_v2-rma-form .v2rma-col--left .v2rma_section {
	padding: 28px;
	border-color: var( --v2rma-border );
	margin-bottom: 24px;
}

#form_v2-rma-form .v2rma-col--left .v2rma_section:last-child {
	margin-bottom: 0;
}

/* Focus state — matches the reference design's highlighted "active"
   section: whichever section the user is currently filling in gets the
   accent border, driven purely by real focus, not JS. */
#form_v2-rma-form .v2rma-col--left .v2rma_section:focus-within {
	border-color: var( --v2rma-accent );
}

/* Formidable renders <h3> (title) BEFORE the description ("SECTION A")
   in the DOM — the design wants the small red eyebrow ABOVE the title,
   so flip the visual order without touching field order/markup. */
#form_v2-rma-form .v2rma_section > .frm_description {
	order: -1;
	font-size: 11px;
	font-weight: 700;
	/*letter-spacing: 0.14em;*/
	text-transform: uppercase;
	color: var( --v2rma-accent );
	margin: 0 0 6px;
}

#form_v2-rma-form .v2rma_section > h3.frm_pos_top {
	font-size: var(--e-global-typography-69291f2-font-size) !important;
	font-weight: 600 !important;
	color: var( --e-global-color-accent ) !important;
	margin: 0 0 20px !important;
	line-height: 1.25 !important;
}

/* ── Fields ───────────────────────────────────────────────────────── */

#form_v2-rma-form .frm_form_field.form-field {
	margin-bottom: 18px;
}

#form_v2-rma-form .frm_form_field.form-field:last-child {
	margin-bottom: 0;
}

/* frm_half/frm_first pairs need to sit side by side — Formidable ships
   this as a float-based layout in its own base CSS; force flex-basis
   instead so both fields in a pair stay equal height regardless of
   theme resets. The section's own title/description also need to be
   full-width so they each get their own line within that same flex
   context (see the .v2rma_section rule above). */
#form_v2-rma-form .v2rma_section > .frm_description,
#form_v2-rma-form .v2rma_section > h3.frm_pos_top,
#form_v2-rma-form .frm_form_field.frm_full {
	flex: 0 0 100%;
}

#form_v2-rma-form .frm_form_field.frm_half {
	flex: 1 1 calc( 50% - 12px );
	min-width: 200px;
}

#form_v2-rma-form .frm_primary_label {
	display: block;
	font-size: 11px;
	font-weight: 700;
	/*letter-spacing: 0.06em;*/
	text-transform: uppercase;
	color: var( --v2rma-heading );
	margin-bottom: 8px;
}

#form_v2-rma-form .frm_required {
	color: var( --v2rma-accent );
}

#form_v2-rma-form input[type='text'],
#form_v2-rma-form input[type='email'],
#form_v2-rma-form input[type='tel'],
#form_v2-rma-form textarea {
	width: 100%;
	border: 1px solid var( --v2rma-border );
	background: #ffffff;
	padding: 12px 14px;
	font-size: 14px;
	color: var( --v2rma-heading );
	box-sizing: border-box;
}

#form_v2-rma-form input:focus,
#form_v2-rma-form textarea:focus {
	outline: none;
	border-color: var( --v2rma-accent );
}

#form_v2-rma-form input::placeholder,
#form_v2-rma-form textarea::placeholder {
	color: #a3a3a3;
}

#form_v2-rma-form textarea {
	resize: vertical;
	min-height: 110px;
}

/* ── Radio groups ─────────────────────────────────────────────────── */

#form_v2-rma-form .frm_opt_container {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

#form_v2-rma-form .frm_radio {
	border: 1px solid var( --v2rma-border );
	padding: 12px 14px;
}

#form_v2-rma-form .frm_radio label {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var( --v2rma-heading );
	cursor: pointer;
	margin: 0;
}

#form_v2-rma-form .frm_radio input[type='radio'] {
	margin: 0;
}

/* Reason for Returning — 2-column grid of boxed options */
#form_v2-rma-form .v2rma_reason_grid .frm_opt_container {
	display: grid;
	grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
	gap: 12px;
}

/* Is this a repair? / Reviewed packaging? — Yes/No side by side */
#form_v2-rma-form .v2rma_inline_options .frm_opt_container {
	display: flex;
	flex-direction: row;
	gap: 12px;
}

#form_v2-rma-form .v2rma_inline_options .frm_radio {
	flex: 1 1 0;
}

@media ( max-width: 480px ) {
	#form_v2-rma-form .v2rma_reason_grid .frm_opt_container {
		grid-template-columns: 1fr;
	}
}

/* ── Conditional "Please specify reason" field ───────────────────── */

#form_v2-rma-form .frm_form_field:has(#field_v2rma_reason_other) {
	margin-top: -6px;
}

/* ── Sidebar: submit message, button, legal notice ───────────────── */

#form_v2-rma-form .v2rma-col--right .v2rma_section {
	border: none;
	padding: 0 0 20px;
}

#form_v2-rma-form .v2rma_submit_msg {
	font-size: 13px;
	color: var( --v2rma-text );
	margin: 4px 0 20px;
}

#form_v2-rma-form .frm_submit {
	display: block;
}

#form_v2-rma-form .frm_button_submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var( --v2rma-accent ) !important;
	color: #ffffff !important;
	border: none !important;
	padding: 14px 28px !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: opacity 0.15s ease !important;
}

#form_v2-rma-form .frm_button_submit::after {
	content: '\2192';
}

#form_v2-rma-form .frm_button_submit:hover {
	opacity: 0.9;
}

#form_v2-rma-form .frm_html_container:not( .v2rma_submit_msg ) {
	margin-top: 16px;
	font-size: 12px;
	line-height: 1.6;
	color: var( --v2rma-text );
}

#form_v2-rma-form .frm_html_container:not( .v2rma_submit_msg ) a {
	color: var( --v2rma-accent );
	text-decoration: underline;
}

/* Honeypot / anti-spam field — Formidable already hides this from real
   users via its own CSS, this just guarantees it regardless of theme
   resets. */
#form_v2-rma-form .frm_verify {
	position: absolute !important;
	left: -9999px !important;
}
