/* =============================================================
   Ferrari Club México — Formulario Modo Evento
   Archivo: pdv/assets/evento.css
   Mobile-first, sin frameworks ni librerías externas
   ============================================================= */

/* ── Reset mínimo ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Variables ────────────────────────────────────────────── */
:root {
    --rojo:     #A6051A;
    --rojo-dk:  #8B0000;
    --negro:    #111111;
    --gris-bg:  #f5f5f5;
    --gris-bd:  #dddddd;
    --verde:    #2e7d32;
    --trans:    .2s ease;
    --radius:   8px;
    --shadow:   0 4px 16px rgba(0,0,0,.12);
}

/* ── Base ─────────────────────────────────────────────────── */
body {
    font-family: 'Ferrari Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 50%, var(--rojo-dk) 100%);
    min-height: 100vh;
    padding: 16px;
    color: #333;
}

/* ── Contenedor principal ─────────────────────────────────── */
.main-container {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ── Header ───────────────────────────────────────────────── */
.header {
    background: linear-gradient(135deg, var(--rojo) 0%, var(--rojo-dk) 100%);
    color: #fff;
    padding: 28px 24px;
    text-align: center;
    position: relative;
}

.header-content { position: relative; z-index: 2; }

.logo {
    height: 55px;
    margin-bottom: 12px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: .5px;
    text-shadow: 1px 1px 3px rgba(0,0,0,.4);
    margin-bottom: 6px;
}

.header .subtitle {
    font-size: .95rem;
    opacity: .88;
    font-weight: 300;
}

/* ── Layout: formulario + resumen lateral ─────────────────── */
.content-layout {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
}

/* ── Sección formulario ───────────────────────────────────── */
.form-section {
    background: var(--gris-bg);
    padding: 22px;
    border-radius: var(--radius);
    border: 1px solid var(--gris-bd);
}

/* ── Alertas ──────────────────────────────────────────────── */
.alert {
    padding: 14px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-weight: 600;
    border-left: 5px solid;
}
.alert-error   { background: #ffebee; color: #c62828; border-left-color: #f44336; }
.alert-success { background: #e8f5e9; color: var(--verde); border-left-color: #4caf50; }
.alert-warning { background: #fff3e0; color: #e65100; border-left-color: #ff9800; }

/* ── Caja renovación ──────────────────────────────────────── */
.renovacion-box {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(255,193,7,.25);
}

.renovacion-box label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: .92rem;
    color: #856404;
    font-weight: 600;
    gap: 10px;
}

.renovacion-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--rojo);
    cursor: pointer;
    flex-shrink: 0;
}

/* ── Títulos de sección ───────────────────────────────────── */
.section-title {
    color: var(--rojo);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 18px;
    padding-bottom: 8px;
    border-bottom: 3px solid var(--rojo);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 44px;
    height: 3px;
    background: gold;
}

/* ── Fila de campos ───────────────────────────────────────── */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

/* ── Grupo de campo ───────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #222;
    font-size: .9rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 13px;
    border: 2px solid var(--gris-bd);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: #333;
    transition: border-color var(--trans), box-shadow var(--trans);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--rojo);
    box-shadow: 0 0 0 3px rgba(166,5,26,.12);
}

.form-group input.readonly {
    background: var(--gris-bg);
    color: #666;
    cursor: not-allowed;
}

/* ── Campo requerido ──────────────────────────────────────── */
.required { color: var(--rojo); }

/* ── Selector de fecha ────────────────────────────────────── */
.date-selector {
    display: grid;
    grid-template-columns: 1fr 2fr 1.4fr;
    gap: 8px;
}

/* ── Sección miembros adicionales ─────────────────────────── */
.adicionales-container { margin-top: 28px; }

.adicionales-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-add {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 22px;
    cursor: pointer;
    font-weight: 600;
    font-size: .88rem;
    transition: background var(--trans), transform var(--trans);
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
}

.btn-add:hover {
    background: #1b5e20;
    transform: translateY(-1px);
}

/* ── Tarjeta de miembro adicional ─────────────────────────── */
.miembro-card {
    background: #fff;
    border: 2px solid var(--gris-bd);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    transition: border-color var(--trans);
}

.miembro-card:hover { border-color: var(--rojo); }

.btn-remove {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: var(--rojo);
    color: #fff;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--trans);
}

.btn-remove:hover { background: var(--rojo-dk); }

/* ── Sección resumen lateral ──────────────────────────────── */
.summary-section {
    background: var(--rojo);
    color: #fff;
    padding: 22px;
    border-radius: var(--radius);
}

.summary-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    text-align: center;
    color: #fff;
    letter-spacing: .5px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.1);
    font-size: .9rem;
}

.summary-item .price { font-weight: 700; color: #f8d7da; }

.discount-item { color: #90ee90; }
.discount-item .price { color: #90ee90; }

.summary-total {
    margin-top: 14px;
    text-align: center;
}

.total-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

/* ── Caja código de descuento ─────────────────────────────── */
.discount-box {
    margin: 20px 0;
    padding: 14px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius);
    border: 1px dashed rgba(255,255,255,.3);
}

.discount-box label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: #ccc;
    margin-bottom: 8px;
}

.discount-input-row {
    display: flex;
    gap: 8px;
}

.discount-input-row input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 6px;
    font-size: .9rem;
    text-transform: uppercase;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-family: inherit;
}

.discount-input-row input::placeholder { color: rgba(255,255,255,.4); }

.discount-input-row input:focus {
    outline: none;
    border-color: #fff;
}

.btn-aplicar {
    padding: 9px 16px;
    background: var(--rojo);
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: .88rem;
    white-space: nowrap;
    font-family: inherit;
    transition: background var(--trans);
}

.btn-aplicar:hover { background: var(--rojo-dk); }
.btn-aplicar:disabled { background: #555; cursor: not-allowed; }

.discount-msg { margin-top: 7px; font-size: .82rem; min-height: 18px; }

.discount-applied {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: rgba(0,200,0,.15);
    border: 1px solid rgba(0,200,0,.3);
    border-radius: 6px;
    font-size: .85rem;
    color: #90ee90;
}

.btn-quitar-codigo {
    background: none;
    border: none;
    color: #f88;
    cursor: pointer;
    text-decoration: underline;
    font-size: .82rem;
    margin-left: 8px;
    font-family: inherit;
}

/* ── Botón de pago ────────────────────────────────────────── */
.btn-pay {
    width: 100%;
    background: linear-gradient(135deg, var(--rojo) 0%, var(--rojo-dk) 100%);
    color: #fff;
    border: none;
    padding: 16px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 14px rgba(166,5,26,.4);
    transition: all var(--trans);
    font-family: inherit;
    margin-top: 18px;
}

.btn-pay:hover {
    background: linear-gradient(135deg, var(--rojo-dk) 0%, var(--rojo) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(166,5,26,.55);
}

.btn-pay:active { transform: translateY(0); }
.btn-pay:disabled { background: #888; cursor: not-allowed; transform: none; box-shadow: none; }

/* ── Validaciones visuales ────────────────────────────────── */
.input-valid {
    border-color: #4caf50 !important;
    box-shadow: 0 0 0 3px rgba(76,175,80,.15) !important;
}

.input-invalid {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 3px rgba(244,67,54,.15) !important;
}

.validation-container { margin-top: 5px; min-height: 20px; }

.validation-error {
    color: #f44336;
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.validation-success {
    color: #4caf50;
    font-size: .82rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.validation-warning {
    color: #ff9800;
    font-size: .82rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--gris-bg);
    padding: 18px 24px;
    text-align: center;
    font-size: .82rem;
    color: #666;
    border-top: 1px solid var(--gris-bd);
}

.payment-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.payment-logos img {
    height: 26px;
    opacity: .7;
    transition: opacity var(--trans);
}

.payment-logos img:hover { opacity: 1; }

/* ── Instrucciones ────────────────────────────────────────── */
.instrucciones {
    padding: 16px 24px;
    font-size: .78rem;
    color: #777;
    line-height: 1.65;
}

.instrucciones strong { color: #444; }

.instrucciones p { margin-bottom: 7px; }

/* ============================================================
   RESPONSIVE — ≥ 768px: layout de dos columnas
   ============================================================ */
@media (min-width: 768px) {
    .content-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .form-section {
        flex: 2;
    }

    .summary-section {
        flex: 1;
        position: sticky;
        top: 16px;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .header h1 { font-size: 2rem; }
}

@media (min-width: 1024px) {
    body { padding: 24px; }

    .header { padding: 36px 32px; }
    .logo { height: 65px; }

    .content-layout { gap: 32px; padding: 32px; }
}
