/* Formulário de Login - TopAnuncios */

.topanuncios-login-form-container {
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
}

.topanuncios-login-form {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.topanuncios-login-form h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1f2937;
    font-size: 24px;
    font-weight: 600;
}

.topanuncios-form-group {
    margin-bottom: 20px;
}

.topanuncios-form-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.topanuncios-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.topanuncios-form-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.topanuncios-form-group input:invalid {
    border-color: #ef4444;
}

.topanuncios-btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    min-width: 120px;
}

.topanuncios-btn-primary {
    background: #3b82f6;
    color: #ffffff;
}

.topanuncios-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.topanuncios-btn-primary:active {
    transform: translateY(0);
}

.topanuncios-btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.topanuncios-btn-outline {
    background: transparent;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.topanuncios-btn-outline:hover {
    background: #3b82f6;
    color: #ffffff;
}

.topanuncios-btn-login {
    width: 100%;
    margin-top: 10px;
    padding: 14px 24px;
    font-size: 16px;
}

.topanuncios-login-messages {
    margin-top: 20px;
}

.topanuncios-error {
    background: #fef2f2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #fecaca;
    font-size: 14px;
    text-align: center;
}

.topanuncios-success {
    background: #f0fdf4;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
    font-size: 14px;
    text-align: center;
}

.topanuncios-login-already-logged {
    text-align: center;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 30px;
    color: #0c4a6e;
}

.topanuncios-login-already-logged p {
    margin-bottom: 20px;
    font-size: 16px;
}

.topanuncios-login-already-logged .topanuncios-btn {
    margin: 0 10px;
    display: inline-block;
}

/* Responsividade */
@media (max-width: 480px) {
    .topanuncios-login-form-container {
        padding: 15px;
    }
    
    .topanuncios-login-form {
        padding: 20px;
    }
    
    .topanuncios-btn-login {
        padding: 16px 24px;
    }
    
    .topanuncios-login-already-logged .topanuncios-btn {
        display: block;
        margin: 10px auto;
        max-width: 200px;
    }
}

/* Estados de loading */
.topanuncios-btn-login:disabled {
    position: relative;
}

.topanuncios-btn-login:disabled::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Melhorias de acessibilidade */
.topanuncios-form-group input:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.topanuncios-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Animações suaves */
.topanuncios-login-form {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
