/* =====================================================================
   Speed Contact Form — Frontend
   Dark premium card · gold labels · underline inputs
   ===================================================================== */

.scf-wrap {
	--scf-bg: #16151c;
	--scf-bg-soft: #1c1b24;
	--scf-gold: #d9b877;
	--scf-gold-strong: #e6c98a;
	--scf-text: #e9e7ef;
	--scf-muted: #8a8794;
	--scf-line: rgba(233, 231, 239, 0.18);
	--scf-line-focus: var(--scf-gold);
	--scf-error: #ff7a7a;
	--scf-success: #7fe0a7;
	--scf-radius: 14px;

	box-sizing: border-box;
	max-width: 800px;
	margin: 0 auto;
	font-family: inherit;
}

.scf-wrap *,
.scf-wrap *::before,
.scf-wrap *::after {
	box-sizing: inherit;
}

.scf-form {
	background: linear-gradient(180deg, var(--scf-bg-soft) 0%, var(--scf-bg) 100%);
	border: 1px solid rgba(233, 231, 239, 0.06);
	border-radius: var(--scf-radius);
	padding: 40px 36px 32px;
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.04) inset,
		0 24px 60px -24px rgba(0, 0, 0, 0.6);
}

/* ------- Fields ------- */

.scf-field {
	margin-bottom: 26px;
	position: relative;
}

.scf-fieldset {
	border: 0;
	padding: 0;
	margin-left: 0;
	margin-right: 0;
	min-width: 0;
}

.scf-label {
	display: block;
	color: #ffffff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	margin-bottom: 8px;
	line-height: 1.4;
}

.scf-req {
	color: #ffffff;
	margin-left: 2px;
}

.scf-optional {
	color: var(--scf-muted);
	font-weight: 400;
	font-size: 12px;
}

.scf-input,
.scf-select {
	display: block;
	width: 100%;
	background: transparent;
	border: 0;
	border-bottom: 1px solid var(--scf-line);
	border-radius: 0;
	color: var(--scf-text);
	font-size: 15px;
	font-family: inherit;
	line-height: 1.5;
	padding: 8px 2px 10px;
	outline: none;
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
	-webkit-appearance: none;
	appearance: none;
}

.scf-input::placeholder {
	color: var(--scf-muted);
	opacity: 1;
}

.scf-input:focus,
.scf-select:focus {
	border-bottom-color: var(--scf-line-focus);
	box-shadow: 0 1px 0 0 var(--scf-line-focus);
}

.scf-input:focus-visible,
.scf-select:focus-visible,
.scf-radio input:focus-visible + .scf-radio-dot,
.scf-submit:focus-visible {
	outline: 2px solid var(--scf-gold);
	outline-offset: 3px;
	border-radius: 4px;
}

.scf-textarea {
	resize: vertical;
	min-height: 96px;
}

/* ------- Phone row + country code selector ------- */

.scf-phone-row {
	display: flex;
	align-items: flex-end;
	gap: 12px;
}

.scf-phone-row .scf-input {
	flex: 1 1 auto;
	min-width: 0;
}

.scf-cc {
	position: relative;
	flex: 0 0 auto;
}

.scf-wrap .scf-cc-toggle {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: #1e1d27 !important;
	background-image: none !important;
	border: 1px solid var(--scf-line) !important;
	border-radius: 8px;
	box-shadow: none !important;
	color: var(--scf-text) !important;
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: normal;
	padding: 8px 12px;
	cursor: pointer;
	transition: border-color 0.25s ease, background 0.25s ease;
}

.scf-wrap .scf-cc-toggle:hover,
.scf-wrap .scf-cc.scf-cc-open .scf-cc-toggle {
	background: #24222e !important;
	border-color: var(--scf-gold) !important;
}

.scf-cc-toggle:focus-visible {
	outline: 2px solid var(--scf-gold);
	outline-offset: 3px;
	border-radius: 4px;
}

.scf-cc-flag {
	font-size: 17px;
	line-height: 1;
}

.scf-cc-code {
	font-variant-numeric: tabular-nums;
}

.scf-cc-caret {
	width: 7px;
	height: 7px;
	border-right: 1.5px solid var(--scf-gold);
	border-bottom: 1.5px solid var(--scf-gold);
	transform: rotate(45deg) translateY(-2px);
	transition: transform 0.2s ease;
}

.scf-cc.scf-cc-open .scf-cc-caret {
	transform: rotate(-135deg) translateY(-2px);
}

.scf-cc-panel {
	position: absolute;
	z-index: 40;
	top: calc(100% + 8px);
	left: 0;
	width: 290px;
	max-width: 78vw;
	background: var(--scf-bg-soft);
	border: 1px solid rgba(233, 231, 239, 0.12);
	border-radius: 10px;
	box-shadow: 0 20px 44px -16px rgba(0, 0, 0, 0.75);
	padding: 10px;
	animation: scf-fade 0.18s ease;
}

.scf-cc-search {
	display: block;
	width: 100%;
	background: rgba(233, 231, 239, 0.05);
	border: 1px solid var(--scf-line);
	border-radius: 7px;
	color: var(--scf-text);
	font-family: inherit;
	font-size: 14px;
	padding: 8px 10px;
	margin-bottom: 8px;
	outline: none;
	transition: border-color 0.2s ease;
}

.scf-cc-search::placeholder {
	color: var(--scf-muted);
}

.scf-cc-search:focus {
	border-color: var(--scf-gold);
}

.scf-cc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 232px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scrollbar-width: thin;
	scrollbar-color: rgba(233, 231, 239, 0.25) transparent;
}

.scf-cc-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 9px;
	border-radius: 7px;
	color: var(--scf-text);
	font-size: 14px;
	cursor: pointer;
	transition: background 0.12s ease;
}

.scf-cc-item .scf-cc-flag {
	font-size: 16px;
}

.scf-cc-item-name {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.scf-cc-item-dial {
	color: var(--scf-muted);
	font-variant-numeric: tabular-nums;
	flex: 0 0 auto;
}

.scf-cc-item:hover,
.scf-cc-item.scf-cc-active {
	background: rgba(217, 184, 119, 0.12);
}

.scf-cc-item.scf-cc-selected .scf-cc-item-dial {
	color: var(--scf-gold);
}

.scf-cc-empty {
	color: var(--scf-muted);
	font-size: 13px;
	padding: 10px 9px;
}

/* Select with custom chevron */
.scf-select-shell {
	position: relative;
}

.scf-select-shell::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 8px;
	height: 8px;
	border-right: 1.5px solid var(--scf-gold);
	border-bottom: 1.5px solid var(--scf-gold);
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
	transition: transform 0.2s ease;
}

.scf-select {
	padding-right: 28px;
	cursor: pointer;
}

.scf-select option {
	background: var(--scf-bg);
	color: var(--scf-text);
}

/* ------- Radios ------- */

.scf-radio-row {
	display: flex;
	gap: 28px;
	padding-top: 2px;
}

.scf-radio {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: var(--scf-text);
	font-size: 14px;
	cursor: pointer;
	user-select: none;
}

.scf-radio input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.scf-radio-dot {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 1.5px solid var(--scf-line);
	position: relative;
	transition: border-color 0.2s ease;
	flex: 0 0 auto;
}

.scf-radio:hover .scf-radio-dot {
	border-color: var(--scf-gold);
}

.scf-radio input:checked + .scf-radio-dot {
	border-color: var(--scf-gold);
}

.scf-radio input:checked + .scf-radio-dot::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--scf-gold);
	animation: scf-pop 0.18s ease;
}

@keyframes scf-pop {
	from { transform: scale(0.4); opacity: 0; }
	to   { transform: scale(1);   opacity: 1; }
}

/* ------- Conditional website field ------- */

.scf-website-field {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	margin-bottom: 0;
	transform: translateY(-6px);
	transition:
		max-height 0.35s cubic-bezier(0.33, 1, 0.68, 1),
		opacity 0.3s ease 0.05s,
		transform 0.35s cubic-bezier(0.33, 1, 0.68, 1),
		margin-bottom 0.35s ease;
}

.scf-website-field.scf-open {
	max-height: 140px;
	opacity: 1;
	transform: translateY(0);
	margin-bottom: 26px;
}

/* ------- Validation states ------- */

.scf-error {
	display: block;
	color: var(--scf-error);
	font-size: 12px;
	line-height: 1.4;
	margin-top: 6px;
	min-height: 0;
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.25s ease, opacity 0.25s ease;
}

.scf-field.scf-invalid .scf-error {
	max-height: 48px;
	opacity: 1;
}

.scf-field.scf-invalid .scf-input,
.scf-field.scf-invalid .scf-select {
	border-bottom-color: var(--scf-error);
}

.scf-field.scf-valid .scf-input {
	border-bottom-color: rgba(127, 224, 167, 0.5);
}

/* ------- Notices ------- */

.scf-notice {
	border-radius: 10px;
	padding: 13px 16px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 22px;
	border: 1px solid transparent;
	animation: scf-fade 0.3s ease;
}

.scf-notice.scf-notice-success {
	background: rgba(127, 224, 167, 0.08);
	border-color: rgba(127, 224, 167, 0.35);
	color: var(--scf-success);
}

.scf-notice.scf-notice-error {
	background: rgba(255, 122, 122, 0.07);
	border-color: rgba(255, 122, 122, 0.35);
	color: var(--scf-error);
}

@keyframes scf-fade {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ------- Submit button ------- */

.scf-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	border: 0;
	border-radius: 8px;
	background: linear-gradient(180deg, var(--scf-gold-strong) 0%, var(--scf-gold) 100%);
	color: #211b0e;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.01em;
	padding: 14px 20px;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
	box-shadow: 0 10px 26px -12px rgba(217, 184, 119, 0.55);
}

.scf-submit:hover {
	filter: brightness(1.05);
	transform: translateY(-1px);
	box-shadow: 0 14px 30px -12px rgba(217, 184, 119, 0.65);
}

.scf-submit:active {
	transform: translateY(0);
}

.scf-submit:disabled {
	cursor: not-allowed;
	filter: grayscale(0.25) brightness(0.9);
	transform: none;
}

/* Spinner */
.scf-spinner {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(33, 27, 14, 0.25);
	border-top-color: #211b0e;
	display: none;
	animation: scf-spin 0.7s linear infinite;
	flex: 0 0 auto;
}

.scf-form.scf-loading .scf-spinner {
	display: inline-block;
}

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

/* Honeypot — visually removed, still in the DOM for bots */
.scf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ------- Responsive ------- */

@media (max-width: 600px) {
	.scf-form {
		padding: 28px 20px 24px;
		border-radius: 12px;
	}

	.scf-field {
		margin-bottom: 22px;
	}

	.scf-radio-row {
		gap: 20px;
	}

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

/* ------- Reduced motion ------- */

@media (prefers-reduced-motion: reduce) {
	.scf-wrap *,
	.scf-wrap *::before,
	.scf-wrap *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
