/* =============================================================
   Feedback Setup — page template styles (warm editorial palette)
   File: templates/feedback-setup/feedback-setup.css
   Targets Twenty Twenty-Five — overrides FSE global styles
   ============================================================= */

/* ── Design tokens ──────────────────────────────────────────── */
:root {
	--fbs-bg-dark:        #1A120F;
	--fbs-bg-dark-2:      #1F1713;
	--fbs-bg-light:       #EFEAE6;
	--fbs-bg-light-2:     #E9E5E1;
	--fbs-text-on-dark:   #F3EEE9;
	--fbs-text-on-light:  #1A1715;
	--fbs-muted:          #6F6962;
	--fbs-line:           #D9D2CB;

	--fbs-accent-branding: #46546B;
	--fbs-accent-product:  #7B8464;
	--fbs-accent-growth:   #C96D3D;

	--fbs-success: #5F7050;
	--fbs-error:   #A8473D;

	--fbs-font: "Inter Tight", "Neue Montreal", "Suisse International", "General Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Hard reset: strip everything TT5 adds to body/html ─────── */
html.fbs-body,
body.fbs-body {
	margin: 0 !important;
	padding: 0 !important;
	background: var(--fbs-bg-light) !important;
	min-height: 100vh;
}

body.fbs-body.fbs-modal-open {
	overflow: hidden;
}

body.fbs-body .skip-link {
	display: none;
}

/* ── Page shell ─────────────────────────────────────────────── */
.fbs-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 64px 24px 96px;
	background-color: var(--fbs-bg-light);
	font-family: var(--fbs-font);
	font-weight: 500;
	color: var(--fbs-text-on-light);
	box-sizing: border-box;
	width: 100%;
	letter-spacing: -0.005em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

/* ── Logo ───────────────────────────────────────────────────── */
.fbs-header {
	margin-bottom: 24px;
}

.fbs-logo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.fbs-logo__img {
	width: 100%;
	max-width: 170px;
	height: auto;
	display: block;
	user-select: none;
}

/* ── Hero ───────────────────────────────────────────────────── */
.fbs-hero {
	text-align: center;
	max-width: 600px;
	margin-bottom: 24px;
}

.fbs-hero__title {
	font-size: 44px;
	font-weight: 700;
	color: var(--fbs-text-on-light);
	letter-spacing: -0.035em;
	line-height: 1.08;
	margin: 0 0 18px;
	padding: 0;
}

.fbs-hero__subtitle {
	font-size: 16px;
	font-weight: 500;
	color: #4A4540;
	line-height: 1.6;
	letter-spacing: -0.003em;
	margin: 0;
	padding: 0;
}

/* ── Steps list ─────────────────────────────────────────────── */
.fbs-steps {
	display: flex;
	flex-direction: column;
	gap: 14px;
	width: 100%;
	max-width: 620px;
}

/* ── Single step card ───────────────────────────────────────── */
.fbs-step {
	position: relative;
	background: #FFFFFF;
	border: 1px solid var(--fbs-line);
	border-radius: 14px;
	padding: 24px 28px;
	display: flex;
	align-items: flex-start;
	gap: 18px;
	transition: border-color 0.2s ease;
	box-sizing: border-box;
	overflow: hidden;
}

.fbs-step::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	width: 3px;
	background: var(--fbs-step-accent, transparent);
	transition: width 0.2s ease;
}

.fbs-step:hover {
	border-color: #C7BFB6;
}

.fbs-step:hover::before {
	width: 5px;
}

.fbs-step:nth-child(1) { --fbs-step-accent: var(--fbs-accent-branding); }
.fbs-step:nth-child(2) { --fbs-step-accent: var(--fbs-accent-product); }
.fbs-step:nth-child(3) { --fbs-step-accent: var(--fbs-accent-growth); }
.fbs-step:nth-child(4) { --fbs-step-accent: var(--fbs-bg-dark); }

.fbs-step__num {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--fbs-bg-light-2);
	border: 1px solid var(--fbs-line);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	color: var(--fbs-step-accent, var(--fbs-muted));
	flex-shrink: 0;
	margin-top: 2px;
	letter-spacing: 0;
}

.fbs-step__body {
	flex: 1;
	min-width: 0;
}

.fbs-step__label {
	font-size: 11px;
	font-weight: 700;
	color: var(--fbs-step-accent, var(--fbs-muted));
	text-transform: uppercase;
	letter-spacing: 0.12em;
	margin: 0 0 6px;
	padding: 0;
}

.fbs-step__title {
	font-size: 19px;
	font-weight: 700;
	color: var(--fbs-text-on-light);
	margin: 0 0 8px;
	padding: 0;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.fbs-step__desc {
	font-size: 14px;
	font-weight: 500;
	color: #4A4540;
	line-height: 1.6;
	margin: 0 0 14px;
	padding: 0;
	letter-spacing: -0.003em;
}

.fbs-step__done {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: var(--fbs-step-accent, var(--fbs-bg-dark));
	letter-spacing: -0.003em;
}

.fbs-step__done .bi {
	font-size: 18px;
}

/* ── CTA link / button ──────────────────────────────────────── */
.fbs-step__link {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	font-family: var(--fbs-font);
	font-size: 13px;
	font-weight: 600;
	color: var(--fbs-text-on-dark);
	text-decoration: none;
	border: 1px solid var(--fbs-bg-dark);
	border-radius: 999px;
	padding: 10px 18px;
	background: var(--fbs-bg-dark);
	letter-spacing: 0;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.fbs-step__link:hover,
.fbs-step__link:focus-visible {
	background: transparent;
	border-color: var(--fbs-step-accent, var(--fbs-bg-dark));
	color: var(--fbs-step-accent, var(--fbs-bg-dark));
	text-decoration: none;
	transform: translateY(-1px);
	outline: none;
}

.fbs-step__link:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
}

.fbs-step__link-icon {
	font-size: 14px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.fbs-step__link-icon--end {
	margin-left: 2px;
	font-size: 12px;
	opacity: 0.85;
}

/* ── Copy button (Feedback Server URL) ──────────────────────── */
.fbs-copy {
	transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.fbs-copy.is-copied,
.fbs-copy.is-copied:hover,
.fbs-copy.is-copied:focus-visible {
	background: var(--fbs-accent-product);
	border-color: var(--fbs-accent-product);
	color: var(--fbs-text-on-dark);
	transform: none;
}

/* ── Loom video embed (16:9, fills container) ──────────────── */
.fbs-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 2px 0 4px;
	background: var(--fbs-bg-dark);
	border-radius: 10px;
	overflow: hidden;
	border: 1px solid var(--fbs-line);
}

@supports not (aspect-ratio: 16 / 9) {
	.fbs-video {
		aspect-ratio: auto;
		padding-bottom: 56.25%;
		height: 0;
	}
}

.fbs-video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

/* ── API token row ──────────────────────────────────────────── */
.fbs-token {
	display: flex;
	align-items: center;
	gap: 10px;
	background: var(--fbs-bg-light-2);
	border: 1px solid var(--fbs-line);
	border-radius: 10px;
	padding: 10px 14px;
	margin-top: 14px;
}

.fbs-token__icon {
	font-size: 14px;
	color: var(--fbs-muted);
	line-height: 1;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

.fbs-token__key {
	flex: 1;
	font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 12px;
	font-weight: 600;
	color: var(--fbs-text-on-light);
	letter-spacing: 0;
}

.fbs-token__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--fbs-font);
	font-size: 10px;
	font-weight: 700;
	background: var(--fbs-accent-growth);
	color: var(--fbs-text-on-dark);
	border-radius: 999px;
	padding: 5px 11px;
	white-space: nowrap;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1;
	border: 1px solid transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.fbs-token__badge--link {
	text-decoration: none;
	transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.fbs-token__badge--link:hover,
.fbs-token__badge--link:focus-visible {
	background: var(--fbs-bg-dark);
	border-color: var(--fbs-bg-dark);
	color: var(--fbs-text-on-dark);
	text-decoration: none;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px -4px rgba(26, 18, 15, 0.35);
	outline: none;
}

.fbs-token__badge-icon {
	font-size: 11px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
}

/* ── Modal ──────────────────────────────────────────────────── */
.fbs-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	font-family: var(--fbs-font);
	color: var(--fbs-text-on-light);
}

.fbs-modal[hidden] {
	display: none !important;
}

.fbs-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(26, 18, 15, 0.55);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	animation: fbs-fade 0.18s ease;
}

.fbs-modal__panel {
	position: relative;
	background: #FFFFFF;
	border: 1px solid var(--fbs-line);
	border-radius: 16px;
	padding: 32px 32px 28px;
	width: 100%;
	max-width: 460px;
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	box-shadow: 0 24px 48px -16px rgba(26, 18, 15, 0.35);
	animation: fbs-pop 0.22s cubic-bezier(0.18, 0.89, 0.32, 1.18);
	box-sizing: border-box;
}

@keyframes fbs-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes fbs-pop {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to   { opacity: 1; transform: none; }
}

.fbs-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--fbs-line);
	background: var(--fbs-bg-light);
	color: var(--fbs-text-on-light);
	border-radius: 50%;
	font-size: 12px;
	cursor: pointer;
	transition: background 0.18s ease, border-color 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.fbs-modal__close:hover,
.fbs-modal__close:focus-visible {
	background: var(--fbs-bg-dark);
	border-color: var(--fbs-bg-dark);
	color: var(--fbs-text-on-dark);
	outline: none;
}

.fbs-modal__title {
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.2;
	margin: 0 0 8px;
	color: var(--fbs-text-on-light);
}

.fbs-modal__desc {
	font-size: 14px;
	font-weight: 500;
	color: #4A4540;
	line-height: 1.55;
	margin: 0 0 22px;
}

/* ── Form ───────────────────────────────────────────────────── */
.fbs-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.fbs-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.fbs-form__field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fbs-form__label {
	font-size: 11px;
	font-weight: 700;
	color: var(--fbs-muted);
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.fbs-form input[type="text"],
.fbs-form input[type="email"] {
	font-family: var(--fbs-font);
	font-size: 14px;
	font-weight: 500;
	color: var(--fbs-text-on-light);
	background: var(--fbs-bg-light);
	border: 1px solid var(--fbs-line);
	border-radius: 9px;
	padding: 10px 13px;
	width: 100%;
	box-sizing: border-box;
	letter-spacing: -0.003em;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.fbs-form input:focus-visible {
	outline: none;
	border-color: var(--fbs-bg-dark);
	background: #FFFFFF;
	box-shadow: 0 0 0 3px rgba(26, 18, 15, 0.08);
}

.fbs-form input:invalid:not(:placeholder-shown) {
	border-color: var(--fbs-error);
}

/* Honeypot — visually hidden but reachable to bots */
.fbs-form__hp {
	position: absolute !important;
	left: -10000px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.fbs-form__submit {
	margin-top: 6px;
	justify-content: center;
	width: 100%;
}

.fbs-form__status {
	margin: 4px 0 0;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.45;
	letter-spacing: -0.003em;
	min-height: 1.4em;
}

.fbs-form__status.is-success {
	color: var(--fbs-success);
}

.fbs-form__status.is-error {
	color: var(--fbs-error);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
	.fbs-page {
		padding: 40px 18px 72px;
	}

	.fbs-hero__title {
		font-size: 30px;
	}

	.fbs-hero__subtitle {
		font-size: 15px;
	}

	.fbs-step {
		padding: 18px 20px;
		gap: 14px;
	}

	.fbs-step__title {
		font-size: 16px;
	}

	.fbs-logo__img {
		max-width: 150px;
	}

	.fbs-modal {
		padding: 14px;
	}

	.fbs-modal__panel {
		padding: 26px 22px 22px;
	}

	.fbs-modal__title {
		font-size: 19px;
	}

	.fbs-form__row {
		grid-template-columns: 1fr;
	}
}
