/*
 * contact.css
 * Page-specific styles for the Contact + Demo page
 * (Figma node 122:5275 "Contact+Demo", file 6Y5Mw023BNGRaArvPgBS8R).
 *
 * Reuses the shared .ft-* foundation (foundation.css, loaded globally before
 * this sheet): tokens, .ft-shell/.ft-section, .ft-heading/.ft-title/.ft-lead.
 * Adds Contact-page components via .ct-* classes.
 *
 * Layout: a centred 880px content column (Figma content x=520 / width=880 on
 * the 1920 frame) holding the intro, the contact-info grid, and the form card.
 */

.ct-main {
	/* The whole Contact body sits in one centred 880px column — narrow the
	 * shared shell instead of redefining it. */
	--ft-shell: min(880px, 100% - 80px);
	--ct-field-bg: #ffffff;
	--ct-disabled-bg: #f6f6f6;
	background: #f7f7f9;
}

/* Extra bottom breathing room under the form card (foundation gives 80/64/48
 * top+bottom; Figma wants a deeper bottom on this page). */
.ct-section {
	padding-bottom: 96px;
}

/* ---- Intro ---- */
.ct-intro {
	display: grid;
	gap: 12px;
}

.ct-badge {
	display: inline-flex;
	align-items: center;
	width: fit-content;
	padding: 5px 8px;
	border-radius: 6px;
	background: var(--ft-blue-subtle);
	color: var(--ft-blue);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
}

/* Title/leads inside the intro are plain .ft-title / .ft-lead; only the
 * inline FAQ link needs page styling. */
.ct-intro a {
	color: var(--ft-blue);
	text-decoration: none;
}

.ct-intro a:hover {
	text-decoration: underline;
}

/* ---- Divider rule ---- */
.ct-rule {
	height: 1px;
	margin: 32px 0;
	border: 0;
	background: var(--ft-border);
}

/* ---- Contact info grid ---- */
.ct-info {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 32px 24px;
}

.ct-info__item h2 {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 17px;
	font-weight: 600;
	color: var(--ft-text);
}

.ct-info__item p {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: var(--ft-muted);
}

.ct-info__item a {
	color: var(--ft-muted);
	text-decoration: none;
}

.ct-info__item a:hover {
	color: var(--ft-blue);
}

/* ---- Account deletion section (#delete-account) ----
 * Not in Figma: Google Play's public deletion-instructions page for OneScreen.
 * Sits between the contact info and the form card, styled as a quieter sibling
 * of the card (no shadow) so it reads as reference, not as a second form. */
.ct-delete {
	margin-top: 40px;
	padding: 32px 40px;
	background: #fff;
	border: 1px solid #ededed;
	border-radius: 16px;
	/* /contact?topic=delete-account scrolls here; clear the sticky header. */
	scroll-margin-top: calc(var(--shop-header-height, 96px) + 16px);
}

.ct-delete__title {
	margin: 0 0 8px;
	font-size: 20px;
	line-height: 1.3;
	font-weight: 600;
	color: var(--ft-text);
}

.ct-delete__lead {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: var(--ft-muted);
}

.ct-delete__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px 40px;
	margin-top: 24px;
}

.ct-delete__block h3 {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 17px;
	font-weight: 600;
	color: var(--ft-text);
}

.ct-delete__block * + h3 {
	margin-top: 20px;
}

.ct-delete__block ol,
.ct-delete__block ul,
.ct-delete__block p {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	font-weight: 500;
	color: var(--ft-muted);
}

.ct-delete__block ol,
.ct-delete__block ul {
	display: grid;
	gap: 4px;
	padding-left: 20px;
}

.ct-delete__block strong {
	font-weight: 600;
	color: var(--ft-text);
}

/* ---- Form card ---- */
.ct-card {
	margin-top: 24px;
	padding: 48px;
	background: #fff;
	border: 1px solid #ededed;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(20, 33, 50, 0.05);
}

/* Card head is a plain .ft-heading (title + lead) with page spacing below. */
.ct-card__head {
	margin-bottom: 32px;
}

/* ---- Form structure ---- */
.ct-form {
	display: grid;
	gap: 0;
}

.ct-field {
	display: grid;
	gap: 8px;
}

.ct-label {
	font-size: 14px;
	line-height: 17px;
	font-weight: 600;
	color: var(--ft-text);
}

.ct-req {
	color: #e23636;
}

/* Generic two-up row (name/phone, country/state) */
.ct-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

/* Name alone on its row (the deletion topic drops the phone field). */
.ct-row--single {
	grid-template-columns: 1fr;
}

/* Spacing between stacked field blocks */
.ct-fieldset {
	display: grid;
	gap: 24px;
}

/* ---- Inputs ---- */
.ct-input,
.ct-select,
.ct-textarea {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid var(--ft-border);
	border-radius: 8px;
	background: var(--ct-field-bg);
	color: var(--ft-text);
	font-family: inherit;
	font-size: 14px;
	line-height: 18px;
	font-weight: 500;
}

.ct-input::placeholder,
.ct-textarea::placeholder {
	color: #b0b0b0;
}

.ct-input:focus,
.ct-select:focus,
.ct-textarea:focus {
	outline: none;
	border-color: var(--ft-blue);
}

.ct-textarea {
	min-height: 140px;
	resize: vertical;
}

/* Selects (Country / State) — disabled-looking subtle fill per Figma, with a
 * caret drawn via background image. */
.ct-select {
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--ct-disabled-bg);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23737A82' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 44px;
	color: var(--ft-muted);
	cursor: pointer;
}

/* ---- Radio group ("What can we help you with?") ---- */
.ct-radio-group {
	display: grid;
	gap: 8px;
}

.ct-radio-group > .ct-label {
	margin-bottom: 4px;
}

.ct-radios {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px 16px;
}

.ct-radio {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	line-height: 18px;
	font-weight: 500;
	color: var(--ft-text);
	cursor: pointer;
}

.ct-radio input {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	margin: 0;
	border: 1.5px solid #b0b0b0;
	border-radius: 50%;
	cursor: pointer;
	position: relative;
}

.ct-radio input:checked {
	border-color: var(--ft-blue);
}

.ct-radio input:checked::after {
	content: "";
	position: absolute;
	inset: 2px;
	border-radius: 50%;
	background: var(--ft-blue);
}

.ct-radio input:focus-visible {
	outline: 2px solid var(--ft-blue-subtle);
	outline-offset: 1px;
}

/* ---- Attachment row (input + Upload button) ---- */
.ct-attach {
	display: flex;
	gap: 0;
	align-items: stretch;
}

.ct-attach__field {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	min-width: 0;
	padding: 14px 16px;
	border: 1px solid var(--ft-border);
	border-right: 0;
	border-radius: 8px 0 0 8px;
	background: var(--ct-field-bg);
	color: #b0b0b0;
	font-size: 14px;
	line-height: 18px;
}

.ct-attach__field--filled {
	color: var(--ft-text);
}

.ct-attach__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.ct-attach input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ct-attach__btn {
	flex: 0 0 auto;
	padding: 0 24px;
	border: 1px solid var(--ft-border);
	border-radius: 0 8px 8px 0;
	background: var(--ct-disabled-bg);
	color: var(--ft-text);
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.ct-attach__btn:hover {
	background: #efefef;
}

/* ---- Submit button ---- */
.ct-submit {
	width: 100%;
	margin-top: 8px;
	padding: 14px 32px;
	border: 0;
	border-radius: 8px;
	background: var(--ft-blue);
	color: #f6f6f6;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
}

.ct-submit:hover {
	filter: brightness(0.97);
}

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

/* Tablet: 4-col contact info -> 2-col band; 3-col radios -> 2-col so the long
 * "General Questions & Feedback" label stops wrapping awkwardly. The 2-col band
 * holds down to 449px (per the mobile reflow convention), then 1-col below. */
@media (max-width: 990px) {
	.ct-section {
		padding-bottom: 72px;
	}

	.ct-info {
		grid-template-columns: repeat(2, 1fr);
	}

	.ct-radios {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 680px) {
	.ct-section {
		padding-bottom: 56px;
	}

	.ct-card {
		padding: 28px 20px;
	}

	.ct-delete {
		padding: 28px 20px;
	}

	.ct-delete__grid {
		grid-template-columns: 1fr;
	}

	/* Stack paired form rows (name/phone, country/state) — Figma mobile stacks. */
	.ct-row {
		grid-template-columns: 1fr;
	}

	/* Radios: single column (Figma mobile stacks them all). */
	.ct-radios {
		grid-template-columns: 1fr;
	}
}

/* Phone: drop the contact-info grid to one column and tighten the gutter so the
 * shell + form card never overflow down to the 325px target. */
@media (max-width: 449px) {
	.ct-main {
		--ft-shell: min(880px, 100% - 32px);
	}

	.ct-info {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.ct-attach__btn {
		padding: 0 16px;
	}
}
