/**
 * ESTILOS PARA REGISTRO DE COMPRADOR
 * 
 * Este archivo contiene los estilos CSS específicos para el formulario
 * de registro de compradores en Viive.
 */

/* ===== VARIABLES CSS ===== */
:root {
    --primary-color: #2ecc71;
    --primary-dark: #27ae60;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --background-color: #f8f9fa;
    --white: #ffffff;
    --border-color: #e9ecef;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

/* ===== CONTENEDOR PRINCIPAL ===== */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
}

/* ===== HEADER ===== */
.login-header {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.back-to-home:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.logo-section {
    text-align: center;
    color: var(--white);
}

.logo-icon {
    margin-bottom: 10px;
    opacity: 0.9;
}
.logo-icon .logo-viive-registro {
    height: 110px;
    width: auto;
    object-fit: contain;
    margin-left: 37px;
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.logo-section p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* ===== FORMULARIO ===== */
.login-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ===== GRUPOS DE FORMULARIO ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary-color);
    width: 16px;
}

/* ===== INPUTS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
    padding: 15px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
    background: var(--white);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="password"]:hover,
select:hover {
    border-color: var(--primary-color);
}

/* ===== CHECKBOXES ===== */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.5;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: var(--white);
    font-weight: bold;
    font-size: 12px;
}

.link-terminos {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.link-terminos:hover {
    text-decoration: underline;
}

/* ===== BOTÓN DE REGISTRO ===== */
.btn-login {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 18px 30px;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    box-shadow: var(--shadow);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== FOOTER DEL FORMULARIO ===== */
.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-light);
    font-size: 14px;
}

.link-login {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.link-login:hover {
    text-decoration: underline;
}

/* ===== MENSAJES ===== */
.error-message {
    background: #fee;
    color: var(--accent-color);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    border: 1px solid #fcc;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

.success-message {
    background: #efe;
    color: var(--primary-dark);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    border: 1px solid #cfc;
    margin-bottom: 20px;
    font-weight: 500;
    display: none;
}

/* ===== BENEFICIOS ===== */
.login-benefits {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    max-width: 300px;
    backdrop-filter: blur(10px);
}

.login-benefits h3 {
    color: var(--text-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.benefits-grid {
    display: grid;
    gap: 15px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(46, 204, 113, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(46, 204, 113, 0.1);
}

.benefit-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 2px;
    flex-shrink: 0;
}

.benefit-item h4 {
    color: var(--text-color);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.benefit-item p {
    color: var(--text-light);
    font-size: 12px;
    line-height: 1.4;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .login-benefits {
        display: none;
    }
}

@media (max-width: 768px) {
    .login-container {
        padding: 10px;
    }
    
    .login-header {
        position: static;
        flex-direction: column;
        gap: 20px;
        margin-bottom: 30px;
    }
    
    .logo-section h1 {
        font-size: 2rem;
    }
    
    .login-form-container {
        padding: 30px 20px;
        margin-top: 0;
    }
    
    .back-to-home {
        align-self: flex-start;
    }
    .login-container {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 20px 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"],
    select {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .btn-login {
        padding: 15px 25px;
        font-size: 14px;
    }
    
    .logo-section h1 {
        font-size: 1.8rem;
    }
    
    .logo-section p {
        font-size: 1rem;
    }
    .login-container {
        display: flex;
        flex-direction: column;
    }
}

/* ===== ANIMACIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-form-container {
    animation: fadeInUp 0.6s ease-out;
}

/* ===== MEJORAS EN SELECT ===== */
select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 45px;
}

/* ===== MEJORAS EN CHECKBOX ===== */
.checkbox-label input[type="checkbox"] {
    opacity: 0;
    position: absolute;
}

.checkbox-label:hover .checkmark {
    border-color: var(--primary-color);
}

/* ===== MEJORAS EN FOCUS ===== */
.form-group:focus-within label {
    color: var(--primary-color);
}

/* ===== MEJORAS EN HOVER ===== */
.form-group:hover label {
    color: var(--primary-color);
}

/* ===== MEJORAS EN DISABLED ===== */
input:disabled,
select:disabled,
.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== MEJORAS EN PLACEHOLDER ===== */
input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

/* ===== MEJORAS EN SCROLL ===== */
.login-container {
    overflow-y: auto;
}

/* ===== MEJORAS EN Z-INDEX ===== */
.login-form-container {
    z-index: 10;
}

.login-benefits {
    z-index: 5;
}

/* ===== MEJORAS EN TRANSICIONES ===== */
* {
    transition: var(--transition);
}

/* ===== MEJORAS EN ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== MEJORAS EN ALTO CONTRASTE ===== */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --text-light: #000;
    }
}
