/**
 * Nicole — Formulario de solicitud (diálogo). Los colores vienen de los controles del widget (variables --nf-*) y, si no
 * se tocan, de los colores globales del Kit. Escritorio: diálogo centrado. Móvil: panel inferior (bottom sheet).
 */

.nn-form {
	--nf-bg: var(--nn-marfil, #f7f4ef); --nf-text: var(--nn-grafito, #232827); --nf-muted: var(--nn-gris, #5c625e);
	--nf-title: var(--nn-marfil, #f7f4ef); --nf-accent: var(--nn-oro-texto, #7a6230); --nf-field: #fff; --nf-border: rgba(22, 63, 57, .3);
	--nf-focus: var(--nn-oro, #c2a763); --nf-btn: var(--nn-oro, #c2a763); --nf-btn-text: var(--nn-profundo, #0e2b27); --nf-error: #a3262a; --nf-r: 26px;
	--nf-band1: var(--nn-profundo, #0e2b27); --nf-band2: var(--nn-esmeralda, #163f39);
}
html.nn-form-open { overflow: hidden; }

.nn-form__dialog {
	position: fixed; inset: 0; margin: auto; padding: 0; border: 0; overflow: hidden;
	width: min(660px, calc(100vw - 32px)); max-height: min(92dvh, 900px); border-radius: var(--nf-r);
	background: var(--nf-bg); color: var(--nf-text); font-family: Inter, system-ui, sans-serif;
	box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(194, 167, 99, .4);
}
.nn-form__dialog[open] { display: flex; flex-direction: column; animation: nn-form-in .28s cubic-bezier(.22, .61, .36, 1); }
.nn-form__dialog::backdrop { background: rgba(8, 28, 25, .68); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: nn-form-fade .28s ease; }
@keyframes nn-form-in { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nn-form-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nn-sheet-in { from { transform: translateY(100%); } to { transform: none; } }

.nn-form__grab { display: none; }
.nn-form .nn-form__close {
	position: absolute; top: 14px; right: 14px; z-index: 5; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; cursor: pointer;
	border: 1px solid rgba(230, 211, 163, .45); border-radius: 50%; background: rgba(14, 43, 39, .4); color: #f7f4ef; -webkit-tap-highlight-color: transparent;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.nn-form .nn-form__close .nn-ic { width: 20px; height: 20px; }
.nn-form .nn-form__close:hover, .nn-form .nn-form__close:focus-visible { background: var(--nn-oro-claro, #e6d3a3); border-color: var(--nn-oro-claro, #e6d3a3); color: #0e2b27; box-shadow: var(--nn-glow); }

.nn-form__form, .nn-form__result { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.nn-form__form[hidden], .nn-form__result[hidden] { display: none; }

/* Encabezado: banda esmeralda con el contexto de la solicitud. */
.nn-form__head { position: relative; padding: 30px 72px 26px 34px; color: var(--nf-title); background: linear-gradient(150deg, var(--nf-band1), var(--nf-band2)); }
.nn-form__head::after { content: ""; position: absolute; left: 34px; right: 34px; bottom: 0; height: 1px; background: linear-gradient(90deg, rgba(221, 196, 120, .6), transparent); }
.nn-form__kicker {
	display: inline-flex; margin: 0 0 12px; padding: 6px 12px; border: 1px solid rgba(221, 196, 120, .55); border-radius: 999px;
	font: 600 11px/1.2 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: var(--nn-oro-claro, #e6d3a3);
}
.nn-form__title { margin: 0; font-family: var(--e-global-typography-primary-font-family, "Newsreader", Georgia, serif); font-weight: 400; font-size: clamp(27px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -.01em; color: var(--nf-title); }
.nn-form__intro { margin: 10px 0 0; max-width: 46ch; font-size: 15px; line-height: 1.55; color: rgba(247, 244, 239, .82); }
.nn-form__note {
	margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid var(--nn-oro-vivo, #ddc478); border-radius: 0 12px 12px 0; background: rgba(255, 255, 255, .08);
	font-size: 14px; line-height: 1.5; color: #f7f4ef;
}

.nn-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 18px; padding: 26px 34px 6px; }
.nn-f { position: relative; display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; padding: 0; border: 0; }
.nn-f--full { grid-column: 1 / -1; }
.nn-f > label, .nn-f > legend { padding: 0; font-size: 14px; font-weight: 600; color: var(--nf-text); }
.nn-f > label span[aria-hidden], .nn-f > legend span[aria-hidden] { color: var(--nf-accent); }
.nn-f input[type="text"], .nn-f input[type="tel"], .nn-f input[type="email"], .nn-f select, .nn-f textarea {
	width: 100%; min-height: 52px; padding: 13px 16px; border: 1px solid var(--nf-border); border-radius: 14px; background: var(--nf-field); color: var(--nf-text);
	font: 400 16px/1.4 Inter, system-ui, sans-serif; /* 16 px: evita el zoom automático de iOS */
	transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease; appearance: none; -webkit-appearance: none;
}
.nn-f textarea { min-height: 96px; resize: vertical; }
.nn-f input::placeholder { color: rgba(92, 98, 94, .7); }
.nn-f input:focus, .nn-f select:focus, .nn-f textarea:focus { outline: none; border-color: var(--nf-focus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--nf-focus) 35%, transparent); }
.nn-f [aria-invalid="true"] { border-color: var(--nf-error); background: color-mix(in srgb, var(--nf-error) 5%, var(--nf-field)); }
.nn-f__select { position: relative; }
.nn-f__select::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -7px; border-right: 2px solid var(--nf-muted); border-bottom: 2px solid var(--nf-muted); transform: rotate(45deg); pointer-events: none; }
.nn-f__select select { padding-right: 44px; }
.nn-f__help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--nf-muted); }
.nn-f__err { margin: 0; font-size: 13.5px; font-weight: 600; line-height: 1.4; color: var(--nf-error); }
.nn-f__err::before { content: "⚠ "; }

.nn-f--radios { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 12px; }
.nn-f--radios legend { width: 100%; float: left; margin-bottom: 7px; }
.nn-f--radios .nn-f__err { width: 100%; }
.nn-f--radios[hidden] { display: none; }
.nn-radio { position: relative; flex: 1 1 200px; cursor: pointer; }
.nn-radio input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.nn-radio span {
	display: flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 16px; border: 1px solid var(--nf-border); border-radius: 14px; background: var(--nf-field);
	font-size: 15px; font-weight: 600; text-align: center; transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.nn-radio:hover span { border-color: var(--nn-oro, #c2a763); }
.nn-radio input:checked + span { background: var(--nn-esmeralda, #163f39); border-color: var(--nn-esmeralda, #163f39); color: #f7f4ef; box-shadow: 0 10px 22px -14px rgba(14, 43, 39, .8); }
.nn-radio input:focus-visible + span { outline: 3px solid var(--nf-focus); outline-offset: 2px; }

.nn-check { display: flex; gap: 12px; align-items: flex-start; min-height: 44px; padding: 3px 0; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--nf-text); cursor: pointer; }
.nn-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--nn-esmeralda, #163f39); }
.nn-check input:focus-visible { outline: 3px solid var(--nf-focus); outline-offset: 2px; }
.nn-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.nn-form__live { margin: 6px 34px 0; padding: 10px 14px; border-radius: 12px; background: color-mix(in srgb, var(--nf-error) 9%, #fff); font-size: 14px; font-weight: 600; color: var(--nf-error); }
.nn-form__live[hidden] { display: none; }
.nn-form__actions { padding: 18px 34px 0; }
.nn-form__actions--row { display: flex; flex-wrap: wrap; gap: 12px; padding-left: 0; padding-right: 0; justify-content: center; }
.nn-form .nn-form__send {
	position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; padding: 0 30px; cursor: pointer; text-decoration: none;
	border: 1px solid transparent; border-radius: 999px; background: var(--nf-btn); color: var(--nf-btn-text);
	font: 600 14px/1 Inter, system-ui, sans-serif; letter-spacing: .14em; text-transform: uppercase;
	transition: background-color .2s ease, box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.nn-form .nn-form__actions--row .nn-form__send { width: auto; }
.nn-form .nn-form__send:hover, .nn-form .nn-form__send:focus-visible { background: var(--nn-oro-claro, #e6d3a3); box-shadow: var(--nn-glow); transform: translateY(-2px); }
.nn-form .nn-form__send:focus-visible { outline: 3px solid var(--nf-focus); outline-offset: 3px; }
.nn-form .nn-form__send:disabled { cursor: progress; opacity: .85; transform: none; }
.nn-form .nn-form__send--ghost { background: transparent; border-color: var(--nn-esmeralda, #163f39); color: var(--nn-esmeralda, #163f39); }
.nn-form__spin { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nn-spin .7s linear infinite; }
.nn-form .nn-form__send.is-sending .nn-form__spin { display: inline-block; }
@keyframes nn-spin { to { transform: rotate(360deg); } }
.nn-form__priv { margin: 14px 34px 0; font-size: 12.5px; line-height: 1.5; color: var(--nf-muted); }
.nn-form__wa { margin: 14px 34px 28px; padding-top: 16px; border-top: 1px solid rgba(22, 63, 57, .14); }
.nn-form__wa[hidden] { display: none; }
.nn-form__walink { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14.5px; font-weight: 600; line-height: 1.35; color: var(--nn-esmeralda, #163f39); text-decoration: none; transition: text-shadow .2s ease; }
.nn-form__walink .nn-ic { width: 22px; height: 22px; flex: 0 0 auto; color: var(--nn-medio, #32685d); }
.nn-form__walink:hover, .nn-form__walink:focus-visible { text-shadow: var(--nn-glow-text); text-decoration: underline; text-underline-offset: 4px; }

/* Resultados: éxito / error */
.nn-form__result { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 34px 44px; text-align: center; }
.nn-form__result[hidden] { display: none; }
.nn-form__result:focus { outline: none; }
.nn-form__result .nn-form__title { color: var(--nn-esmeralda, #163f39); }
.nn-form__result p { margin: 0; max-width: 44ch; font-size: 16px; line-height: 1.6; color: var(--nf-muted); }
.nn-form__seal .nn-badge { --s: 54px; --bd: var(--nn-oro, #c2a763); --ic: var(--nn-medio, #32685d); }
.nn-form__ref { padding: 10px 20px; border: 1px solid rgba(194, 167, 99, .7); border-radius: 999px; background: #fff; font: 600 18px/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important; letter-spacing: .08em; color: var(--nn-esmeralda, #163f39) !important; }
.nn-form__result--err .nn-form__title { color: var(--nf-error); }

/* Móvil: panel inferior. */
@media (max-width: 767px) {
	.nn-form__dialog { inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 94dvh; border-radius: 26px 26px 0 0; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .6); }
	.nn-form__dialog[open] { animation: nn-sheet-in .32s cubic-bezier(.22, .61, .36, 1); }
	.nn-form__grab { position: absolute; top: 9px; left: 50%; z-index: 6; display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(247, 244, 239, .5); transform: translateX(-50%); }
	.nn-form .nn-form__close { top: 16px; right: 12px; }
	.nn-form__head { padding: 30px 64px 22px 22px; }
	.nn-form__head::after { left: 22px; right: 22px; }
	.nn-form__grid { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px 22px 4px; }
	.nn-form__live { margin-left: 22px; margin-right: 22px; }
	.nn-form__actions { padding: 16px 22px 0; }
	.nn-form__priv { margin: 12px 22px 0; }
	.nn-form__wa { margin: 12px 22px calc(22px + env(safe-area-inset-bottom, 0px)); }
	.nn-form__result { padding: 48px 22px calc(34px + env(safe-area-inset-bottom, 0px)); }
	.nn-radio { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
	.nn-form__dialog[open], .nn-form__dialog::backdrop { animation: none; }
	.nn-form__spin { animation-duration: 1.6s; }
	.nn-form .nn-form__send:hover { transform: none; }
}
