/* Estilos del formulario · mobile-first.
   Base = teléfono; se amplía en pantallas medianas y grandes.
   Colores, tipografía y formas vienen de tokens_ivoo.css (guía de diseño IVOO). */

@font-face {
    font-family: 'Figtree';
    src: url('../fonts/Figtree-latin.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
}

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-page);
    color: var(--text);
    font-family: var(--font-body);
    font-variant-numeric: tabular-nums;
    line-height: 1.5;
}

.contenedor {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

/* ---- Encabezado (degradado del menú del dashboard) ---- */
.encabezado {
    background: var(--grad-menu);
    color: var(--text-on-menu-strong);
    border-radius: var(--radius-card);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-card);
}

.encabezado__logo {
    display: block;
    max-width: 120px;
    height: auto;
    margin: 0 auto 12px;
}

.encabezado__titulo {
    font-family: var(--font-title);
    font-weight: 600;
    font-size: 22px;
    margin: 0 0 6px;
}

.encabezado__texto {
    margin: 0;
    font-size: 14px;
    color: var(--text-on-menu);
}

/* ---- Tarjeta del formulario ---- */
.tarjeta {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    padding: 20px;
    margin-top: 16px;
}

/* ---- Avisos ---- */
.aviso {
    border-radius: var(--radius-control);
    padding: 12px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    border: 1px solid transparent;
}

.aviso--ok {
    background: var(--bg-note);
    border-color: var(--border-teal);
    color: var(--teal-800);
}

.aviso--error {
    background: var(--warn-bg);
    border-color: var(--warn-border);
    color: var(--warn-text);
}

/* ---- Campos ---- */
.formulario {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.campo label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-table-head);
}

.opcional {
    font-weight: 400;
    color: var(--text-muted);
}

.campo input {
    width: 100%;
    min-height: 48px;          /* área táctil cómoda */
    padding: 10px 14px;
    font: inherit;
    font-size: 16px;           /* 16px evita el zoom automático en iOS */
    color: var(--text);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-control);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.campo input:hover {
    border-color: var(--border-teal);
}

.campo input:focus {
    outline: none;
    border-color: var(--teal-450);
    box-shadow: 0 0 0 3px rgba(13, 132, 121, .18);
}

.campo--error input {
    border-color: var(--danger);
}

.campo__error {
    font-size: 13px;
    color: var(--danger);
}

/* ---- Botón ---- */
.boton {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-on-menu-strong);
    background: var(--grad-hero);
    border: 0;
    border-radius: var(--radius-control);
    cursor: pointer;
    transition: filter .15s ease, transform .05s ease;
}

.boton:hover {
    filter: brightness(1.05);
}

.boton:active {
    transform: translateY(1px);
}

.boton:focus-visible {
    outline: 3px solid var(--teal-300);
    outline-offset: 2px;
}

/* ---- Campo trampa (anti-bots) ---- */
.trampa {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.pie {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin: 16px 0 8px;
}

/* ---- Botón secundario y separador ---- */
.separador {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

.boton--secundario {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: var(--bg-card);
    color: var(--teal-800);
    border: 1px solid var(--teal-450);
}

.boton--secundario:hover {
    background: var(--teal-50);
    filter: none;
}

/* ---- Enlaces ---- */
.enlace {
    color: var(--teal-450);
    font-weight: 600;
}

/* ---- Gift card ---- */
.giftcard {
    background: var(--grad-hero);
    color: var(--text-on-menu-strong);
    border-radius: var(--radius-card);
    padding: 22px 20px;
    text-align: center;
}

.giftcard__etiqueta {
    margin: 12px 0 2px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--teal-200);
}

.giftcard__etiqueta:first-child {
    margin-top: 0;
}

.giftcard__nombre {
    margin: 0;
    font-family: var(--font-title);
    font-size: 20px;
    font-weight: 600;
}

.giftcard__codigo {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: .06em;
    word-break: break-all;
}

.giftcard__fecha {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--teal-200);
}

/* ---- Pantallas medianas y grandes ---- */
@media (min-width: 600px) {
    .contenedor {
        padding: 32px 16px;
    }

    .encabezado {
        padding: 28px 24px;
    }

    .tarjeta {
        padding: 28px;
    }
}
