/**
 * Red Email landing page (תיבת המייל האדום).
 *
 * Figma node: 757:25067 — extracted values translated to RTL-native CSS.
 *
 * Desktop columns (RTL DOM order):
 *   1. Media column (heading + lede + image) — width 594px, appears on the RIGHT.
 *   2. Form column — flex: 1, appears on the LEFT.
 *
 * @package Hamechadesh
 */

/* ==========================================================================
   Page wrapper — 80px top / 150px bottom margins per request
   ========================================================================== */

.hm-red-email {
	padding-block-start: 80px;
	padding-block-end: 150px;
	background-color: var(--hm-color-bg);
}

.hm-red-email__inner {
	display: flex;
	gap: 40px;
	align-items: stretch;
}

/* ==========================================================================
   Media column (heading + lede + studio image)
   ========================================================================== */

.hm-red-email__media {
	display: flex;
	flex-direction: column;
	gap: 22px;
	width: 594px;
	flex-shrink: 0;
}

/* --- Title row: dot + heading on the RIGHT, thin rule fills the LEFT --- */

.hm-red-email__heading-row {
	display: flex;
	align-items: flex-end;
	gap: 15px;
	width: 100%;
}

.hm-red-email__title-group {
	display: flex;
	align-items: center;
	gap: 5px;
	flex-shrink: 0;
}

.hm-red-email__title {
	margin: 0;
	font-family: var(--hm-font-primary);
	font-weight: 900;
	font-size: 55px;
	line-height: 51px;
	letter-spacing: 0;
	color: var(--hm-color-text);
	white-space: nowrap;
	text-align: end;
	unicode-bidi: isolate;
}

.hm-red-email__title-text {
	color: var(--hm-color-text);
}

.hm-red-email__title-accent {
	color: var(--hm-color-accent);
}

.hm-red-email__title-dot {
	display: inline-flex;
	align-items: center;
	width: 19.354px;
	height: 19.354px;
	flex-shrink: 0;
}

.hm-red-email__title-dot svg {
	width: 100%;
	height: 100%;
	display: block;
}

.hm-red-email__title-rule {
	flex: 1;
	min-width: 0;
	height: 0;
	border-block-end: 0.6px solid var(--hm-color-text);
	opacity: 0.25;
	margin-block-end: 9px; /* baseline-align with the lower border of the heading row */
}

/* --- Lede paragraph --- */

.hm-red-email__lede {
	margin: 0;
	font-family: var(--hm-font-primary);
	font-size: 32px;
	line-height: 1;
	color: var(--hm-color-text);
	text-align: start;
	width: 100%;
	unicode-bidi: isolate;
}

.hm-red-email__lede-regular {
	font-weight: 300;
}

.hm-red-email__lede-bold {
	font-weight: 900;
}

/* --- Studio image (fills remaining column height) --- */

.hm-red-email__image {
	flex: 1;
	min-height: 0;
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background-color: #0a1f4f; /* subtle base while the image loads */
	min-height: 320px;
}

.hm-red-email__image-img,
.hm-red-email__image > img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hm-red-email__image-fallback {
	position: absolute;
	inset: 0;
	background:
		radial-gradient(ellipse at center, rgba(20, 100, 255, 0.55) 0%, rgba(8, 24, 80, 0.95) 70%, #050a26 100%),
		linear-gradient(135deg, #0a1f4f 0%, #1c3aa8 100%);
	background-blend-mode: screen;
}

/* ==========================================================================
   Form column
   ========================================================================== */

.hm-red-email__form-col {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.hm-red-email__form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	min-height: 0;
}

.hm-red-email__honeypot {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* Two-input row (gap matches Figma's 10px) */
.hm-red-email__row {
	display: flex;
	gap: 10px;
}

.hm-red-email__row .hm-red-email__field {
	flex: 1;
	min-width: 0;
}

.hm-red-email__field--message {
	flex: 1;
	min-height: 0;
	display: flex;
}

/* --- Shared input look (white pill, 22px Pompei Light) --- */

.hm-red-email__input,
.hm-red-email__textarea {
	width: 100%;
	background-color: #ffffff;
	border: 1px solid transparent;
	border-radius: 10px;
	padding: 21px 24px;
	color: var(--hm-color-text);
	font-family: var(--hm-font-primary);
	font-size: 22px;
	font-weight: 300;
	line-height: 22px;
	text-align: start;
	outline: none;
	transition: border-color var(--hm-transition-fast), box-shadow var(--hm-transition-fast);
	box-sizing: border-box;
	direction: rtl;
}

.hm-red-email__input {
	height: 64px;
}

.hm-red-email__input::placeholder,
.hm-red-email__textarea::placeholder {
	color: var(--hm-color-text);
	opacity: 0.5;
	font-family: var(--hm-font-primary);
	font-size: 22px;
	font-weight: 300;
	line-height: 22px;
}

.hm-red-email__input:focus,
.hm-red-email__textarea:focus {
	border-color: var(--hm-color-text);
	box-shadow: 0 0 0 3px rgba(33, 33, 33, 0.08);
}

.hm-red-email__input[aria-invalid="true"],
.hm-red-email__textarea[aria-invalid="true"] {
	border-color: var(--hm-color-accent);
}

.hm-red-email__textarea {
	flex: 1;
	min-height: 180px;
	resize: vertical;
}

/* ==========================================================================
   File upload — large, dashed drop zone with hover/dragover state
   ========================================================================== */

.hm-red-email__field--file {
	position: relative;
	padding: 0;
	min-height: 160px;
	border-radius: 10px;
	overflow: hidden;
}

/* FilePond root — the actual drop target. The dashed border lives here so it
   visually responds to dragover (FilePond toggles `filepond--hopper--is-over`). */
.hm-red-email__field--file .filepond--root {
	margin: 0;
	width: 100%;
	min-height: 160px;
	font-family: var(--hm-font-primary);
	background-color: #ffffff;
	border-radius: 10px;
	transition: background-color var(--hm-transition-fast);
}

/* Panel = visible dashed frame. */
.hm-red-email__field--file .filepond--panel-root {
	background: transparent;
	border: 2px dashed rgba(33, 33, 33, 0.25);
	border-radius: 10px;
	transition: border-color var(--hm-transition-fast), background-color var(--hm-transition-fast);
}

/* Hover + dragover — invite the user with the brand red. */
.hm-red-email__field--file .filepond--root:hover .filepond--panel-root,
.hm-red-email__field--file .filepond--hopper--is-over .filepond--panel-root {
	border-color: var(--hm-color-accent);
	background-color: rgba(255, 23, 62, 0.04);
}

.hm-red-email__field--file .filepond--credits {
	display: none;
}

/* --- Empty drop-label content (rich HTML injected via labelIdle) --- */

.hm-red-email__field--file .filepond--drop-label {
	min-height: 160px;
	padding: 24px;
	color: var(--hm-color-text);
	cursor: pointer;
}

.hm-red-email__field--file .filepond--drop-label label {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 0;
	border: none;
	background: transparent;
	color: inherit;
	font-family: var(--hm-font-primary);
	text-align: center;
	cursor: pointer;
}

.hm-fp-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background-color: rgba(255, 23, 62, 0.1);
	color: var(--hm-color-accent);
	transition: transform var(--hm-transition-fast), background-color var(--hm-transition-fast);
}

.hm-red-email__field--file .filepond--root:hover .hm-fp-icon,
.hm-red-email__field--file .filepond--hopper--is-over .hm-fp-icon {
	transform: scale(1.05);
	background-color: rgba(255, 23, 62, 0.18);
}

.hm-fp-icon svg {
	width: 28px;
	height: 28px;
	display: block;
}

.hm-fp-title {
	font-family: var(--hm-font-primary);
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--hm-color-text);
	unicode-bidi: isolate;
}

.hm-fp-link {
	color: var(--hm-color-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
	font-weight: 700;
}

.hm-fp-sub {
	font-family: var(--hm-font-primary);
	font-size: 14px;
	font-weight: 300;
	line-height: 1.4;
	color: var(--hm-color-text);
	opacity: 0.6;
	unicode-bidi: isolate;
}

/* Keep "— עד 25MB" together so it doesn't orphan onto its own line. */
.hm-fp-sub-nowrap {
	white-space: nowrap;
}

/* FilePond injects a built-in label-action span — we render our own link
   inside .hm-fp-title, so hide theirs to avoid duplication. */
.hm-red-email__field--file .filepond--label-action {
	display: none;
}

/* --- Custom preview card (replaces FilePond's default file UI) ---
   When a file is queued, FilePond's root is hidden via display:none and our own
   .hm-red-email__preview takes over: real <img> thumbnail (or generic file icon
   for non-images), filename + size, and a big red X to clear. */

.hm-red-email__field--file.hm-red-email__field--has-file .filepond--root {
	display: none;
}

.hm-red-email__field--file.hm-red-email__field--has-file {
	min-height: 0;
}

.hm-red-email__preview {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 14px;
	background-color: #ffffff;
	border: 1px solid rgba(33, 33, 33, 0.08);
	border-radius: 10px;
	min-height: 130px;
	width: 100%;
	box-sizing: border-box;
}

.hm-red-email__preview[hidden] {
	display: none;
}

/* Thumbnail panel — square-ish on the RIGHT in RTL (first DOM child). */
.hm-red-email__preview-thumb {
	flex-shrink: 0;
	width: 110px;
	height: 100px;
	border-radius: 8px;
	overflow: hidden;
	background-color: rgba(33, 33, 33, 0.05);
	display: flex;
	align-items: center;
	justify-content: center;
	color: rgba(33, 33, 33, 0.45);
}

.hm-red-email__preview-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hm-red-email__preview-img[hidden] {
	display: none;
}

.hm-red-email__preview-icon {
	width: 44px;
	height: 44px;
	display: block;
}

.hm-red-email__preview-icon[hidden] {
	display: none;
}

/* Info column — filename + size, right-aligned in RTL flow. */
.hm-red-email__preview-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	text-align: end;
}

.hm-red-email__preview-name {
	font-family: var(--hm-font-primary);
	font-size: 18px;
	font-weight: 700;
	color: var(--hm-color-text);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	unicode-bidi: plaintext;
}

.hm-red-email__preview-size {
	font-family: var(--hm-font-primary);
	font-size: 14px;
	font-weight: 300;
	color: var(--hm-color-text);
	opacity: 0.6;
}

/* Big, obvious remove button — solid red circle on the LEFT in RTL. */
.hm-red-email__preview-remove {
	flex-shrink: 0;
	width: 44px;
	height: 44px;
	border: none;
	border-radius: 50%;
	background-color: var(--hm-color-accent);
	color: #ffffff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 8px rgba(255, 23, 62, 0.35);
	transition:
		background-color var(--hm-transition-fast),
		transform var(--hm-transition-fast),
		box-shadow var(--hm-transition-fast);
	padding: 0;
}

.hm-red-email__preview-remove:hover,
.hm-red-email__preview-remove:focus-visible {
	background-color: var(--hm-color-text);
	transform: scale(1.06);
	box-shadow: 0 4px 12px rgba(33, 33, 33, 0.3);
	outline: none;
}

.hm-red-email__preview-remove svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* ==========================================================================
   Privacy-policy checkbox row
   ========================================================================== */

.hm-red-email__terms {
	display: flex;
	gap: 6px;
	align-items: flex-start;
	justify-content: flex-end; /* RTL → text on the RIGHT, checkbox on the LEFT */
	padding-block: 4px;
	cursor: pointer;
	width: 100%;
}

.hm-red-email__terms-text {
	flex: 1;
	min-width: 0;
	color: var(--hm-color-text);
	font-family: var(--hm-font-primary);
	font-size: 16px;
	font-weight: 300;
	line-height: 22px;
	text-align: start;
	unicode-bidi: isolate;
}

.hm-red-email__terms-link {
	color: var(--hm-color-accent);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hm-red-email__terms-link:hover,
.hm-red-email__terms-link:focus {
	color: var(--hm-color-text);
}

.hm-red-email__checkbox-wrap {
	flex-shrink: 0;
	padding-block-start: 2px;
}

.hm-red-email__checkbox {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

/* Matches the footer form's checkbox: 20px white circle that fills with
   accent red + white check when checked. A thin border keeps it visible
   on this page's light background. */
.hm-red-email__checkbox-visual {
	display: block;
	width: 20px;
	height: 20px;
	background-color: #ffffff;
	border: 1px solid rgba(33, 33, 33, 0.25);
	border-radius: 50%;
	transition: background-color var(--hm-transition-fast), border-color var(--hm-transition-fast), box-shadow var(--hm-transition-fast);
}

.hm-red-email__checkbox:checked + .hm-red-email__checkbox-visual {
	background-color: var(--hm-color-accent);
	border-color: var(--hm-color-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M6 10L9 13L14 7' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-size: contain;
	background-repeat: no-repeat;
}

.hm-red-email__checkbox:focus-visible + .hm-red-email__checkbox-visual {
	box-shadow: 0 0 0 3px rgba(255, 23, 62, 0.4);
}

/* ==========================================================================
   Submit button
   ========================================================================== */

.hm-red-email__submit {
	position: relative;
	width: 100%;
	height: 64px;
	background-color: var(--hm-color-accent);
	border: none;
	border-radius: 10px;
	color: var(--hm-color-text);
	font-family: var(--hm-font-primary);
	font-size: 22px;
	font-weight: 700;
	line-height: 22px;
	cursor: pointer;
	transition: opacity var(--hm-transition-fast);
}

.hm-red-email__submit:hover {
	opacity: 0.9;
}

.hm-red-email__submit:active {
	opacity: 0.8;
}

.hm-red-email__submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.hm-red-email__submit--loading .hm-red-email__submit-text {
	visibility: hidden;
}

.hm-red-email__submit--loading .hm-red-email__submit-loading {
	display: block;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 24px;
	height: 24px;
	border: 3px solid rgba(33, 33, 33, 0.25);
	border-top-color: var(--hm-color-text);
	border-radius: 50%;
	animation: hm-red-email-spin 0.6s linear infinite;
}

.hm-red-email__submit-loading {
	display: none;
}

@keyframes hm-red-email-spin {
	to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ==========================================================================
   Response banner
   ========================================================================== */

.hm-red-email__form-message {
	font-family: var(--hm-font-primary);
	font-size: 18px;
	font-weight: 300;
	line-height: 22px;
	text-align: start;
	border-radius: 8px;
	padding: 0;
	transition: padding var(--hm-transition-fast), margin var(--hm-transition-fast);
}

.hm-red-email__form-message:empty {
	display: none;
}

.hm-red-email__form-message--success {
	display: block;
	color: #166534;
	padding: 14px 18px;
	background-color: rgba(34, 197, 94, 0.12);
}

.hm-red-email__form-message--error {
	display: block;
	color: #991b1b;
	padding: 14px 18px;
	background-color: rgba(239, 68, 68, 0.12);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1023px) {
	.hm-red-email {
		padding-block-start: 48px;
		padding-block-end: 100px;
	}

	.hm-red-email__inner {
		flex-direction: column;
		gap: 32px;
	}

	.hm-red-email__media {
		width: 100%;
	}

	.hm-red-email__image {
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.hm-red-email__title {
		font-size: 44px;
		line-height: 42px;
	}

	.hm-red-email__title-dot {
		width: 16px;
		height: 16px;
		margin-block-start: 11px;
	}

	.hm-red-email__lede {
		font-size: 22px;
	}
}

@media (max-width: 767px) {
	.hm-red-email {
		padding-block-start: 32px;
		padding-block-end: 72px;
	}

	.hm-red-email__inner {
		gap: 24px;
		padding-inline: 16px;
	}

	.hm-red-email__title {
		font-size: 36px;
		line-height: 34px;
	}

	.hm-red-email__title-dot {
		width: 14px;
		height: 14px;
		margin-block-start: 0px;
	}

	.hm-red-email__lede {
		font-size: 18px;
	}

	.hm-red-email__input,
	.hm-red-email__textarea {
		font-size: 18px;
		padding: 18px 20px;
	}

	.hm-red-email__input::placeholder,
	.hm-red-email__textarea::placeholder {
		font-size: 18px;
	}

	.hm-red-email__input {
		height: 56px;
	}

	/* Hide the studio image entirely on mobile — heading + lede stay visible. */
	.hm-red-email__image {
		display: none;
	}

	/* Tighter media column without the image */
	.hm-red-email__media {
		gap: 14px;
	}

	/* File upload field — generous breathing room on small screens. */
	.hm-red-email__field--file,
	.hm-red-email__field--file .filepond--root,
	.hm-red-email__field--file .filepond--drop-label {
		min-height: 168px;
	}

	.hm-red-email__field--file .filepond--drop-label {
		padding: 22px 18px;
	}

	.hm-red-email__field--file .filepond--drop-label label {
		gap: 12px;
	}

	/* Softer dashed frame at phone widths — 2px reads heavy on small drop zones. */
	.hm-red-email__field--file .filepond--panel-root {
		border-width: 1.5px;
		border-color: rgba(33, 33, 33, 0.22);
	}

	.hm-fp-icon {
		width: 48px;
		height: 48px;
	}

	.hm-fp-icon svg {
		width: 24px;
		height: 24px;
	}

	.hm-fp-title {
		font-size: 17px;
		line-height: 1.3;
		max-width: 95%;
	}

	.hm-fp-sub {
		font-size: 12.5px;
		line-height: 1.5;
		max-width: 95%;
	}

	/* Selected-file preview — compact on phones. */
	.hm-red-email__preview {
		padding: 12px;
		gap: 12px;
		min-height: 96px;
	}

	.hm-red-email__preview-thumb {
		width: 72px;
		height: 72px;
	}

	.hm-red-email__preview-icon {
		width: 32px;
		height: 32px;
	}

	.hm-red-email__preview-name {
		font-size: 15px;
	}

	.hm-red-email__preview-size {
		font-size: 12px;
	}

	.hm-red-email__preview-remove {
		width: 36px;
		height: 36px;
	}

	.hm-red-email__preview-remove svg {
		width: 16px;
		height: 16px;
	}

	.hm-red-email__row {
		flex-direction: column;
		gap: 12px;
	}

	.hm-red-email__submit {
		font-size: 20px;
		height: 56px;
	}
}
