/* ==========================================
   CUSTOM LOGIN AREA - ESTILO MELHORADO
   ========================================== */

/* Reset e container principal */
.login {
    display: flex;
    padding: 0;
    margin: 0;
    background-color: #f9f9f9;
    overflow: hidden;
    min-height: 100vh;
}

/* ==========================================
   LADO ESQUERDO - FORMULÁRIO
   ========================================== */

#login {
    width: 35vw;
    min-width: 320px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#login form {
    margin: 0 auto;
    padding: 0;
    width: 275px;
    max-width: 100%;
    background: none;
    border: none;
    box-shadow: none;
}

/* Mensagens de erro e sucesso */
p.message, 
#login_error, 
#login-message {
    margin: 7px auto !important;
    width: 275px !important;
    max-width: 100%;
    border-radius: 4px;
}

/* Labels dos campos */
#login form label {
    margin-bottom: 3px;
    display: block;
    /*
    font-weight: 500;
    color: #333;
    */
}

/* Campos de input padrão */
#login form input[type="text"],
#login form input[type="password"],
#login form input[type="email"] {
    width: 100%;
    height: 40px;
    border-radius: 0;
    border: 1px solid #000;
    margin: 0;
    padding: 0 10px;
    font-size: 16px;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

#login form input[type="text"]:focus,
#login form input[type="password"]:focus,
#login form input[type="email"]:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Espaçamento dos elementos do formulário */
#login form > p,
.user-pass-wrap,
p.submit,
p#nav {
    padding: 7px 0 !important;
    margin: 0;
}

p.submit {
    margin: 0 !important;
}

/* Botão de submit */
#login form input[type="submit"] {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 0;
    padding: 0;
    text-transform: uppercase;
    cursor: pointer;
    background-color: #042DEB;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease;
}

#login form input[type="submit"]:hover,
#login form input[type="submit"]:focus {
    background-color: #000;
    outline: none;
}

#login form input[type="submit"]:active {
    background-color: #111;
}

/* Link "Voltar para..." */
p#nav {
    margin: 0 auto !important;
    width: 275px !important;
    text-align: center;
}

p#nav a {
    color: #333;
    text-decoration: none;
}

p#nav a:hover {
    color: #000;
    text-decoration: underline;
}

/* Oculta elementos desnecessários */
.privacy-policy-page-link,
.language-switcher form,
.forgetmenot {
    display: none;
}

/* Link "Voltar ao site" */
#backtoblog {
    text-align: center;
    padding-top: 20px;
}

#backtoblog a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

#backtoblog a:hover {
    color: #000;
}

/* ==========================================
   MATH CAPTCHA - VERIFICAÇÃO DE SEGURANÇA
   ========================================== */

.login-captcha-wrap {
    margin: 15px 0;
    /* padding: 15px; */
    /* background: #fff; */
    /* border: 1px solid #000; */
    /* border-radius: 4px; */
}

.login-captcha-wrap label {
    /*font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
    line-height: 1.5;
    */
}

.login-captcha-wrap input#captcha_answer {
    width: 100%;
    height: 40px;
    margin-top: 5px;
    margin-bottom: 0;
    border: 1px solid #000;
    border-radius: 0;
    padding: 0 10px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

.login-captcha-wrap input#captcha_answer:focus {
    border-color: #333;
    outline: none;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Classe auxiliar para leitores de tela */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* ==========================================
   LADO DIREITO - IMAGEM DE FUNDO
   ========================================== */

.language-switcher {
    width: 65vw;
    background-image: url(https://danielfarias.net.br/background-login/background-login.jpg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* ==========================================
   RESPONSIVIDADE - MOBILE
   ========================================== */

@media screen and (max-width: 899px) {
    .login {
        display: block;
        overflow-y: auto;
        min-height: 100vh;
    }

    #login {
        width: 100vw;
        min-width: auto;
        padding: 60px 20px;
        display: block;
    }

    #login form {
        width: 100%;
        max-width: 320px;
    }

    p.message,
    #login_error,
    #login-message,
    p#nav {
        width: 100% !important;
        max-width: 320px;
    }

    .language-switcher {
        display: block;
        width: 100vw;
        min-height: 50vh;
        height: auto;
    }
}

@media screen and (max-width: 480px) {
    #login {
        padding: 40px 15px;
    }

    #login form,
    p.message,
    #login_error,
    #login-message,
    p#nav {
        max-width: 280px;
    }

    .login-captcha-wrap {
        padding: 12px;
    }

    .login-captcha-wrap label {
        font-size: 13px;
    }
}

/* ==========================================
   ACESSIBILIDADE
   ========================================== */

/* Melhora o foco visível para navegação por teclado */
a:focus,
input:focus,
button:focus {
    outline: 2px solid #333;
    outline-offset: 2px;
}

/* Remove outline apenas para cliques de mouse */
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* Suporte para modo de alto contraste */
@media (prefers-contrast: high) {
    #login form input {
        border-width: 2px;
    }
    
    .login-captcha-wrap {
        border-width: 2px;
    }
}

/* Respeita preferências de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}