/**
 * Money Go Vendor Registration CSS
 * Estilos para el formulario de registro y validación
 */

/* Contenedor principal del formulario */
.moneygo-vendor-registration-form {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.moneygo-vendor-registration-form h2 {
    color: #333;
    margin-bottom: 10px;
    text-align: center;
    font-size: 28px;
    font-weight: 600;
}

.form-description {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.5;
}

/* Filas del formulario */
.form-row {
    margin-bottom: 20px;
}

.form-row label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.form-row label.required::after {
    content: ' *';
    color: #e74c3c;
}

/* Campos de entrada */
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-row input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-row input.error {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Grupo de entrada RIF con botón */
.rif-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.rif-input-group input {
    flex: 1;
    margin-bottom: 0;
}

.rif-input-group .btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    min-width: 120px;
}

.rif-input-group .btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.rif-input-group .btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Pasos del formulario */
.rif-validation-step {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    margin-bottom: 30px;
}

.rif-validation-step h3 {
    color: #495057;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.registration-form-step {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #d4edda;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.registration-form-step h3 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid #c3e6cb;
    padding-bottom: 10px;
}

/* Mensajes de validación */
.validation-message {
    margin-top: 8px;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    display: none;
}

.validation-message.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.validation-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.validation-message.loading {
    display: block;
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Botón de envío */
.submit-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.submit-button:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-button.disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

/* Notificaciones */
.moneygo-notice {
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.5;
}

.moneygo-notice-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.moneygo-notice-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.moneygo-notice-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Indicador de carga */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .moneygo-vendor-registration-form {
        margin: 20px;
        padding: 20px;
    }
    
    .moneygo-vendor-registration-form h2 {
        font-size: 24px;
    }
    
    .form-row input[type="text"],
    .form-row input[type="email"],
    .form-row input[type="tel"],
    .form-row input[type="password"] {
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .rif-input-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .rif-input-group .btn {
        width: 100%;
        min-width: auto;
    }
}

/* Mejoras de accesibilidad */
.form-row input:focus-visible {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* Estados de hover para mejor UX */
.form-row input:hover {
    border-color: #bdc3c7;
}

/* Animaciones suaves */
.form-row {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para el toggle de contraseña */
.password-field {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    font-size: 18px;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #333;
}

.password-toggle.show::before {
    content: '👁️';
}

.password-toggle.hide::before {
    content: '🙈';
}

/* Estilos para campos con iconos */
.field-with-icon {
    position: relative;
}

.field-with-icon input {
    padding-right: 40px;
}

.field-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
}

/* Estilos para el formulario de Dokan integrado */
.dokan-seller-registration-form .form-row {
    margin-bottom: 20px;
}

.dokan-seller-registration-form input[type="text"],
.dokan-seller-registration-form input[type="email"],
.dokan-seller-registration-form input[type="tel"],
.dokan-seller-registration-form input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dokan-seller-registration-form input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Estilos para campos autocompletados */
.form-row input[readonly],
.form-row textarea[readonly] {
    background-color: #f8f9fa;
    color: #495057;
    cursor: not-allowed;
    border-color: #ced4da;
}

.form-row.data-loaded input[readonly],
.form-row.data-loaded textarea[readonly] {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.3s ease-out;
}

.notification-success {
    background-color: #28a745;
}

.notification-error {
    background-color: #dc3545;
}

.notification-info {
    background-color: #17a2b8;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Indicador de datos cargados */
.form-row.data-loaded::before {
    content: '✓';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-weight: bold;
    font-size: 16px;
}

.form-row {
    position: relative;
}

/* Estilos para campos de solo lectura */
.form-control[readonly] {
    background-color: #f8f9fa;
    opacity: 0.8;
}

.form-control[readonly]:focus {
    box-shadow: none;
    border-color: #ced4da;
}

/* Mensaje de ayuda */
.form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Estilos para campos autocompletados exitosamente */
.form-row.data-loaded .form-control[readonly] {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* Estilos específicos para el flujo de 2 pasos */
.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step-indicator .step {
    display: flex;
    align-items: center;
    margin: 0 15px;
    font-weight: 500;
}

.step-indicator .step-number {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    font-weight: bold;
}

.step-indicator .step.active .step-number {
    background: #3498db;
    color: white;
}

.step-indicator .step.completed .step-number {
    background: #28a745;
    color: white;
}

/* Animaciones para transiciones entre pasos */
.rif-validation-step,
.registration-form-step {
    transition: all 0.3s ease;
}

.registration-form-step {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Estilos para el botón de validación */
.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 20px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

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