/* Personalização da Página de Login do WordPress */

/* Reset e base */
body.login {
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Container principal */
#login {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    position: relative;
    z-index: 1;
}

/* Card do formulário */
#loginform,
#registerform,
#lostpasswordform {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px;
    border: none;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#loginform:hover,
#registerform:hover,
#lostpasswordform:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
}

/* Logo */
.login h1 {
    margin-bottom: 30px;
}

.login h1 a {
    background-image: url('https://megapvc.com.br/wp-content/uploads/2025/12/logo-megapvc.png') !important;
    background-size: contain;
    background-position: center center;
    background-repeat: no-repeat;
    width: 200px !important;
    height: 80px !important;
    margin: 0 auto 30px;
    display: block;
    text-indent: -9999px;
    overflow: hidden;
}

/* Títulos */
.login form .input,
.login input[type="text"],
.login input[type="password"] {
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #ffffff;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    margin-bottom: 15px;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus {
    outline: none;
    border-color: #136a8f;
    box-shadow: 0 0 0 3px rgba(19, 106, 143, 0.1);
    background-color: #ffffff;
}

.login form .input::placeholder,
.login input[type="text"]::placeholder,
.login input[type="password"]::placeholder {
    color: #999;
}

/* Labels */
.login label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* Checkbox "Lembrar-me" */
.login form .forgetmenot {
    margin-top: 10px;
}

.login form .forgetmenot label {
    font-weight: 400;
    font-size: 14px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #136a8f;
}

/* Botão de submit */
.wp-core-ui .button-primary,
.wp-core-ui .button.button-large {
    width: 100%;
    background: linear-gradient(135deg, #136a8f 0%, #11293e 100%);
    border: none;
    border-radius: 8px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(19, 106, 143, 0.3);
    margin-top: 20px;
}

.wp-core-ui .button-primary:hover,
.wp-core-ui .button.button-large:hover {
    background: linear-gradient(135deg, #125f81 0%, #0f1f2e 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(19, 106, 143, 0.4);
}

.wp-core-ui .button-primary:active,
.wp-core-ui .button.button-large:active {
    transform: translateY(0);
}

.wp-core-ui .button-primary:focus,
.wp-core-ui .button.button-large:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 106, 143, 0.2);
}

/* Links */
.login #nav,
.login #backtoblog {
    text-align: center;
    margin-top: 20px;
    padding: 0;
}

.login #nav a,
.login #backtoblog a {
    color: #136a8f;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    background: rgba(19, 106, 143, 0.1);
}

.login #nav a:hover,
.login #backtoblog a:hover {
    color: #ffffff;
    background: #136a8f;
    transform: translateY(-2px);
}

/* Remover mensagem de desconexão */
.login .message.logged-out {
    display: none !important;
}

/* Remover seletor de idioma */
#language-switcher,
.login form .language-switcher,
body.login .language-switcher,
select[name="locale"],
p:has(select[name="locale"]) {
    display: none !important;
    visibility: hidden !important;
}

/* Mensagens de erro */
.login .message,
.login #login_error {
    background: rgba(255, 255, 255, 0.95);
    border-left: 4px solid #dc3545;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: #333;
}

.login .message {
    border-left-color: #28a745;
}

/* Mensagem de sucesso */
.login .success {
    border-left-color: #28a745;
}

/* Link "Voltar para o site" */
.login #backtoblog {
    margin-top: 30px;
}

/* Ícones de usuário e senha */
.login form .input:first-of-type {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg>');
    background-repeat: no-repeat;
    background-position: 18px center;
    padding-left: 50px;
}

.login form .input[type="password"] {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect><path d="M7 11V7a5 5 0 0 1 10 0v4"></path></svg>');
    background-repeat: no-repeat;
    background-position: 18px center;
    padding-left: 50px;
    padding-right: 50px;
}

/* Botão de visualizar senha */
.login form .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login form .button.wp-hide-pw,
.login form .button-link.wp-hide-pw {
    position: absolute;
    right: 14px;
    top: 15px;
    bottom: auto;
    transform: none;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
    color: #999 !important;
    transition: all 0.3s ease;
    border-radius: 4px;
    box-shadow: none !important;
    text-shadow: none !important;
    line-height: 1 !important;
    vertical-align: middle !important;
}

.login form .button.wp-hide-pw:hover,
.login form .button-link.wp-hide-pw:hover {
    background: rgba(19, 106, 143, 0.1) !important;
    color: #136a8f !important;
}

.login form .button.wp-hide-pw:focus,
.login form .button-link.wp-hide-pw:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(19, 106, 143, 0.2) !important;
}

.login form .button.wp-hide-pw .dashicons,
.login form .button-link.wp-hide-pw .dashicons {
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
    line-height: 1 !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
}

.login form .button.wp-hide-pw .dashicons-visibility,
.login form .button-link.wp-hide-pw .dashicons-visibility,
.login form .button.wp-hide-pw .dashicons-hidden,
.login form .button-link.wp-hide-pw .dashicons-hidden {
    color: #999;
    width: 20px !important;
    height: 20px !important;
    font-size: 20px !important;
    line-height: 1 !important;
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    text-align: center !important;
}

.login form .button.wp-hide-pw:hover .dashicons-visibility,
.login form .button-link.wp-hide-pw:hover .dashicons-visibility,
.login form .button.wp-hide-pw:hover .dashicons-hidden,
.login form .button-link.wp-hide-pw:hover .dashicons-hidden {
    color: #136a8f;
}

/* Responsivo */
@media (max-width: 480px) {
    #login {
        padding: 20px;
    }
    
    #loginform,
    #registerform,
    #lostpasswordform {
        padding: 30px 20px;
    }
    
    .login h1 a {
        width: 160px !important;
        height: 64px !important;
    }
}

/* Animações de entrada */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#loginform,
#registerform,
#lostpasswordform {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner no botão */
.wp-core-ui .button-primary.loading {
    position: relative;
    color: transparent;
}

.wp-core-ui .button-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Melhorias de acessibilidade */
.login form .input:focus-visible,
.login input[type="text"]:focus-visible,
.login input[type="password"]:focus-visible {
    outline: 2px solid #136a8f;
    outline-offset: 2px;
}

/* Estilo para o link do WordPress */
.login #backtoblog a {
    font-size: 13px;
}

/* Remover estilos padrão do WordPress */
.login form {
    margin-top: 0;
}

.login form p {
    margin-bottom: 15px;
}

.login form p.submit {
    margin-top: 20px;
}

