/*
 * forms.css — Latina Network native forms
 *
 * Loaded globally via ln_form_enqueue_assets() (Phase 11). Depends on
 * main.css for all --ln-* custom property tokens.
 *
 * Default dark-surface context: fields are designed for use on --ln-plum-dark
 * backgrounds (apply page, event pages). Typography and spacing follow the
 * established card and page conventions.
 *
 * Phase 11 — Latina Network theme rebuild.
 */

/* ── Form container ─────────────────────────────────────────────────────── */

.ln-form {
	width: 100%;
	max-width: 640px;
}

/* ── Two-column row ─────────────────────────────────────────────────────── */

.ln-form__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 1.25rem;
}

@media ( max-width: 480px ) {
	.ln-form__row {
		grid-template-columns: 1fr;
	}
}

/* ── Field group ────────────────────────────────────────────────────────── */

.ln-form__group {
	margin-bottom: 1.375rem;
}

/* ── Label ──────────────────────────────────────────────────────────────── */

.ln-form__label {
	display: block;
	font-family: var(--ln-font-body);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--ln-crema);
	margin-bottom: 0.4375rem;
	line-height: 1.4;
}

.ln-form__required {
	color: var(--ln-tierra);
	margin-left: 0.2em;
}

/* ── Input, textarea, select ────────────────────────────────────────────── */

.ln-form__input,
.ln-form__textarea,
.ln-form__select {
	display: block;
	width: 100%;
	padding: 0.8125rem 1rem;
	font-family: var(--ln-font-body);
	font-size: 0.9375rem;
	font-weight: 400;
	line-height: 1.5;
	color: var(--ln-crema);
	background: rgba(245, 237, 216, 0.05);
	border: 1px solid rgba(245, 237, 216, 0.18);
	border-radius: 1px;
	box-sizing: border-box;
	transition: border-color 0.15s ease, background 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.ln-form__input:focus,
.ln-form__textarea:focus,
.ln-form__select:focus {
	outline: none;
	border-color: var(--ln-oro);
	background: rgba(245, 237, 216, 0.09);
}

.ln-form__input::placeholder,
.ln-form__textarea::placeholder {
	color: rgba(245, 237, 216, 0.3);
}

/* ── Textarea ───────────────────────────────────────────────────────────── */

.ln-form__textarea {
	min-height: 7.5rem;
	resize: vertical;
}

/* ── Select ─────────────────────────────────────────────────────────────── */

.ln-form__select {
	cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7' viewBox='0 0 12 7'%3E%3Cpath d='M1 1l5 4.5L11 1' stroke='%23D4A853' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 1rem center;
	padding-right: 2.75rem;
}

.ln-form__select option {
	background: var(--ln-plum-dark);
	color: var(--ln-crema);
}

/* ── Help text ──────────────────────────────────────────────────────────── */

.ln-form__help {
	font-family: var(--ln-font-body);
	font-size: 0.75rem;
	color: rgba(245, 237, 216, 0.5);
	margin: 0.375rem 0 0;
	line-height: 1.55;
}

/* ── Submit button ──────────────────────────────────────────────────────── */

.ln-form__submit {
	display: inline-block;
	padding: 0.9375rem 2.125rem;
	font-family: var(--ln-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	letter-spacing: 0.03em;
	color: #fff;
	background: var(--ln-tierra);
	border: none;
	border-radius: 1px;
	cursor: pointer;
	margin-top: 0.25rem;
	transition: background 0.15s ease;
}

.ln-form__submit:hover,
.ln-form__submit:focus-visible {
	background: var(--ln-tierra-light);
	outline: none;
}

.ln-form__submit:disabled {
	opacity: 0.48;
	cursor: not-allowed;
}

/* ── Confirmation and error message ─────────────────────────────────────── */

.ln-form__message {
	margin-top: 1.25rem;
	font-family: var(--ln-font-body);
	font-size: 0.9375rem;
	line-height: 1.65;
	min-height: 1.5em;
}

.ln-form__message--success {
	color: var(--ln-agua-viva);
}

.ln-form__message--error {
	color: #e08060;
}

/* ── Guest intake page and field intros ─────────────────────────────────── */

.ln-form-guest__intro {
	font-family: var(--ln-font-body);
	font-size: 1.0625rem;
	line-height: 1.75;
	color: var(--ln-crema);
	opacity: 0.88;
	margin: 0 0 1.75rem;
}

.ln-form-guest__field-intro {
	font-family: var(--ln-font-display);
	font-style: italic;
	font-size: 1.375rem;
	font-weight: 300;
	color: var(--ln-crema);
	margin: 0 0 1.5rem;
}

/* ── Newsletter row layout ──────────────────────────────────────────────── */

.ln-form__row--newsletter {
	grid-template-columns: 1fr 1.4fr 1fr auto;
	align-items: flex-end;
}

.ln-form__group--submit {
	margin-bottom: 1.375rem;
}

.ln-form--newsletter .ln-form__submit {
	white-space: nowrap;
	width: 100%;
	padding: 0.8125rem 1.25rem;
}

@media ( max-width: 640px ) {
	.ln-form__row--newsletter {
		grid-template-columns: 1fr;
	}
}

/* ── Responsive — stack all forms on mobile ─────────────────────────────── */

@media ( max-width: 480px ) {
	.ln-form__row {
		grid-template-columns: 1fr;
	}

	.ln-form__submit {
		width: 100%;
		text-align: center;
	}
}
