/* ==========================================================================
   FC Catalog Download Gate — front-end styles
   All classes are prefixed with .fc-cg- to avoid clashing with Elementor.
   Brand accent: change --fc-cg-accent only.
   ========================================================================== */

.fc-cg-root {
	--fc-cg-accent: #c8102e;
	--fc-cg-accent-dark: #a30d25;
	--fc-cg-ink: #1c1e21;
	--fc-cg-muted: #6b7280;
	--fc-cg-line: #e3e6ea;
	--fc-cg-field: #f7f8fa;
	--fc-cg-ok: #12855a;
	--fc-cg-radius: 10px;
	--fc-cg-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

/* --------------------------------------------------------------------------
   Overlay + dialog
   -------------------------------------------------------------------------- */

.fc-cg-overlay {
	position: fixed;
	inset: 0;
	/* Above site builders and floating chat/WhatsApp widgets. */
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(17, 19, 22, 0.62);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
	font-family: var(--fc-cg-font);
	animation: fc-cg-fade 0.18s ease-out;
}

.fc-cg-overlay[hidden] {
	display: none;
}

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

@keyframes fc-cg-rise {
	from { opacity: 0; transform: translateY(14px); }
	to   { opacity: 1; transform: translateY(0); }
}

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

.fc-cg-dialog {
	position: relative;
	width: 100%;
	max-width: 470px;
	/* Percentage of the fixed full-screen overlay, never vh: on mobile
	   browsers vh is the large-viewport height (area behind the URL bar),
	   which lets the dialog overflow the visible screen and push its top
	   (title + close button) above the display edge. */
	max-height: calc(100% - 40px);
	overflow-y: auto;
	background: #ffffff;
	border-radius: var(--fc-cg-radius);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	animation: fc-cg-rise 0.22s ease-out;
	-webkit-overflow-scrolling: touch;
}

.fc-cg-head {
	position: sticky;
	top: 0;
	z-index: 2;
	/* right padding keeps the title clear of the close button */
	padding: 22px 56px 18px 24px;
	border-bottom: 1px solid var(--fc-cg-line);
	background: linear-gradient(180deg, #fbfbfc 0%, #ffffff 100%);
	border-radius: var(--fc-cg-radius) var(--fc-cg-radius) 0 0;
}

.fc-cg-eyebrow {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 9px;
	border-radius: 20px;
	background: rgba(200, 16, 46, 0.08);
	color: var(--fc-cg-accent);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.fc-cg-title {
	margin: 0;
	color: var(--fc-cg-ink);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.35;
}

.fc-cg-sub {
	margin: 8px 0 0;
	color: var(--fc-cg-muted);
	font-size: 13px;
	line-height: 1.6;
}

.fc-cg-file {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 0 0;
	padding: 10px 12px;
	border: 1px solid var(--fc-cg-line);
	border-radius: 8px;
	background: var(--fc-cg-field);
}

.fc-cg-file-icon {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 6px;
	background: var(--fc-cg-accent);
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.fc-cg-file-name {
	color: var(--fc-cg-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
}

.fc-cg-close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.05);
	color: var(--fc-cg-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.fc-cg-close:hover,
.fc-cg-close:focus-visible {
	background: rgba(0, 0, 0, 0.1);
	color: var(--fc-cg-ink);
}

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

.fc-cg-body {
	padding: 20px 24px 24px;
}

.fc-cg-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.fc-cg-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.fc-cg-field-fw {
	grid-column: 1 / -1;
}

.fc-cg-label {
	color: var(--fc-cg-ink);
	font-size: 12.5px;
	font-weight: 600;
}

.fc-cg-req {
	color: var(--fc-cg-accent);
}

.fc-cg-input,
.fc-cg-select {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	border: 1px solid var(--fc-cg-line);
	border-radius: 8px;
	background: #ffffff;
	color: var(--fc-cg-ink);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.fc-cg-select {
	padding-right: 34px;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4 1.4 6 6l4.6-4.6 1.4 1.4L6 8.8 0 2.8z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 10px 7px;
}

.fc-cg-input:focus,
.fc-cg-select:focus {
	outline: none;
	border-color: var(--fc-cg-accent);
	box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.12);
}

.fc-cg-input::placeholder {
	color: #a3a9b1;
}

.fc-cg-input[aria-invalid="true"],
.fc-cg-select[aria-invalid="true"] {
	border-color: #d93a3a;
	box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.12);
}

/* Honeypot — visually and technically removed from the flow. */
.fc-cg-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* The form and the success panel are swapped with the hidden attribute.
   Restate display:none because a theme or Elementor rule targeting <form>
   would otherwise win over the browser default and both would show. */
.fc-cg-form[hidden],
.fc-cg-body[hidden] {
	display: none;
}

.fc-cg-note {
	margin: 14px 0 0;
	color: var(--fc-cg-muted);
	font-size: 11.5px;
	line-height: 1.6;
}

.fc-cg-error {
	margin: 14px 0 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: #fdf0f0;
	color: #b02424;
	font-size: 12.5px;
	line-height: 1.5;
}

.fc-cg-error[hidden] {
	display: none;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.fc-cg-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	width: 100%;
	margin-top: 18px;
	padding: 14px 20px;
	border: 0;
	border-radius: 8px;
	background: var(--fc-cg-accent);
	color: #ffffff;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.12s ease;
}

.fc-cg-submit:hover {
	background: var(--fc-cg-accent-dark);
}

.fc-cg-submit:active {
	transform: translateY(1px);
}

.fc-cg-submit[disabled] {
	opacity: 0.75;
	cursor: progress;
}

.fc-cg-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: fc-cg-spin 0.7s linear infinite;
}

.fc-cg-submit.is-busy .fc-cg-spinner {
	display: block;
}

.fc-cg-submit.is-busy .fc-cg-submit-label {
	opacity: 0.85;
}

/* --------------------------------------------------------------------------
   Success state
   -------------------------------------------------------------------------- */

.fc-cg-success {
	padding: 4px 0 0;
	text-align: center;
}

.fc-cg-success[hidden] {
	display: none;
}

.fc-cg-check {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	margin: 4px auto 16px;
	border-radius: 50%;
	background: rgba(18, 133, 90, 0.1);
	color: var(--fc-cg-ok);
	font-size: 26px;
	font-weight: 700;
	line-height: 1;
}

.fc-cg-success-title {
	margin: 0;
	color: var(--fc-cg-ink);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
}

.fc-cg-success-text {
	margin: 10px 0 0;
	color: var(--fc-cg-muted);
	font-size: 13.5px;
	line-height: 1.65;
}

.fc-cg-success-text strong {
	color: var(--fc-cg-ink);
}

.fc-cg-download {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 20px 0 0;
	padding: 15px 20px;
	border-radius: 8px;
	background: var(--fc-cg-accent);
	color: #ffffff;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s ease;
}

.fc-cg-download:hover,
.fc-cg-download:focus {
	background: var(--fc-cg-accent-dark);
	color: #ffffff;
	text-decoration: none;
}

.fc-cg-download[hidden] {
	display: none;
}

.fc-cg-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 22px 0 16px;
	color: var(--fc-cg-muted);
	font-size: 11.5px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.fc-cg-divider::before,
.fc-cg-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--fc-cg-line);
}

.fc-cg-contact {
	display: flex;
	flex-direction: column;
	gap: 9px;
}

.fc-cg-contact a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 16px;
	border: 1px solid var(--fc-cg-line);
	border-radius: 8px;
	background: #ffffff;
	color: var(--fc-cg-ink);
	font-size: 13.5px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.fc-cg-contact a:hover {
	border-color: var(--fc-cg-accent);
	background: #fdf7f8;
	text-decoration: none;
}

/* --------------------------------------------------------------------------
   Responsive — mobile and landscape phones
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
	.fc-cg-overlay {
		align-items: flex-end;
		padding: 0;
	}

	.fc-cg-dialog {
		max-width: 100%;
		max-height: calc(100% - 12px);
		border-radius: 16px 16px 0 0;
	}

	.fc-cg-head {
		border-radius: 16px 16px 0 0;
		padding: 20px 54px 16px 18px;
	}

	.fc-cg-body {
		padding: 18px 18px calc(26px + env(safe-area-inset-bottom, 0px));
	}

	.fc-cg-title {
		font-size: 17.5px;
	}

	.fc-cg-grid {
		gap: 12px;
	}

	.fc-cg-input,
	.fc-cg-select {
		font-size: 16px; /* prevents iOS zoom on focus */
	}
}

@media (max-width: 380px) {
	.fc-cg-grid {
		grid-template-columns: 1fr;
	}
}

/* Landscape phones with little height */
@media (orientation: landscape) and (max-height: 520px) {
	.fc-cg-overlay {
		align-items: center;
		padding: 10px;
	}

	.fc-cg-dialog {
		max-height: calc(100% - 20px);
		border-radius: var(--fc-cg-radius);
	}

	.fc-cg-head {
		padding: 16px 52px 12px 20px;
		border-radius: var(--fc-cg-radius) var(--fc-cg-radius) 0 0;
	}

	.fc-cg-file {
		display: none;
	}

	.fc-cg-body {
		padding: 16px 20px 20px;
	}
}

/* Users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
	.fc-cg-overlay,
	.fc-cg-dialog {
		animation: none;
	}
}

html.fc-cg-locked,
html.fc-cg-locked body {
	overflow: hidden;
}
