/*
 * AKIBEMAG RFQ interface.
 * Website design and development copyright (c) 2026 Henry Zacharia.
 * Instagram: @jezakh | WhatsApp: +255686479877
 */

.akb-rfq {
	--akb-navy: #08183c;
	--akb-gold: #f5b51b;
	--akb-ink: #10182a;
	--akb-muted: #596273;
	--akb-line: #d9dee8;
	--akb-surface: #f4f6f9;
	color: var(--akb-ink);
	font-family: inherit;
}

.akb-rfq *,
.akb-rfq *::before,
.akb-rfq *::after {
	box-sizing: border-box;
}

.akb-rfq__form {
	display: grid;
	gap: clamp(2rem, 5vw, 4.5rem);
}

.akb-rfq__section {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.akb-rfq__section legend {
	display: flex;
	align-items: center;
	width: 100%;
	margin: 0 0 1.5rem;
	padding: 0 0 1rem;
	border-bottom: 1px solid var(--akb-line);
	color: var(--akb-navy);
	font-size: clamp(1.35rem, 2.4vw, 2rem);
	font-weight: 750;
	line-height: 1.15;
	letter-spacing: -0.025em;
}

.akb-rfq__section legend span {
	display: inline-grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	margin-right: 0.8rem;
	background: var(--akb-gold);
	color: var(--akb-navy);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	clip-path: polygon(0.55rem 0, 100% 0, 100% calc(100% - 0.55rem), calc(100% - 0.55rem) 100%, 0 100%, 0 0.55rem);
}

.akb-rfq__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.35rem 1.5rem;
}

.akb-rfq__field {
	display: grid;
	align-content: start;
	gap: 0.55rem;
}

.akb-rfq__field--wide {
	grid-column: 1 / -1;
}

.akb-rfq__field label {
	color: var(--akb-navy);
	font-size: 0.82rem;
	font-weight: 750;
	line-height: 1.3;
	letter-spacing: 0.045em;
	text-transform: uppercase;
}

.akb-rfq__field label > span[aria-hidden="true"],
.akb-rfq__consent label > span {
	color: #a43a29;
}

.akb-rfq__optional {
	margin-left: 0.4rem;
	color: var(--akb-muted);
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
}

.akb-rfq input[type="text"],
.akb-rfq input[type="email"],
.akb-rfq input[type="tel"],
.akb-rfq input[type="date"],
.akb-rfq input[type="file"],
.akb-rfq select,
.akb-rfq textarea {
	width: 100%;
	min-height: 3.35rem;
	margin: 0;
	padding: 0.85rem 1rem;
	border: 1px solid var(--akb-line);
	border-radius: 0;
	background: #fff;
	color: var(--akb-ink);
	font: inherit;
	line-height: 1.5;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.akb-rfq textarea {
	min-height: 8rem;
	resize: vertical;
}

.akb-rfq input[type="file"] {
	min-height: 4.2rem;
	padding: 1rem;
	border-style: dashed;
	background: var(--akb-surface);
}

.akb-rfq input:focus-visible,
.akb-rfq select:focus-visible,
.akb-rfq textarea:focus-visible,
.akb-rfq button:focus-visible {
	outline: 3px solid rgba(245, 181, 27, 0.62);
	outline-offset: 3px;
	border-color: var(--akb-navy);
}

.akb-rfq__field small {
	max-width: 72ch;
	color: var(--akb-muted);
	font-size: 0.79rem;
	line-height: 1.55;
}

.akb-rfq__consent {
	display: grid;
	grid-template-columns: auto 1fr;
	align-items: start;
	gap: 0.75rem;
	padding: 1.25rem;
	border-left: 4px solid var(--akb-gold);
	background: var(--akb-surface);
}

.akb-rfq__consent input {
	width: 1.25rem;
	height: 1.25rem;
	margin: 0.15rem 0 0;
	accent-color: var(--akb-navy);
}

.akb-rfq__consent label {
	font-size: 0.9rem;
	line-height: 1.55;
}

.akb-rfq__submit {
	display: grid;
	grid-template-columns: minmax(13rem, auto) 1fr;
	align-items: center;
	gap: 1.5rem;
}

.akb-rfq__submit button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 3.7rem;
	padding: 0.95rem 1.25rem 0.95rem 1.5rem;
	border: 0;
	background: var(--akb-gold);
	color: var(--akb-navy);
	font: inherit;
	font-size: 0.88rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	cursor: pointer;
	clip-path: polygon(0.75rem 0, 100% 0, 100% calc(100% - 0.75rem), calc(100% - 0.75rem) 100%, 0 100%, 0 0.75rem);
	transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.akb-rfq__submit button:hover {
	background: var(--akb-navy);
	color: #fff;
	transform: translateY(-2px);
}

.akb-rfq__submit button span {
	font-size: 1.25rem;
}

.akb-rfq__submit p {
	max-width: 58ch;
	margin: 0;
	color: var(--akb-muted);
	font-size: 0.78rem;
	line-height: 1.55;
}

.akb-rfq__notice {
	margin: 0 0 2rem;
	padding: 1.25rem 1.5rem;
	border-left: 5px solid var(--akb-gold);
	background: var(--akb-navy);
	color: #fff;
}

.akb-rfq__notice--error {
	border-left-color: #d75742;
	background: #3e1720;
}

.akb-rfq__notice p {
	margin: 0;
}

.akb-rfq__notice ul {
	margin: 0.75rem 0 0;
	padding-left: 1.25rem;
}

.akb-rfq__trap {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

@media (max-width: 700px) {
	.akb-rfq__grid,
	.akb-rfq__submit {
		grid-template-columns: 1fr;
	}

	.akb-rfq__field--wide {
		grid-column: auto;
	}

	.akb-rfq__submit button {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.akb-rfq *,
	.akb-rfq *::before,
	.akb-rfq *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.001ms !important;
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media (forced-colors: active) {
	.akb-rfq__section legend span,
	.akb-rfq__submit button,
	.akb-rfq__notice {
		border: 2px solid currentColor;
		clip-path: none;
	}
}
