/* RISYS storefront sign-in (T-0173). Loaded only on the auth pages and the My Account dashboard.
 * Selectors start with `html body #brx-content` so they beat the rwc-authform global class (1,1,1)-(1,3,1)
 * without !important; Bricks element ids stay editable because nothing here styles an element id. */

/* ============================================================ video panel (replaces the navy brand panel) */

html body #brx-content .rwc-authform .rwc-authvis.rwc-authvis--media {
	position: relative;
	display: block;
	min-block-size: 0;
	padding: 0;
	overflow: hidden;
	isolation: isolate;
	background: #0a1240;
	border-radius: var(--rwc-radius-card, 16px);
}

html body #brx-content .rwc-authvis--media > * {
	position: static;
}

html body #brx-content .rsa-media {
	position: absolute;
	inset: 0;
	color: #fff;
}

html body #brx-content .rsa-media__poster,
html body #brx-content .rsa-media__poster img,
html body #brx-content .rsa-media__video {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	object-position: center;
	margin: 0;
}

html body #brx-content .rsa-media__video {
	opacity: 0;
	transition: opacity 0.6s ease;
}

html body #brx-content .rsa-media__video.is-playing {
	opacity: 1;
}

html body #brx-content .rsa-media__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(0deg, rgb(4 10 38 / 94%) 0%, rgb(4 10 38 / 74%) 42%, rgb(4 10 38 / 22%) 72%, rgb(4 10 38 / 0%) 100%),
		linear-gradient(135deg, rgb(2 32 158 / 35%) 0%, rgb(2 32 158 / 0%) 55%);
}

html body #brx-content .rsa-media__copy {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 40px 40px 36px;
}

html body #brx-content .rsa-media__eyebrow {
	margin: 0;
	color: #7ff0c3;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.4;
}

html body #brx-content .rsa-media__title {
	margin: 0;
	max-inline-size: 22ch;
	color: #fff;
	font-family: var(--rwc-font-heading, inherit);
	font-size: clamp(26px, 2.5vw, 36px);
	font-weight: 700;
	line-height: 1.22;
	text-wrap: balance;
	text-shadow: 0 1px 14px rgb(0 0 0 / 45%);
}

html body #brx-content .rsa-media__sub {
	margin: 0;
	max-inline-size: 46ch;
	color: rgb(255 255 255 / 86%);
	font-size: 16px;
	line-height: 1.7;
}

html body #brx-content .rsa-media__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

html body #brx-content .rsa-media__chips li {
	margin: 0;
	padding: 6px 12px;
	border: 1px solid rgb(255 255 255 / 28%);
	border-radius: 999px;
	color: #fff;
	background: rgb(255 255 255 / 10%);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.4;
	backdrop-filter: blur(6px);
}

/* Desktop: the video sits on the right in both languages (brief), equal height to the form card (grid stretch). */
@media (min-width: 992px) {
	html[dir="rtl"] body #brx-content .rwc-authform .rwc-authvis.rwc-authvis--media {
		order: -1;
	}

	html body #brx-content .rwc-authform .rwc-authvis.rwc-authvis--media {
		align-self: stretch;
		min-block-size: 560px;
	}
}

/* Tablet / phone: form first, a short band below it. Phones get the poster only (no video bytes, see <source media>). */
@media (max-width: 991px) {
	html body #brx-content .rwc-authform .rwc-authvis.rwc-authvis--media {
		order: 0;
		block-size: 240px;
		min-block-size: 0;
		padding: 0;
	}

	html body #brx-content .rsa-media__shade {
		background: linear-gradient(0deg, rgb(4 10 38 / 94%) 0%, rgb(4 10 38 / 82%) 55%, rgb(4 10 38 / 66%) 100%);
	}

	html body #brx-content .rsa-media__copy {
		padding: 22px 24px;
		gap: 8px;
	}

	html body #brx-content .rsa-media__title {
		font-size: 22px;
	}

	html body #brx-content .rsa-media__sub {
		font-size: 14px;
		line-height: 1.6;
	}
}

@media (max-width: 600px) {
	html body #brx-content .rwc-authform .rwc-authvis.rwc-authvis--media {
		block-size: 190px;
		border-radius: var(--rwc-radius-input, 12px);
	}

	html body #brx-content .rsa-media__sub,
	html body #brx-content .rsa-media__chips {
		display: none;
	}
}

/* ============================================================ methods: phone OTP, Google, password toggle */

html body #brx-content .rsa {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 4px 0 18px;
}

html body #brx-content .rsa [hidden] {
	display: none;
}

html body #brx-content .rsa-otp,
html body #brx-content .rsa-step {
	display: flex;
	flex-direction: column;
	gap: 0;
}

html body #brx-content .rsa-step[hidden] {
	display: none;
}

html body #brx-content .rsa-label {
	display: block;
	margin: 12px 0 6px;
	padding: 0;
	color: var(--rwc-heading, #0b1a4a);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
}

html body #brx-content .rsa-step > .rsa-label:first-child,
html body #brx-content .rsa-step > .rsa-sent + .rsa-label {
	margin-block-start: 0;
}

html body #brx-content .rsa-hint {
	margin: 6px 0 0;
	color: var(--rwc-support, #5a6480);
	font-size: 13px;
	line-height: 1.6;
}

html body #brx-content .rsa-title {
	margin: 0;
	color: var(--rwc-heading, #0b1a4a);
	font-family: var(--rwc-font-heading, inherit);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

html body #brx-content .rsa .rsa-input,
html body #brx-content .rsa-card .rsa-input {
	box-sizing: border-box;
	inline-size: 100%;
	min-inline-size: 0;
	min-block-size: 50px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--rwc-border, #d5dae6);
	border-radius: var(--rwc-radius-input, 12px);
	color: var(--rwc-heading, #0b1a4a);
	background: var(--rwc-surface, #fff);
	font-family: var(--rwc-font-body, inherit);
	font-size: 16px;
	line-height: 1.5;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html body #brx-content .rsa .rsa-input:focus,
html body #brx-content .rsa-card .rsa-input:focus {
	border-color: var(--rwc-brand, #02209e);
	outline: 0;
	box-shadow: 0 0 0 3px rgb(2 32 158 / 18%);
}

html body #brx-content .rsa .rsa-input[aria-invalid="true"] {
	border-color: var(--rwc-danger-ink, #b91c1c);
}

html body #brx-content .rsa-phone {
	display: flex;
	align-items: stretch;
	direction: ltr;
	overflow: hidden;
	border: 1px solid var(--rwc-border, #d5dae6);
	border-radius: var(--rwc-radius-input, 12px);
	background: var(--rwc-surface, #fff);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html body #brx-content .rsa-phone:focus-within {
	border-color: var(--rwc-brand, #02209e);
	box-shadow: 0 0 0 3px rgb(2 32 158 / 18%);
}

html body #brx-content .rsa-phone__cc {
	display: flex;
	align-items: center;
	padding-inline: 14px;
	border-inline-end: 1px solid var(--rwc-border, #d5dae6);
	color: var(--rwc-heading, #0b1a4a);
	background: var(--rwc-muted, #f4f6fb);
	font-size: 16px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

html body #brx-content .rsa .rsa-phone .rsa-input,
html body #brx-content .rsa-card .rsa-phone .rsa-input {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-align: left;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0.02em;
}

html body #brx-content .rsa-channel {
	margin: 0;
	padding: 0;
	border: 0;
	min-inline-size: 0;
}

html body #brx-content .rsa-seg {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

html body #brx-content .rsa-seg__opt {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

html body #brx-content .rsa-seg__opt input {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

html body #brx-content .rsa-seg__opt span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-block-size: 46px;
	padding: 8px 12px;
	border: 1px solid var(--rwc-border, #d5dae6);
	border-radius: var(--rwc-radius-input, 12px);
	color: var(--rwc-text, #2a3350);
	background: var(--rwc-surface, #fff);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

html body #brx-content .rsa-seg__opt:hover span {
	border-color: var(--rwc-brand, #02209e);
}

html body #brx-content .rsa-seg__opt input:checked + span {
	border-color: var(--rwc-brand, #02209e);
	color: var(--rwc-brand, #02209e);
	background: rgb(2 32 158 / 6%);
	box-shadow: inset 0 0 0 1px var(--rwc-brand, #02209e);
}

html body #brx-content .rsa-seg__opt--whatsapp input:checked + span svg {
	color: #0f7a3d;
}

html body #brx-content .rsa-seg__opt input:focus-visible + span {
	outline: 3px solid var(--rwc-brand, #02209e);
	outline-offset: 2px;
}

html body #brx-content .rsa-ts:empty {
	display: none;
}

html body #brx-content .rsa-ts {
	margin-block-start: 10px;
}

html body #brx-content .rsa-btn,
html body #brx-content .rsa-google {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	inline-size: 100%;
	min-block-size: 50px;
	margin: 16px 0 0;
	padding: 12px 20px;
	border-radius: var(--rwc-radius-button, 12px);
	font-family: var(--rwc-font-heading, inherit);
	font-size: 16px;
	font-weight: 700;
	line-height: 1.35;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

html body #brx-content .rsa-btn {
	border: 1px solid var(--rwc-brand, #02209e);
	color: #fff;
	background: var(--rwc-brand, #02209e);
}

html body #brx-content .rsa-btn:hover {
	background: color-mix(in srgb, var(--rwc-brand, #02209e) 86%, #000);
}

html body #brx-content .rsa-btn:focus-visible,
html body #brx-content .rsa-google:focus-visible,
html body #brx-content .rsa-link:focus-visible,
html body #brx-content .rsa-pwtoggle:focus-visible {
	outline: 3px solid var(--rwc-brand, #02209e);
	outline-offset: 2px;
}

html body #brx-content .rsa-btn[aria-busy="true"] {
	cursor: progress;
	opacity: 0.85;
}

html body #brx-content .rsa-btn[aria-busy="true"]::before {
	content: "";
	inline-size: 16px;
	block-size: 16px;
	border: 2px solid rgb(255 255 255 / 45%);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rsa-spin 0.7s linear infinite;
}

@keyframes rsa-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	html body #brx-content .rsa-btn[aria-busy="true"]::before {
		animation-duration: 2s;
	}
}

html body #brx-content .rsa-google {
	margin-block-start: 0;
	border: 1px solid var(--rwc-border, #d5dae6);
	color: var(--rwc-heading, #0b1a4a);
	background: var(--rwc-surface, #fff);
}

html body #brx-content .rsa-google:hover {
	border-color: var(--rwc-brand, #02209e);
	background: var(--rwc-muted, #f4f6fb);
}

html body #brx-content .rsa-or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 4px 0;
	color: var(--rwc-support, #5a6480);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

html body #brx-content .rsa-or::before,
html body #brx-content .rsa-or::after {
	content: "";
	flex: 1 1 0;
	block-size: 1px;
	background: var(--rwc-border, #d5dae6);
}

html body #brx-content .rsa-pwtoggle,
html body #brx-content .rsa-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-block-size: 44px;
	margin: 0;
	padding: 0 4px;
	border: 0;
	color: var(--rwc-brand, #02209e);
	background: transparent;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

html body #brx-content .rsa-pwtoggle {
	align-self: center;
}

html body #brx-content .rsa-sent {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: var(--rwc-radius-input, 12px);
	color: var(--rwc-heading, #0b1a4a);
	background: var(--rwc-muted, #f4f6fb);
	font-size: 14px;
	line-height: 1.6;
}

html body #brx-content .rsa .rsa-code,
html body #brx-content .rsa-card .rsa-code {
	font-size: 24px;
	font-weight: 700;
	letter-spacing: 0.45em;
	text-align: center;
	text-indent: 0.45em;
	font-variant-numeric: tabular-nums;
}

html body #brx-content .rsa-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 4px 12px;
	margin-block-start: 8px;
}

html body #brx-content .rsa-resend {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 12px;
	color: var(--rwc-support, #5a6480);
	font-size: 14px;
	font-variant-numeric: tabular-nums;
}

html body #brx-content .rsa-alert {
	margin: 0;
	padding: 12px 16px;
	border: 1px solid var(--rwc-border, #d5dae6);
	border-inline-start: 4px solid var(--rwc-danger, #dc2626);
	border-radius: var(--rwc-radius-input, 12px);
	color: var(--rwc-danger-ink, #b91c1c);
	background: var(--rwc-surface, #fff);
	font-size: 14px;
	line-height: 1.6;
}

html body #brx-content .rsa-status {
	margin: 10px 0 0;
	font-size: 14px;
	line-height: 1.6;
}

html body #brx-content .rsa-status:empty {
	display: none;
}

html body #brx-content .rsa-status.is-ok {
	padding: 12px 16px;
	border-inline-start: 4px solid var(--rwc-success, #16a34a);
	border-radius: var(--rwc-radius-input, 12px);
	color: var(--rwc-success-ink, #0f7950);
	background: rgb(22 163 74 / 7%);
}

/* OTP on: the Woo password forms move behind "Use email and password instead". JS adds .rsa-on, so no-JS keeps the forms. */
html body #brx-content .rwc-authcard.rsa-on:not(.rsa-pw) .rwc-authtabs,
html body #brx-content .rwc-authcard.rsa-on:not(.rsa-pw) .rwc-authpane {
	display: none;
}

html body #brx-content .rwc-authcard.rsa-on.rsa-pw .rsa-otp,
html body #brx-content .rwc-authcard.rsa-on.rsa-pw .rsa-or,
html body #brx-content .rwc-authcard.rsa-on.rsa-pw .rsa-google {
	display: none;
}

html body #brx-content .rwc-authcard.rsa-on.rsa-pw .rsa {
	margin-block-end: 6px;
}

/* My Account dashboard card */
html body #brx-content .rsa-card,
html body .rsa-card {
	box-sizing: border-box;
	max-inline-size: 520px;
	margin: 0 0 24px;
	padding: 20px;
	border: 1px solid var(--rwc-border, #d5dae6);
	border-radius: var(--rwc-radius-card, 16px);
	background: var(--rwc-surface, #fff);
}

html body .rsa-card .rsa-otp {
	margin-block-start: 12px;
}

/* T-0180 (Amr 2026-11-19): video panel two thirds, form card one third on desktop; title / intro spacing.
 * RTL: the panel sits in the first (rightmost) track because of order -1, so the track sizes are mirrored there. */
@media (min-width: 992px) {
	html body #brx-content .rwc-authform .brxe-container:has(> .rwc-authvis--media) {
		grid-template-columns: minmax(340px, 1fr) minmax(0, 2fr);
		column-gap: 32px;
	}

	html[dir="rtl"] body #brx-content .rwc-authform .brxe-container:has(> .rwc-authvis--media) {
		grid-template-columns: minmax(0, 2fr) minmax(340px, 1fr);
	}

	html body #brx-content .rwc-authform .rwc-authcard {
		padding: 36px 32px;
	}
}

html body #brx-content .rwc-authform .rwc-authcard > h1 {
	margin: 0 0 10px;
	line-height: 1.3;
}

html body #brx-content .rwc-authform .rwc-authcard > .rwc-authsub {
	margin: 0 0 26px;
	color: var(--rwc-support, #5a6480);
	font-size: 15px;
	line-height: 1.7;
}
