/* =======================================================
   ESTILOS FRONTEND: FPDF WIZARD (VERSIÓN FINAL)
   ======================================================= */

/* 1. CONTENEDOR PRINCIPAL
   ------------------------------------------------------- */
.fpdf-custom-wizard {
    max-width: 850px;
    margin: 40px auto;
    background: #f8fafc; /* Fondo gris muy suave */
    padding: 30px;
    border-radius: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    box-sizing: border-box;
}

/* Asegurar que todo dentro use border-box */
.fpdf-custom-wizard *, 
.fpdf-custom-wizard *::before, 
.fpdf-custom-wizard *::after {
    box-sizing: border-box;
}

/* 2. TARJETAS DE PREGUNTA (CARDS)
   ------------------------------------------------------- */
.fpdf-public-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    /* Borde lateral azul característico */
    border-left: 5px solid #2563eb !important; 
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fpdf-public-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px -3px rgba(0,0,0,0.08);
}

.fpdf-label-display {
    display: block;
    margin-bottom: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.5;
}

/* 3. INPUTS Y CAMPOS DE TEXTO
   ------------------------------------------------------- */
.fpdf-public-input,
.fpdf-custom-wizard input[type="text"],
.fpdf-custom-wizard input[type="number"],
.fpdf-custom-wizard input[type="email"],
.fpdf-custom-wizard input[type="tel"],
.fpdf-custom-wizard input[type="password"],
.fpdf-custom-wizard select,
.fpdf-custom-wizard textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    background-color: #fff;
    color: #334155;
    transition: all 0.2s ease;
}

.fpdf-public-input:focus,
.fpdf-custom-wizard input:focus, 
.fpdf-custom-wizard select:focus, 
.fpdf-custom-wizard textarea:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15); /* Anillo azul suave */
}

/* Textareas con líneas de cuaderno sutiles */
.fpdf-custom-wizard textarea {
    min-height: 120px;
    line-height: 1.6;
}

/* 4. ZONA DE CARGA DE ARCHIVOS
   ------------------------------------------------------- */
.fpdf-upload-zone, 
.fpdf-modern-upload-zone {
    border: 2px dashed #93c5fd;
    background: #eff6ff;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: background 0.3s ease, border-color 0.3s ease;
    position: relative;
}

.fpdf-upload-zone:hover {
    background: #dbeafe;
    border-color: #2563eb;
}

.fpdf-upload-zone .dashicons {
    color: #3b82f6;
    font-size: 40px;
    width: 40px;
    height: 40px;
    margin-bottom: 10px;
}

/* 5. OPCIONES (RADIO Y CHECKBOX)
   ------------------------------------------------------- */
.fpdf-card-body label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
    color: #475569;
}

.fpdf-card-body input[type="radio"],
.fpdf-card-body input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    accent-color: #2563eb;
    cursor: pointer;
}

/* 6. BOTONES DE NAVEGACIÓN
   ------------------------------------------------------- */
.fpdf-step-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.fpdf-btn-nav, 
.fpdf-custom-wizard button[type="submit"] {
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
}

/* Botón Siguiente y Enviar (Primarios) */
.fpdf-btn-nav[onclick*="Next"],
.fpdf-custom-wizard button[type="submit"] {
    background-color: #1e293b; /* Oscuro elegante */
    color: white;
    border: none;
    padding: 12px 30px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.fpdf-custom-wizard button[type="submit"] {
    background-color: #2563eb; /* Azul fuerte para enviar */
}

.fpdf-btn-nav[onclick*="Next"]:hover,
.fpdf-custom-wizard button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0,0,0,0.15);
    opacity: 0.95;
}

/* Botón Anterior (Secundario) */
.fpdf-btn-nav[onclick*="Nav"] {
    /* Nota: Nav aplica a SafeNav que es anterior */
    background-color: #ffffff;
    color: #64748b;
    border: 1px solid #cbd5e1;
    padding: 10px 24px;
}

.fpdf-btn-nav[onclick*="Nav"]:hover {
    background-color: #f1f5f9;
    color: #334155;
}

/* 7. ELEMENTOS EXTRA (DatePicker, Badges, etc)
   ------------------------------------------------------- */
/* Corrección para iconos dentro de inputs (si se usa esa estructura) */
.fpdf-input-with-icon {
    position: relative;
}
.fpdf-input-with-icon .dashicons {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}
.fpdf-picker-fecha, .fpdf-picker-hora {
    background-color: #fff !important; /* Flatpickr a veces pone gris */
}

/* Mensajes de Éxito */
.fpdf-success-box {
    animation: fadeInScale 0.5s ease-out;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* 8. RESPONSIVE (MÓVIL)
   ------------------------------------------------------- */
@media (max-width: 600px) {
    .fpdf-custom-wizard {
        padding: 15px;
        margin: 10px auto;
    }
    .fpdf-public-card {
        padding: 15px;
    }
    .fpdf-step-nav {
        flex-direction: column-reverse; /* Enviar/Siguiente arriba, Anterior abajo */
        gap: 15px;
    }
    .fpdf-step-nav button {
        width: 100%; /* Botones ancho completo */
    }
}