/*
 * Contact page (not in Figma; on request 2026-10-02). Patterns contact-hero and contact-body, block
 * reviewscribe/contact-form. Built from the site's own parts: the #f6f6f6 page with a 300px purple-20 band
 * (feature requests, media kit), the feature board's 840 | 408 columns 32 apart, white 16px-radius cards with
 * Figma's 0.5px #ccc inset stroke, and the input component of the sign-in forms (.rs-field, auth.css).
 */

body:has(.rs-ct-hero) {
	background-color: #f6f6f6;
}

.rs-ct-hero {
	padding-right: var(--wp--style--root--padding-right);
	padding-left: var(--wp--style--root--padding-left);
	background: linear-gradient(to bottom, var(--wp--preset--color--purple-20) 0, #f6f6f6 300px) no-repeat;
}

.rs-ct-hero > * {
	margin: 0;
}

.rs-ct-hero__lead {
	max-width: 640px;
}

/* ---- Form 840 | help cards 408 ---- */

.rs-ct-body__row {
	align-items: flex-start;
}

.rs-ct-body__row > *,
.rs-ct-aside > *,
.rs-ct-card > * {
	margin: 0;
}

.rs-ct-body__row > .rs-ct-form {
	flex: 0 1 840px;
	min-width: 0;
}

.rs-ct-body__row > .rs-ct-aside {
	flex: 0 0 408px;
	min-width: 0;
}

/* ---- Form card ---- */

.rs-ct-form {
	box-sizing: border-box;
	padding: 32px;
	border-radius: 16px;
	background: var(--wp--preset--color--white);
	box-shadow: inset 0 0 0 0.5px var(--wp--preset--color--gray-20);
	scroll-margin-top: calc(var(--rs-header-clearance) + 16px);
}

.rs-ct-form__title {
	margin: 0 0 24px;
	color: var(--wp--preset--color--black);
	font-family: var(--wp--preset--font-family--stack-sans-headline);
	font-size: var(--wp--preset--font-size--heading-5);
	font-weight: 500;
	line-height: 32px;
	letter-spacing: 0;
}

.rs-ct-form .rs-ct-form__notice {
	margin: -8px 0 24px;
}

.rs-ct-form__form {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin: 0;
}

.rs-ct-form__hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.rs-ct-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Reason: the input component around a native select, with the site's caret. */
.rs-ct-field--select .rs-field__wrap {
	position: relative;
	padding: 0;
}

.rs-ct-field--select select.rs-field__input {
	height: 40px;
	padding: 10px 36px 10px 8px;
	appearance: none;
	cursor: pointer;
}

.rs-ct-field--select select.rs-field__input:invalid {
	color: var(--wp--preset--color--text-muted);
}

.rs-ct-field--select select.rs-field__input option {
	color: var(--wp--preset--color--black);
}

.rs-ct-field--select .rs-field__wrap::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 10px;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	background: url("../../images/account/caret-down-20.svg") center / 20px no-repeat;
	pointer-events: none;
}

/* Message: the input component, 160px tall and resizable. */
.rs-ct-field--message .rs-field__wrap {
	align-items: stretch;
	padding: 8px;
}

.rs-ct-field--message textarea.rs-field__input {
	height: auto;
	min-height: 144px;
	resize: vertical;
}

.rs-ct-field--message textarea.rs-field__input::placeholder {
	color: var(--wp--preset--color--text-tertiary);
}

/* ---- Images: a dashed drop area; the real file input covers it ---- */

.rs-ct-upload {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.rs-ct-upload > * {
	margin: 0;
}

.rs-ct-upload__zone {
	position: relative;
	display: flex;
	box-sizing: border-box;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 20px 16px;
	border: 1px dashed var(--wp--preset--color--text-muted);
	border-radius: 8px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--preset--font-size--paragraph-sm);
	line-height: 20px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.rs-ct-upload__zone:hover,
.rs-ct-upload__zone.is-dragging {
	border-color: var(--wp--preset--color--purple-100);
	background: var(--wp--preset--color--purple-20);
}

.rs-ct-upload__zone:focus-within {
	outline: 2px solid var(--wp--preset--color--purple-100);
	outline-offset: 2px;
}

.rs-ct-upload.is-invalid .rs-ct-upload__zone {
	border-color: var(--wp--preset--color--danger);
}

.rs-ct-upload__zone input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.rs-ct-upload__icon {
	width: 24px;
	height: 24px;
	margin-bottom: 4px;
	background-color: var(--wp--preset--color--purple-100);
	-webkit-mask: url("../../images/icons/images.svg") center / 24px no-repeat;
	mask: url("../../images/icons/images.svg") center / 24px no-repeat;
}

.rs-ct-upload__text strong {
	color: var(--wp--preset--color--purple-100);
	font-weight: 500;
}

.rs-ct-upload__hint {
	color: var(--wp--preset--color--text-tertiary);
	font-size: var(--wp--preset--font-size--xs);
	line-height: 18px;
}

.rs-ct-upload__files {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 0;
	list-style: none;
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--preset--font-size--xs);
	line-height: 18px;
}

.rs-ct-upload__files[hidden] {
	display: none;
}

.rs-ct-upload__files li {
	margin: 0;
	overflow-wrap: anywhere;
}

.rs-ct-upload__files li.is-problem {
	color: var(--wp--preset--color--danger);
}

/* ---- Privacy note + Send ---- */

.rs-ct-form__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-top: 4px;
}

.rs-ct-form__privacy {
	margin: 0;
	color: var(--wp--preset--color--text-tertiary);
	font-size: var(--wp--preset--font-size--paragraph-sm);
	line-height: 20px;
}

.rs-ct-form__privacy a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rs-ct-form__submit,
.rs-ct-form__again {
	display: inline-flex;
	flex: none;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	min-width: 160px;
	height: 40px;
	padding: 8px 24px;
	border: 0;
	border-radius: 20px;
	background: var(--wp--preset--color--purple-100);
	color: var(--wp--preset--color--white);
	font-family: var(--wp--preset--font-family--inter);
	font-size: var(--wp--preset--font-size--paragraph);
	font-weight: 500;
	line-height: 24px;
	letter-spacing: -0.005em;
	text-decoration: none;
	cursor: pointer;
}

.rs-ct-form__submit:hover,
.rs-ct-form__again:hover {
	background: var(--wp--preset--color--purple-90);
	color: var(--wp--preset--color--white);
}

.rs-ct-form__submit:focus-visible,
.rs-ct-form__again:focus-visible {
	outline: 2px solid var(--wp--preset--color--purple-100);
	outline-offset: 2px;
}

/* ---- Thank-you panel ---- */

.rs-ct-form__sent {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 48px 0;
	text-align: center;
}

.rs-ct-form__sent > * {
	margin: 0;
}

.rs-ct-form__sent .rs-ct-form__title {
	margin: 8px 0 0;
}

.rs-ct-form__sent-icon {
	width: 48px;
	height: 48px;
	background: url("../../images/account/check-circle.svg") center / 48px no-repeat;
}

.rs-ct-form__sent-text {
	max-width: 480px;
	color: var(--wp--preset--color--text-secondary);
	font-size: var(--wp--preset--font-size--paragraph);
	line-height: 24px;
}

.rs-ct-form__sent .rs-ct-form__again {
	margin-top: 16px;
}

/* ---- Help cards ---- */

.rs-ct-card {
	box-sizing: border-box;
	border-radius: 16px;
	box-shadow: inset 0 0 0 0.5px var(--wp--preset--color--gray-20);
}

.rs-ct-card__title {
	line-height: 28px;
}

.rs-ct-card__link {
	margin-top: 8px !important; /* 16 below the text: the group's 8px gap + 8 */
}

.rs-ct-card__link a {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	color: var(--wp--preset--color--purple-100);
	font-weight: 500;
	text-decoration: none;
}

.rs-ct-card__link a::after {
	content: "";
	width: 16px;
	height: 16px;
	background-color: currentColor;
	-webkit-mask: url("../../images/icons/arrow-right.svg") center / 16px no-repeat;
	mask: url("../../images/icons/arrow-right.svg") center / 16px no-repeat;
	transition: transform 0.15s ease;
}

.rs-ct-card__link a:hover {
	color: var(--wp--preset--color--purple-90);
}

.rs-ct-card__link a:hover::after {
	transform: translateX(2px);
}

/* ---- Smaller screens ---- */

@media (max-width: 1023px) {
	.rs-ct-body__row.rs-ct-body__row {
		flex-direction: column;
		align-items: stretch;
	}

	.rs-ct-body__row > .rs-ct-form,
	.rs-ct-body__row > .rs-ct-aside {
		flex: none;
		width: 100%;
	}

	.rs-ct-aside.rs-ct-aside {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 16px;
	}
}

@media (max-width: 781px) {
	.rs-ct-form {
		padding: 24px 16px;
	}

	.rs-ct-form__row,
	.rs-ct-aside.rs-ct-aside {
		grid-template-columns: 1fr;
	}

	.rs-ct-form__footer {
		flex-direction: column;
		align-items: stretch;
	}

	.rs-ct-form__submit {
		width: 100%;
	}
}
