/* ===================================
   Registro Facial Videoportero - Styles
   =================================== */

/* Variables CSS */
:root {
    --rfv-primary: #F6D913;
    --rfv-primary-dark: #d4b910;
    --rfv-secondary: #4a5568;
    --rfv-success: #48bb78;
    --rfv-error: #f56565;
    --rfv-border: #e2e8f0;
    --rfv-bg-light: #f7fafc;
    --rfv-text-dark: #2d3748;
    --rfv-text-light: #718096;
    --rfv-text-on-primary: #000000;
    --rfv-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --rfv-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --rfv-radius: 12px;
    --rfv-transition: all 0.3s ease;
}

.rfv-input {
    color: #1a1a1a !important;
}

.rfv-file-label {
    border-color: var(--rfv-primary) !important;
    background-color: rgba(246, 217, 19, 0.05) !important;
}

.rfv-summary-data {
    text-align: left !important;
}

.rfv-input::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

.rfv-input:not(:placeholder-shown) {
    border-color: #1a1a1a !important;
    background-color: #fff !important;
}

/* Container Principal */
.rfv-container {
    max-width: 700px;
    position: relative;
    /* Para el loader absoluto */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Header */
.rfv-header {
    text-align: center;
    margin-bottom: 40px;
}

.rfv-header h2 {
    color: var(--rfv-primary-dark);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.rfv-subtitle {
    color: var(--rfv-text-light);
    font-size: 16px;
    margin: 0;
}

/* Indicador de Pasos */
.rfv-steps-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    padding: 0 20px;
}

.rfv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.rfv-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--rfv-bg-light);
    border: 3px solid var(--rfv-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--rfv-text-light);
    transition: var(--rfv-transition);
    margin-bottom: 10px;
}

.rfv-step-label {
    font-size: 14px;
    color: var(--rfv-text-light);
    font-weight: 500;
    text-align: center;
    transition: var(--rfv-transition);
}

.rfv-step-active .rfv-step-number {
    background: linear-gradient(135deg, var(--rfv-primary) 0%, var(--rfv-primary-dark) 100%);
    border-color: var(--rfv-primary);
    color: var(--rfv-text-on-primary);
    box-shadow: 0 4px 12px rgba(246, 217, 19, 0.4);
}

.rfv-step-active .rfv-step-label {
    color: var(--rfv-text-dark);
    font-weight: 600;
}

.rfv-step-completed .rfv-step-number {
    background-color: var(--rfv-success);
    border-color: var(--rfv-success);
    color: white;
}

.rfv-step-completed .rfv-step-label {
    color: var(--rfv-success);
}

.rfv-step-divider {
    width: 80px;
    height: 3px;
    background-color: var(--rfv-border);
    margin: 0 20px 30px 20px;
}

/* Formularios */
.rfv-form {
    display: none;
    background: #F6F5F2;
    border-radius: var(--rfv-radius);
    padding: 40px;
    box-shadow: none;
    border: 1px solid var(--rfv-border);
}

.rfv-form-active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rfv-form-header {
    margin-bottom: 20px;
}

.rfv-form-header h3 {
    color: var(--rfv-primary-dark);
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.rfv-form-header p {
    color: var(--rfv-text-light);
    font-size: 14px;
    margin: 0;
}

/* Form Groups */
.rfv-form-group {
    margin-bottom: 25px;
}

.rfv-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.rfv-form-group label {
    display: block;
    font-weight: 600;
    color: var(--rfv-text-dark);
    margin-bottom: 8px;
    font-size: 14px;
}

.rfv-required {
    color: var(--rfv-error);
}

.rfv-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--rfv-border);
    border-radius: 8px;
    font-size: 15px;
    transition: var(--rfv-transition);
    background-color: white;
    box-sizing: border-box;
}

.rfv-input:focus {
    outline: none;
    border-color: var(--rfv-primary);
    box-shadow: none;
}

.rfv-help-text {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: var(--rfv-text-light);
}

/* Phone Wrapper */
.rfv-phone-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid var(--rfv-border);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--rfv-transition);
    background-color: white;
}

.rfv-phone-wrapper:focus-within {
    border-color: var(--rfv-primary);
    box-shadow: none;
}

.rfv-phone-prefix {
    padding: 12px 12px 12px 16px;
    background-color: var(--rfv-bg-light);
    color: var(--rfv-text-dark);
    font-weight: 600;
    font-size: 15px;
    border-right: 2px solid var(--rfv-border);
    user-select: none;
}

.rfv-phone-input {
    border: none !important;
    padding-left: 12px !important;
    box-shadow: none !important;
    flex: 1;
}

.rfv-phone-input:focus {
    box-shadow: none !important;
}


/* Photo Upload */
.rfv-photo-upload {
    position: relative;
}

.rfv-input-file {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.rfv-file-label {
    display: flex;
    flex-direction: row;
    align-items: center !important;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
    border: 2px dashed var(--rfv-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--rfv-transition);
    background-color: white;
    line-height: 1 !important;
}

.rfv-file-label:hover {
    border-color: var(--rfv-primary);
    background-color: rgba(246, 217, 19, 0.05);
}

.rfv-file-label.has-file {
    border-color: var(--rfv-success);
    background-color: rgba(72, 187, 120, 0.05);
}

.rfv-upload-icon {
    width: 32px;
    height: 32px;
    color: var(--rfv-primary-dark);
    flex-shrink: 0;
    margin: 0 !important;
    display: block !important;
}

.rfv-file-text {
    font-size: 14px;
    color: var(--rfv-text-dark);
    font-weight: 500;
    line-height: normal !important;
    margin: 0 !important;
    padding-top: 2px;
    /* Ajuste óptico fino */
}

.rfv-photo-preview {
    margin-top: 20px;
}

.rfv-preview-image {
    position: relative;
    display: inline-block;
}

.rfv-preview-image img {
    max-width: 150px !important;
    /* Reducido de 200px */
    border-radius: 8px;
    border: 2px solid var(--rfv-primary-dark);
    box-shadow: none;
}

.rfv-remove-photo {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border-radius: 50% !important;
    background-color: white !important;
    border: 2px solid #e53e3e !important;
    cursor: pointer;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: var(--rfv-transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
    padding: 0 !important;
    z-index: 10;
}

.rfv-remove-photo:hover {
    transform: scale(1.1);
    background-color: #fff5f5 !important;
}

.rfv-remove-photo svg {
    width: 16px !important;
    height: 16px !important;
    color: #e53e3e !important;
    stroke: #e53e3e !important;
    stroke-width: 3px !important;
    display: block !important;
    margin: auto !important;
}

/* Botones */
.rfv-form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
}

.rfv-form-actions-single {
    justify-content: center;
}

.rfv-form-actions-single .rfv-btn {
    flex: 0 0 auto;
    min-width: 250px;
}

.rfv-btn {
    flex: 1;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--rfv-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rfv-btn-primary {
    background: var(--rfv-primary);
    color: var(--rfv-text-on-primary);
    box-shadow: none;
    font-weight: 700;
}

.rfv-btn-primary:hover {
    background: var(--rfv-primary-dark);
    transform: none;
    box-shadow: none;
}

/* Botón Regresar específico */
#rfv-btn-back {
    background-color: transparent !important;
    border: 2px solid #000000 !important;
    color: #000000 !important;
    box-shadow: none !important;
}

#rfv-btn-back:hover {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

.rfv-btn-secondary {
    background-color: white;
    color: var(--rfv-text-dark);
    border: 2px solid var(--rfv-border);
}

.rfv-btn-secondary:hover {
    background-color: var(--rfv-bg-light);
    border-color: var(--rfv-primary);
}

.rfv-btn-icon {
    width: 20px;
    height: 20px;
}

/* Mensajes */
.rfv-message {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
}

.rfv-message-active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rfv-message-error {
    background-color: #fff5f5;
    color: var(--rfv-error);
    border: 2px solid var(--rfv-error);
}

.rfv-message-success {
    background-color: #f0fff4;
    color: var(--rfv-success);
    border: 2px solid var(--rfv-success);
}

/* Mensaje de Éxito */
.rfv-success-container {
    display: none;
    text-align: center;
    padding: 60px 40px;
    background: white;
    border-radius: var(--rfv-radius);
    box-shadow: none;
    border: 1px solid var(--rfv-border);
}

.rfv-success-active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.rfv-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--rfv-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.rfv-success-icon svg {
    width: 50px;
    height: 50px;
    color: white;
}

.rfv-success-title {
    color: var(--rfv-primary-dark);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.rfv-success-text {
    color: var(--rfv-text-light);
    font-size: 16px;
    margin: 0 0 30px 0;
    line-height: 1.6;
}

/* Loader */
.rfv-loader {
    display: none;
    position: absolute;
    /* Cambio de fixed a absolute */
    top: 0;
    left: 0;
    border-radius: var(--rfv-radius);
    /* Redondear bordes igual que el contenedor */
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.rfv-loader-active {
    display: flex;
}

.rfv-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.rfv-loader p {
    color: white;
    font-size: 16px;
    margin-top: 20px;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .rfv-container {
        padding: 15px;
        margin: 20px auto;
    }

    .rfv-header h2 {
        font-size: 22px;
    }

    .rfv-form {
        padding: 25px 20px;
    }

    .rfv-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .rfv-steps-indicator {
        padding: 0 10px;
    }

    .rfv-step-divider {
        width: 40px;
        margin: 0 10px 30px 10px;
    }

    .rfv-step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .rfv-step-label {
        font-size: 12px;
    }

    .rfv-form-actions {
        flex-direction: column;
    }

    /* En móvil, botones de paso 2 invertidos: Completar PRIMERO, Regresar DESPUÉS */
    .rfv-actions-step2 {
        flex-direction: column-reverse;
    }

    .rfv-btn {
        width: 100%;
    }

    .rfv-success-container {
        padding: 40px 20px;
    }
}

@media (max-width: 480px) {
    .rfv-header h2 {
        font-size: 20px;
    }

    .rfv-subtitle {
        font-size: 14px;
    }

    .rfv-form-header h3 {
        font-size: 18px;
    }

    .rfv-step-label {
        display: none;
    }
}

/* Resumen de Datos */
.rfv-summary-container {
    margin: 30px 0;
    padding: 30px;
    background-color: var(--rfv-bg-light);
    border-radius: var(--rfv-radius);
    border: 2px solid var(--rfv-border);
}

.rfv-summary-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--rfv-text-dark);
    margin: 0 0 25px 0;
    text-align: center;
}

.rfv-summary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

.rfv-summary-photo {
    text-align: center;
    width: 100%;
}

.rfv-summary-photo img {
    width: auto;
    /* width auto para no deformar si es pequeña */
    max-width: 150px !important;
    /* Reducido de 250px */
    border-radius: 8px;
    border: 2px solid var(--rfv-primary);
    /* Borde más fino */
    box-shadow: none;
}

.rfv-summary-data {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.rfv-summary-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 20px;
    padding: 15px 20px;
    border-bottom: 1px solid var(--rfv-border);
    background-color: white;
}

.rfv-summary-row:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.rfv-summary-row:last-child {
    border-bottom: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

.rfv-summary-label {
    font-weight: 700;
    color: var(--rfv-text-dark);
    font-size: 15px;
}

.rfv-summary-value {
    color: var(--rfv-text-dark);
    font-size: 15px;
    font-weight: 500;
}

/* Responsive para resumen */
@media (max-width: 768px) {
    .rfv-summary-container {
        padding: 20px;
    }

    .rfv-summary-photo img {
        max-width: 120px;
        /* Aún más pequeño en móvil */
    }

    .rfv-summary-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px 15px;
    }

    .rfv-summary-label {
        font-size: 13px;
        color: var(--rfv-text-light);
    }

    .rfv-summary-value {
        font-size: 16px;
        font-weight: 600;
    }
}



/* Imagen de Ejemplo de Foto */
.rfv-photo-example {
    margin-top: 15px;
    text-align: center;
    padding: 12px;
    background-color: var(--rfv-bg-light);
    border-radius: 8px;
    border: 1px solid var(--rfv-border);
}

.rfv-example-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--rfv-text-light);
    margin: 0 0 8px 0;
}

.rfv-example-image {
    max-width: 120px;
    border-radius: 6px;
    border: 2px solid var(--rfv-primary);
    box-shadow: none;
}

/* Info Box Styles */
.rfv-info-box {
    margin-top: 15px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
}

.rfv-info-main {
    font-size: 14px;
    color: #4a5568;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.rfv-info-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background-color: #fff9c4;
    /* Un amarillo muy suave, o podría ser azul claro */
    background-color: rgba(246, 217, 19, 0.1);
    /* Usando el color primario muy suave */
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #2d3748;
    line-height: 1.4;
}

.rfv-note-icon {
    width: 20px;
    height: 20px;
    color: #d4b910;
    /* Color primario oscuro */
    flex-shrink: 0;
    margin-top: 1px;
}

.rfv-info-note strong {
    font-weight: 700;
    color: #1a202c;
}