/* AVELOR — Контакти
 * Extension styles for the Contact page. Loaded AFTER avelor-shipping.css
 * and avelor-faq.css (which contributes .faq-closer / .faq-block-sub).
 *
 * Adds:
 *   .ct-channels        — 01 channels grid (Phone / Email / Schedule)
 *   .ct-topics-lede     — 02 «Напишіть нам, якщо хочете:» line
 *   .ct-topics          — 02 checklist of common request topics
 *   .ct-form            — 03 feedback form (fields, chips, foot, submit)
 *   .ct-sent            — 03 success state after submission
 *   .ct-form-error      — 03 inline error band (validation / throttle)
 *   .ct-honeypot        — bot trap (visually hidden, off-screen)
 *   .ct-article         — narrower article max-width so the form breathes
 */

/* =========================================================
   01 · Channels grid
   ========================================================= */
.ct-channels {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

/* Vertical card layout: icon on top, then eyebrow / value / hint stacked.
   The .ct-article cap of 68ch makes each card ~195px on desktop, which is
   too narrow for the previous icon+body+arrow horizontal row. */
.ct-channel {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding: 22px 22px 24px;
	min-height: 172px;
	background: var(--avelor-white);
	border: 1px solid var(--avelor-line);
	border-radius: var(--radius-lg);
	color: var(--fg-primary);
	text-decoration: none;
	transition: border-color var(--dur-base) var(--ease-out),
	            background-color var(--dur-base) var(--ease-out);
}

a.ct-channel:hover { border-color: var(--avelor-graphite); }

a.ct-channel:hover .ct-channel-arr {
	transform: translateX(2px);
	color: var(--avelor-deep-green);
}

.ct-channel-num {
	position: absolute;
	top: 18px;
	right: 18px;
	font-size: 11px;
	letter-spacing: 0.18em;
	font-weight: 600;
	color: var(--avelor-line);
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

.ct-channel-icon {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--avelor-milk);
	border: 1px solid var(--avelor-line);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--avelor-deep-green);
	flex-shrink: 0;
}

.ct-channel-icon svg { width: 20px; height: 20px; }

.ct-channel-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
	flex: 1;
}

.ct-channel-k {
	font-size: 11px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--fg-muted);
}

.ct-channel-v {
	font-size: 16px;
	font-weight: 500;
	letter-spacing: -0.005em;
	color: var(--avelor-graphite);
	font-variant-numeric: tabular-nums;
	line-height: 1.35;
	word-break: break-word;
}

.ct-channel-h {
	font-size: 12px;
	color: var(--fg-muted);
	margin-top: 2px;
	line-height: 1.5;
}

.ct-channel-arr {
	position: absolute;
	right: 18px;
	bottom: 18px;
	font-size: 14px;
	color: var(--fg-muted);
	transition: transform var(--dur-base) var(--ease-out),
	            color var(--dur-base) var(--ease-out);
}

/* =========================================================
   02 · Topics — lede + checklist
   ========================================================= */
.ct-topics-lede {
	font-size: 16px;
	line-height: 1.65;
	color: var(--fg-primary);
	margin: 0 !important;
	text-wrap: pretty;
}

.ct-topics {
	list-style: none;
	margin: 4px 0 12px;
	padding: 0;
	border-top: 1px solid var(--avelor-line);
}

.ct-topics li {
	display: grid;
	grid-template-columns: 28px 1fr;
	gap: 18px;
	align-items: baseline;
	padding: 16px 0;
	border-bottom: 1px solid var(--avelor-line);
}

.ct-topics li .ic {
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: rgba(31, 61, 53, 0.08);
	color: var(--avelor-deep-green);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: start;
	margin-top: 2px;
}

.ct-topics li .ic svg { width: 14px; height: 14px; }

.ct-topics li .t {
	font-size: 15px;
	line-height: 1.55;
	color: var(--avelor-graphite);
	letter-spacing: -0.005em;
}

/* =========================================================
   03 · Form
   ========================================================= */
.ct-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin-top: 4px;
}

.ct-form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.ct-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0;
}

.ct-lbl {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 12px;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 500;
	color: var(--fg-secondary);
}

.ct-lbl-hint {
	font-size: 11px;
	letter-spacing: 0;
	text-transform: none;
	font-weight: 400;
	color: var(--fg-muted);
	font-style: normal;
}

.ct-input {
	width: 100%;
	font: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--avelor-graphite);
	background: var(--avelor-white);
	border: 1px solid var(--avelor-line);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	transition: border-color var(--dur-fast) var(--ease-out),
	            background-color var(--dur-fast) var(--ease-out),
	            box-shadow var(--dur-fast) var(--ease-out);
}

.ct-input:hover { border-color: var(--avelor-graphite); }

.ct-input:focus {
	outline: none;
	border-color: var(--avelor-deep-green);
	box-shadow: 0 0 0 3px rgba(31, 61, 53, 0.08);
}

.ct-input::placeholder { color: var(--fg-muted); }

.ct-textarea {
	resize: vertical;
	min-height: 132px;
	padding: 14px 16px;
	line-height: 1.6;
}

/* Topic chips — label-wrapping-radio variant so server form posts a value */
.ct-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ct-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 36px;
	line-height: 1;
	background: var(--avelor-white);
	border: 1px solid var(--avelor-line);
	color: var(--fg-secondary);
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.005em;
	padding: 0 16px;
	border-radius: 999px;
	cursor: pointer;
	user-select: none;
	transition: border-color var(--dur-fast) var(--ease-out),
	            color var(--dur-fast) var(--ease-out),
	            background-color var(--dur-fast) var(--ease-out);
}

.ct-chip span {
	display: inline-block;
	line-height: 1;
}

.ct-chip:hover {
	border-color: var(--avelor-graphite);
	color: var(--avelor-graphite);
}

.ct-chip input {
	/* visually hide the radio but keep it keyboard-focusable */
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* Active state is driven entirely by :checked — no static class needed.
   Keeping .is-on as a defensive fallback if a future use ever needs to
   force-style a chip server-side. */
.ct-chip:has(input:checked),
.ct-chip.is-on {
	background: var(--avelor-deep-green);
	border-color: var(--avelor-deep-green);
	color: var(--avelor-milk);
}

.ct-chip:has(input:focus-visible) {
	box-shadow: 0 0 0 3px rgba(31, 61, 53, 0.18);
}

/* Form foot — note + submit */
.ct-form-foot {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
	padding-top: 18px;
	border-top: 1px solid var(--avelor-line);
	margin-top: 4px;
}

.ct-form-note {
	font-size: 12px;
	line-height: 1.55;
	color: var(--fg-muted);
	margin: 0;
	max-width: 48ch;
	text-wrap: pretty;
}

.ct-form-note a {
	color: var(--avelor-graphite);
	border-bottom: 1px solid var(--avelor-line);
	text-decoration: none;
	transition: border-color var(--dur-fast) var(--ease-out),
	            color var(--dur-fast) var(--ease-out);
}

.ct-form-note a:hover {
	color: var(--avelor-deep-green);
	border-bottom-color: var(--avelor-deep-green);
}

.ct-submit {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 26px;
	background: var(--avelor-deep-green);
	color: var(--avelor-milk);
	border: 1px solid var(--avelor-deep-green);
	font: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.01em;
	border-radius: var(--radius-lg);
	cursor: pointer;
	transition: background-color var(--dur-base) var(--ease-out),
	            transform var(--dur-fast) var(--ease-out);
}

.ct-submit:hover { background: var(--avelor-green-hover, #294B41); color: var(--avelor-milk); }
.ct-submit:active { transform: scale(0.985); }
.ct-submit svg { width: 16px; height: 16px; }

/* Honeypot — visually hidden but reachable to bots */
.ct-honeypot {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden;
}

/* Inline error band */
.ct-form-error {
	background: rgba(178, 58, 58, 0.06);
	border: 1px solid rgba(178, 58, 58, 0.25);
	color: var(--status-error, #B23A3A);
	padding: 14px 18px;
	border-radius: var(--radius-md);
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 8px;
}

/* Sent state */
.ct-sent {
	background: var(--avelor-white);
	border: 1px solid var(--avelor-line);
	border-radius: var(--radius-lg);
	padding: 32px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	align-items: flex-start;
}

.ct-sent .ic {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: rgba(31, 61, 53, 0.08);
	color: var(--avelor-deep-green);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 4px;
}

.ct-sent .ic svg { width: 22px; height: 22px; }

.ct-sent .t {
	font-family: var(--font-display, var(--font-body));
	font-size: 22px;
	line-height: 1.25;
	letter-spacing: -0.01em;
	font-weight: 500;
	color: var(--avelor-graphite);
	max-width: 32ch;
}

.ct-sent .m {
	font-size: 14px;
	line-height: 1.6;
	color: var(--fg-secondary);
	margin: 0;
	max-width: 48ch;
}

.ct-sent-again {
	margin-top: 8px;
	display: inline-block;
	background: transparent;
	border: 0;
	padding: 0;
	font: inherit;
	font-size: 13px;
	font-weight: 500;
	color: var(--avelor-deep-green);
	border-bottom: 1px solid var(--avelor-line);
	cursor: pointer;
	text-decoration: none;
	transition: border-color var(--dur-fast) var(--ease-out);
}

.ct-sent-again:hover { border-bottom-color: var(--avelor-deep-green); color: var(--avelor-deep-green); }

/* Tighten article max-width on contact page — the form needs more breathing room */
.ct-article { max-width: 68ch; }

/* =========================================================
   Mobile
   ========================================================= */
@media (max-width: 1024px) {
	.ct-channels { grid-template-columns: 1fr; }

	/* On mobile the card has room for an icon | text | arrow row again. */
	.ct-channel {
		flex-direction: row;
		align-items: center;
		gap: 14px;
		padding: 18px;
		min-height: 0;
	}

	.ct-channel-num { display: none; }
	.ct-channel-icon { width: 40px; height: 40px; }
	.ct-channel-icon svg { width: 18px; height: 18px; }
	.ct-channel-body { gap: 2px; }

	.ct-channel-arr {
		position: static;
		align-self: center;
	}

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

	.ct-form-foot {
		grid-template-columns: 1fr;
		gap: 14px;
	}

	.ct-submit {
		justify-self: stretch;
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.ct-topics li {
		grid-template-columns: 24px 1fr;
		gap: 12px;
		padding: 14px 0;
	}

	.ct-topics li .t { font-size: 14px; }

	.ct-sent { padding: 22px; }

	.ct-sent .t { font-size: 18px; }
}
