/**
 * BEETOS - Modal de Autenticación
 * auth-modal.css
 */

/* ============================================
   AUTH MODAL - OVERLAY & CONTAINER
   ============================================ */

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-overlay.active {
    display: block;
    opacity: 1;
}

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 450px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    display: none;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.auth-modal.active {
    display: block;
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.auth-modal-content {
    padding: 40px 30px;
    overflow-y: auto;
    max-height: calc(90vh - 80px);
}

/* ============================================
   CLOSE BUTTON
   ============================================ */

.auth-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    border-radius: 50%;
    color: #666;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 10;
}

.auth-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    transform: rotate(90deg);
}

/* ============================================
   LOGO
   ============================================ */

.auth-logo {
    text-align: center;
    margin-bottom: 30px;
}

.auth-logo img {
    height: 50px;
    width: auto;
}

/* ============================================
   TABS
   ============================================ */

.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 12px;
}

.auth-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.auth-tab:hover {
    color: #333;
}

.auth-tab.active {
    background: white;
    color: #5a2d5a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   FORMS
   ============================================ */

.auth-form {
    display: none;
    animation: fadeIn 0.3s ease;
}

.auth-form.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px 0;
    text-align: center;
}

.auth-subtitle {
    font-size: 14px;
    color: #999;
    margin: 0 0 30px 0;
    text-align: center;
}

/* ============================================
   INPUT GROUPS
   ============================================ */

.auth-input-group {
    margin-bottom: 20px;
}

.auth-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.auth-input-group label i {
    color: #5a2d5a;
    margin-right: 5px;
    font-size: 12px;
}

.auth-input-group input[type="text"],
.auth-input-group input[type="email"],
.auth-input-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
    background: #fafafa;
}

.auth-input-group input:focus {
    outline: none;
    border-color: #5a2d5a;
    background: white;
}

.auth-input-group input.error {
    border-color: #e74c3c;
}

.auth-input-group input.success {
    border-color: #27ae60;
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
}

.password-input-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 16px;
    padding: 8px;
    transition: color 0.3s;
}

.toggle-password:hover {
    color: #5a2d5a;
}

/* Error Messages */
.auth-error {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 6px;
    min-height: 18px;
}

/* Password Strength */
.password-strength {
    margin-top: 8px;
    font-size: 12px;
}

.password-strength.weak { color: #e74c3c; }
.password-strength.medium { color: #f39c12; }
.password-strength.strong { color: #27ae60; }

/* ============================================
   OPTIONS (Remember, Forgot Password)
   ============================================ */

.auth-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 10px;
}

.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.auth-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #5a2d5a;
}

.auth-link {
    font-size: 13px;
    color: #5a2d5a;
    text-decoration: none;
    transition: color 0.3s;
}

.auth-link:hover {
    color: #6d3a6d;
    text-decoration: underline;
}

/* ============================================
   SUBMIT BUTTON
   ============================================ */

.auth-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #5a2d5a 0%, #6d3a6d 100%);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(90, 45, 90, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-submit-btn .btn-loader {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* ============================================
   MESSAGES (Success/Error)
   ============================================ */

.auth-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    display: none;
}

.auth-message.success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.auth-message.error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    .auth-modal {
        width: 95%;
        max-width: none;
        border-radius: 16px;
    }
    
    .auth-modal-content {
        padding: 30px 20px;
    }
    
    .auth-title {
        font-size: 20px;
    }
    
    .auth-options {
        flex-direction: column;
        align-items: flex-start;
    }
}