/**
 * OXO Unified Authentication System - Styles
 * Sistema de autenticación unificado basado en documento de identidad
 * 
 * @version 1.0.0
 */

/* ============================================
   Container Principal
   ============================================ */
.oxo-unified-auth-container {
    max-width: 550px;
    margin: 0 auto;
    padding: 20px;
}

.oxo-unified-auth-wrapper {
    position: relative;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

/* ============================================
   Header
   ============================================ */
.oxo-auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.oxo-auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.auth-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   Steps
   ============================================ */
.oxo-auth-step {
    display: none;
}

.oxo-auth-step.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Forms
   ============================================ */
.oxo-auth-form {
    margin: 0;
}

.oxo-form-group {
    margin-bottom: 20px;
}

.oxo-form-group label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
}

.oxo-form-group label .required {
    color: #e74c3c;
    margin-left: 2px;
}

.oxo-form-group input[type="text"],
.oxo-form-group input[type="email"],
.oxo-form-group input[type="password"],
.oxo-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.oxo-form-group input:focus,
.oxo-form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.oxo-form-group input[readonly] {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.oxo-field-hint,
.oxo-field-note {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 5px;
}

.oxo-field-note {
    color: #2ecc71;
    font-style: italic;
}

/* ============================================
   Checkbox
   ============================================ */
.oxo-form-row {
    margin-bottom: 15px;
}

.oxo-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.oxo-checkbox input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* ============================================
   Buttons
   ============================================ */
.oxo-form-actions {
    margin-top: 25px;
    text-align: center;
}

.oxo-btn-primary,
.oxo-btn-secondary {
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
    text-decoration: none;
    display: inline-block;
    min-width: 150px;
}

.oxo-btn-primary {
    background-color: #3498db;
    color: #ffffff;
}

.oxo-btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.oxo-btn-primary:active {
    transform: translateY(0);
}

.oxo-btn-primary:disabled {
    background-color: #bdc3c7;
    cursor: not-allowed;
    transform: none;
}

.oxo-btn-secondary {
    background-color: #95a5a6;
    color: #ffffff;
    margin-left: 10px;
}

.oxo-btn-secondary:hover {
    background-color: #7f8c8d;
}

.button.oxo-btn-primary,
.button.oxo-btn-secondary {
    line-height: 1.5;
}

/* ============================================
   Documento Bloqueado
   ============================================ */
.oxo-document-locked {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.oxo-document-locked strong {
    color: #333;
    margin-right: 10px;
}

.oxo-document-locked span {
    color: #3498db;
    font-weight: 600;
    flex: 1;
}

.oxo-btn-change {
    background: none;
    border: 1px solid #3498db;
    color: #3498db;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.oxo-btn-change:hover {
    background-color: #3498db;
    color: #ffffff;
}

/* ============================================
   User Info
   ============================================ */
.oxo-user-info {
    background-color: #e8f5e9;
    border-left: 4px solid #2ecc71;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.oxo-welcome {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.oxo-welcome strong {
    color: #2ecc71;
}

.oxo-user-email {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* ============================================
   Messages
   ============================================ */
.oxo-message {
    display: none;
    padding: 12px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
    line-height: 1.5;
}

.oxo-message.error {
    background-color: #fee;
    border-left: 4px solid #e74c3c;
    color: #c0392b;
}

.oxo-message.success {
    background-color: #e8f5e9;
    border-left: 4px solid #2ecc71;
    color: #27ae60;
}

.oxo-message.info {
    background-color: #e3f2fd;
    border-left: 4px solid #3498db;
    color: #2980b9;
}

.oxo-info-message {
    background-color: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    color: #856404;
    font-size: 14px;
}

/* ============================================
   Success Screen (Auto-created)
   ============================================ */
.oxo-success-message {
    text-align: center;
    padding: 30px 20px;
}

.oxo-icon-success {
    width: 80px;
    height: 80px;
    background-color: #2ecc71;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    margin: 0 auto 20px;
    font-weight: bold;
}

.oxo-success-message h3 {
    font-size: 24px;
    color: #2ecc71;
    margin-bottom: 15px;
}

.oxo-success-message p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 10px;
}

.oxo-instruction {
    background-color: #f8f9fa;
    padding: 12px;
    border-radius: 4px;
    margin: 10px 0;
}

.oxo-instruction strong {
    color: #3498db;
}

/* ============================================
   Form Footer
   ============================================ */
.oxo-form-footer {
    text-align: center;
    margin-top: 15px;
}

.oxo-link-secondary {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.oxo-link-secondary:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ============================================
   Loading Overlay
   ============================================ */
.oxo-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 1000;
}

.oxo-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.oxo-loading-overlay p {
    margin-top: 15px;
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .oxo-unified-auth-wrapper {
        padding: 25px;
    }
    
    .oxo-auth-header h2 {
        font-size: 24px;
    }
    
    .oxo-btn-primary,
    .oxo-btn-secondary {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
    }
    
    .oxo-document-locked {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .oxo-btn-change {
        margin-top: 10px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .oxo-unified-auth-container {
        padding: 10px;
    }
    
    .oxo-unified-auth-wrapper {
        padding: 20px;
    }
}

/* ============================================
   WooCommerce Override
   ============================================ */
.woocommerce #customer_login {
    max-width: none;
}

.woocommerce .oxo-unified-auth-container form.login,
.woocommerce .oxo-unified-auth-container form.register {
    border: none;
    padding: 0;
    margin: 0;
    max-width: none;
}
