/**
 * FFCV Formulario de Asistencia - Estilos Frontend
 * Tipografía: Barlow | Colores: FFCV Oficiales
 */

/* 1. Fuente Barlow (Google Fonts + Fallback Local) */
@import url("https://fonts.googleapis.com/css2?family=Barlow:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap");

@font-face {
    font-family: 'Barlow';
    src: url(//ffcv.es/wp/wp-content/plugins/ffcv-formulario-asistencia/assets/fonts/Barlow-Regular.ttf) format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url(//ffcv.es/wp/wp-content/plugins/ffcv-formulario-asistencia/assets/fonts/Barlow-Medium.ttf) format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url(//ffcv.es/wp/wp-content/plugins/ffcv-formulario-asistencia/assets/fonts/Barlow-SemiBold.ttf) format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url(//ffcv.es/wp/wp-content/plugins/ffcv-formulario-asistencia/assets/fonts/Barlow-Bold.ttf) format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Barlow';
    src: url(//ffcv.es/wp/wp-content/plugins/ffcv-formulario-asistencia/assets/fonts/Barlow-ExtraBold.ttf) format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* 2. Variables de Marca FFCV */
:root {
    --ffcv-navy: #1C2D5A;
    --ffcv-blue: #2D488F;
    --ffcv-blue-mid: #3E559B;
    --ffcv-blue-light: #9BB3C9;
    --ffcv-orange: #E8843A;
    --ffcv-orange-hover: #D47328;
    --ffcv-orange-soft: #FFF5EE;
    --ffcv-bg: #F8FAFC;
    --ffcv-card: #FFFFFF;
    --ffcv-border: #E2E8F0;
    --ffcv-border-focus: #3E559B;
    --ffcv-text: #0F172A;
    --ffcv-text-muted: #64748B;
    --ffcv-font: 'Barlow', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --ffcv-radius: 12px;
}

/* 3. Contenedor Principal */
.ffcv-asistencia-wrapper {
    font-family: var(--ffcv-font);
    color: var(--ffcv-text);
    width: 100%;
    max-width: 680px;
    margin: 30px auto;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.ffcv-asistencia-wrapper *,
.ffcv-asistencia-wrapper *::before,
.ffcv-asistencia-wrapper *::after {
    box-sizing: border-box;
}

/* 4. Tarjeta Principal (Sin border-left cliché) */
.ffcv-card {
    background: var(--ffcv-card);
    border: 1px solid var(--ffcv-border);
    border-radius: var(--ffcv-radius);
    box-shadow: 0 4px 20px -2px rgba(28, 45, 90, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* 5. Banner de Encabezado */
.ffcv-card-header-banner {
    width: 100%;
    background: #2D488F;
    line-height: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--ffcv-border);
}

.ffcv-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* 6. Cuerpo de la Tarjeta */
.ffcv-card-body {
    padding: 36px 32px 32px 32px;
}

@media (max-width: 600px) {
    .ffcv-card-body {
        padding: 24px 18px 20px 18px;
    }
}

/* 7. Bloque de Marca e Introducción */
.ffcv-brand-intro {
    margin-bottom: 28px;
}

.ffcv-logos-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.ffcv-logo-escola {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.ffcv-badge-oficial {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #F1F5F9;
    color: var(--ffcv-navy);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 5px 10px;
    border-radius: 9999px;
    border: 1px solid #CBD5E1;
    text-transform: uppercase;
}

.ffcv-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--ffcv-orange);
}

.ffcv-title {
    font-family: var(--ffcv-font);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--ffcv-navy);
    margin: 0 0 6px 0;
    letter-spacing: -0.3px;
}

.ffcv-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: var(--ffcv-text-muted);
    margin: 0 0 16px 0;
}

.ffcv-event-pill {
    display: inline-block;
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    color: #1E40AF;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Aviso sutil y limpio (perimetral completo, sin border-left) */
.ffcv-notice-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #F8FAFC;
    border: 1px solid var(--ffcv-border);
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 14px;
}

.ffcv-icon-info {
    width: 20px;
    height: 20px;
    color: var(--ffcv-blue-mid);
    flex-shrink: 0;
    margin-top: 1px;
}

.ffcv-notice-box p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: var(--ffcv-text-muted);
}

.ffcv-notice-box strong {
    color: var(--ffcv-navy);
}

/* 8. Estructura de Formularios */
.ffcv-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ffcv-form-group {
    display: flex;
    flex-direction: column;
}

.ffcv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .ffcv-form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

.ffcv-label {
    font-family: var(--ffcv-font);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--ffcv-navy);
    margin-bottom: 6px;
    display: block;
}

.ffcv-required {
    color: #DC2626;
    margin-left: 2px;
}

.ffcv-optional {
    font-size: 11px;
    font-weight: 500;
    color: var(--ffcv-text-muted);
    text-transform: none;
    letter-spacing: normal;
    margin-left: 4px;
}

.ffcv-field-hint {
    font-size: 12px;
    color: var(--ffcv-text-muted);
    margin-top: 5px;
    display: block;
    line-height: 1.4;
}

/* 9. Entradas de Texto / Inputs */
.ffcv-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.ffcv-input-icon {
    position: absolute;
    left: 14px;
    font-size: 15px;
    pointer-events: none;
    user-select: none;
    color: var(--ffcv-text-muted);
}

.ffcv-input,
.ffcv-textarea {
    width: 100%;
    font-family: var(--ffcv-font);
    font-size: 15px;
    font-weight: 500;
    color: var(--ffcv-text);
    background: #FFFFFF;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 11px 14px;
    transition: all 0.2s ease;
    outline: none;
}

.ffcv-input-wrapper .ffcv-input {
    padding-left: 42px;
}

.ffcv-input:hover,
.ffcv-textarea:hover {
    border-color: #94A3B8;
}

.ffcv-input:focus,
.ffcv-textarea:focus {
    border-color: var(--ffcv-border-focus);
    box-shadow: 0 0 0 3px rgba(62, 85, 155, 0.15);
    background: #FFFFFF;
}

.ffcv-input::placeholder,
.ffcv-textarea::placeholder {
    color: #94A3B8;
    font-weight: 400;
}

.ffcv-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

/* 10. Asistentes Dinámicos */
.ffcv-attendees-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ffcv-attendees-count-badge {
    background: #EEF2F6;
    color: var(--ffcv-navy);
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 9999px;
    border: 1px solid #CBD5E1;
}

.ffcv-attendees-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.ffcv-attendee-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #F8FAFC;
    border: 1px solid var(--ffcv-border);
    border-radius: 8px;
    padding: 8px 10px;
    transition: all 0.2s ease;
}

.ffcv-attendee-row:hover {
    border-color: #CBD5E1;
    background: #FFFFFF;
}

.ffcv-attendee-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--ffcv-navy);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.ffcv-attendee-field {
    flex: 1;
}

.ffcv-attendee-field .ffcv-input {
    background: #FFFFFF;
    border: 1px solid #D1D5DB;
    padding: 8px 12px;
    font-size: 14px;
}

.ffcv-attendee-actions {
    flex-shrink: 0;
}

.ffcv-badge-main {
    font-size: 11px;
    font-weight: 700;
    color: var(--ffcv-navy);
    background: #E2E8F0;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.2px;
}

.ffcv-btn-remove-attendee {
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
}

.ffcv-btn-remove-attendee:hover {
    color: #DC2626;
    background: #FEE2E2;
}

/* 11. Botones */
.ffcv-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #F1F5F9;
    color: var(--ffcv-navy);
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    padding: 9px 16px;
    font-family: var(--ffcv-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: flex-start;
}

.ffcv-btn-secondary:hover {
    background: #E2E8F0;
    border-color: #94A3B8;
    color: var(--ffcv-navy);
}

.ffcv-submit-wrapper {
    margin-top: 10px;
}

.ffcv-btn-primary {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--ffcv-orange);
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-family: var(--ffcv-font);
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(232, 132, 58, 0.35);
    transition: all 0.2s ease;
}

.ffcv-btn-primary:hover {
    background: var(--ffcv-orange-hover);
    box-shadow: 0 6px 18px rgba(232, 132, 58, 0.45);
    transform: translateY(-1px);
}

.ffcv-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(232, 132, 58, 0.3);
}

.ffcv-btn-primary:disabled {
    background: #94A3B8;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ffcv-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: ffcv-spin 0.8s linear infinite;
}

@keyframes ffcv-spin {
    to { transform: rotate(360deg); }
}

/* 12. Checkbox RGPD */
.ffcv-consent-box {
    background: #F8FAFC;
    border: 1px solid var(--ffcv-border);
    border-radius: 8px;
    padding: 12px 14px;
}

.ffcv-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    margin: 0;
}

.ffcv-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--ffcv-orange);
    width: 16px;
    height: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

.ffcv-checkbox-text {
    font-size: 12px;
    color: var(--ffcv-text-muted);
    line-height: 1.45;
}

.ffcv-checkbox-text strong {
    color: var(--ffcv-navy);
}

/* 13. Pie de formulario */
.ffcv-footer-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
}

.ffcv-mini-shield {
    height: 16px;
    width: auto;
    opacity: 0.8;
}

/* 14. Mensajes de error */
.ffcv-feedback-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.ffcv-feedback-message.error {
    background: #FEF2F2;
    color: #991B1B;
    border-color: #FECACA;
}

.ffcv-feedback-message.success {
    background: #F0FDF4;
    color: #166534;
    border-color: #BBF7D0;
}

/* 15. Pantalla de Éxito */
.ffcv-success-screen {
    text-align: center;
    padding: 20px 0;
    animation: ffcv-fade-in 0.3s ease;
}

@keyframes ffcv-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.ffcv-success-icon-wrap {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #DCFCE7;
    color: #16A34A;
    border: 1px solid #BBF7D0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.ffcv-success-icon {
    width: 32px;
    height: 32px;
}

.ffcv-success-title {
    font-size: 24px;
    font-weight: 800;
    color: var(--ffcv-navy);
    margin: 0 0 6px 0;
}

.ffcv-success-subtitle {
    font-size: 15px;
    color: var(--ffcv-text-muted);
    margin: 0 0 24px 0;
}

.ffcv-recap-card {
    background: #F8FAFC;
    border: 1px solid var(--ffcv-border);
    border-radius: 10px;
    padding: 18px 20px;
    text-align: left;
    margin-bottom: 20px;
}

.ffcv-recap-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ffcv-navy);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--ffcv-border);
}

.ffcv-recap-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ffcv-recap-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    gap: 12px;
}

.ffcv-recap-label {
    color: var(--ffcv-text-muted);
}

.ffcv-recap-val {
    color: var(--ffcv-navy);
    text-align: right;
}

.ffcv-next-step-box {
    background: #EFF6FF;
    border: 1px solid #DBEAFE;
    border-radius: 8px;
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #1E3A8A;
    margin-bottom: 24px;
    text-align: left;
}

.ffcv-next-step-box strong {
    color: #1E40AF;
}

.ffcv-success-actions {
    display: flex;
    justify-content: center;
}