/*
 * formspree.css — Twin Oaks Imaginations
 * Contact form styles
 * Palette inherits from styles.css CSS variables
 */

@import url('https://fonts.googleapis.com/css2?family=Figtree:wght@400;600;700&display=swap');

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

.toi-form {
	display: grid;
	row-gap: 24px;
	max-width: 760px;
	margin: 0 auto;
	font-family: 'Figtree', 'Trebuchet MS', Tahoma, sans-serif;
}

/* ---- Fieldsets ---- */

.toi-form fieldset {
	border: 1px solid rgba(196, 164, 114, 0.4);
	border-radius: 12px;
	padding: 28px 28px 24px;
	background-color: rgba(61, 26, 6, 0.5);
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 20px;
	row-gap: 18px;
	position: relative;
}

.toi-form legend {
	color: var(--gold, #ffd700);
	font-family: 'Figtree', 'Trebuchet MS', sans-serif;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	padding: 0 10px;
	margin-left: 8px;
}

/* ---- Field wrapper ---- */

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

.fs-field.col-span-full {
	grid-column: 1 / -1;
}

/* ---- Labels ---- */

.fs-label {
	color: #c4a472;
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Required asterisk color */
.fs-label span[aria-hidden] {
	color: #ff9966;
	margin-left: 2px;
}

/* ---- Inputs and selects ---- */

.fs-input,
.fs-select {
	appearance: none;
	background-color: rgba(245, 230, 200, 0.06);
	border: 1px solid rgba(196, 164, 114, 0.4);
	border-radius: 8px;
	color: #f5e6c8;
	font-family: 'Figtree', 'Trebuchet MS', sans-serif;
	font-size: 0.95rem;
	height: 44px;
	outline: none;
	padding: 0 14px;
	transition:
		border-color 150ms ease,
		background-color 150ms ease,
		box-shadow 150ms ease;
	width: 100%;
}

.fs-input::placeholder {
	color: rgba(196, 164, 114, 0.5);
	font-style: italic;
}

.fs-input:focus,
.fs-select:focus {
	background-color: rgba(245, 230, 200, 0.1);
	border-color: #ffd700;
	box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
}

/* Date input — fix browser default icon color on dark bg */
.fs-input[type='date'] {
	color-scheme: dark;
}

/* ---- Select ---- */

.fs-select {
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23C4A472' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 12px center;
	background-repeat: no-repeat;
	background-size: 1.3em;
	cursor: pointer;
	padding-right: 40px;
}

.fs-select option {
	background-color: #3d1a06;
	color: #f5e6c8;
}

/* ---- Textarea ---- */

.fs-textarea {
	appearance: none;
	background-color: rgba(245, 230, 200, 0.06);
	border: 1px solid rgba(196, 164, 114, 0.4);
	border-radius: 8px;
	color: #f5e6c8;
	font-family: 'Figtree', 'Trebuchet MS', sans-serif;
	font-size: 0.95rem;
	line-height: 1.6;
	min-height: 110px;
	outline: none;
	padding: 12px 14px;
	resize: vertical;
	transition:
		border-color 150ms ease,
		background-color 150ms ease,
		box-shadow 150ms ease;
	width: 100%;
}

.fs-textarea::placeholder {
	color: rgba(196, 164, 114, 0.5);
	font-style: italic;
}

.fs-textarea:focus {
	background-color: rgba(245, 230, 200, 0.1);
	border-color: #ffd700;
	box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.12);
}

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

.fs-button-group {
	display: flex;
	justify-content: center;
	padding-top: 4px;
}

.fs-button {
	background-color: #4a7c59;
	border: none;
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
	font-family: 'Figtree', 'Trebuchet MS', sans-serif;
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	min-width: 200px;
	padding: 14px 40px;
	text-transform: uppercase;
	transition:
		background-color 180ms ease,
		transform 100ms ease,
		box-shadow 180ms ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.fs-button:hover {
	background-color: #35593f;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.fs-button:active {
	transform: scale(0.98);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.fs-button:focus-visible {
	outline: 3px solid #ffd700;
	outline-offset: 3px;
}

/* reCAPTCHA container alignment */
.g-recaptcha {
	display: flex;
	justify-content: center;
	margin-bottom: 8px;
}

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

@media screen and (max-width: 640px) {
	.toi-form fieldset {
		grid-template-columns: 1fr;
		padding: 20px 16px 18px;
	}

	.fs-field.col-span-full {
		grid-column: 1;
	}

	.fs-button {
		width: 100%;
	}
}
