/* ========================================
   FUNDAÇÃO LOGOSÓFICA - TEMA KEYCLOAK
   Paleta de Cores:
   - Azul Primário: #12326E
   - Laranja Secundário: #EB6012
   - Amarelo Acento 1: #F7A400
   - Amarelo Acento 2: #FFDF00
   ======================================== */

/* ========== RESET E VARIÁVEIS GLOBAIS ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cor-primaria-azul: #12326E;
    --cor-secundaria-laranja: #EB6012;
    --cor-acento-amarelo1: #F7A400;
    --cor-acento-amarelo2: #FFDF00;
    --cor-texto-claro: #FFFFFF;
    --cor-texto-escuro: #333333;
    --cor-fundo-claro: #f5f5f5;
    --cor-borda: #ddd;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--cor-fundo-claro);
    font-family: 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--cor-texto-escuro);
    line-height: 1.6;
}

/* ========== LAYOUT PRINCIPAL - DUAS COLUNAS ========== */
.login-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ========== COLUNA ESQUERDA (VISUAL COM SOL) ========== */
.login-visual-side {
    flex: 1;
    background: linear-gradient(135deg, var(--cor-primaria-azul) 0%, #0f2454 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.login-visual-side::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    background-image: url('../img/sol-bg.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.9;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, -55%);
    }
}

/* ========== COLUNA DIREITA (FORMULÁRIO) ========== */
.login-form-side {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    background-color: var(--cor-texto-claro);
    overflow-y: auto;
}

/* ========== CARD DO FORMULÁRIO ========== */
#kc-form-card {
    width: 100%;
    max-width: 420px;
}

/* ========== HEADER (LOGO) ========== */
#kc-header-wrapper {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

#kc-header {
    margin-bottom: 20px;
}

#kc-logo-text {
    background-image: url('../img/logo-azul.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    height: 100px;
    width: 100%;
    text-indent: -9999px;
    overflow: hidden;
}

/* ========== SELETOR DE IDIOMA ========== */
#kc-locale {
    position: absolute;
    top: 0;
    right: 0;
}

#kc-locale-wrapper {
    display: flex;
    justify-content: flex-end;
}

.kc-dropdown {
    position: relative;
}

.kc-dropdown > a {
    color: var(--cor-primaria-azul);
    text-decoration: none;
    font-size: 13px;
    padding: 5px 10px;
    border: 1px solid var(--cor-borda);
    border-radius: 3px;
    transition: all 0.3s;
    display: inline-block;
}

.kc-dropdown > a:hover {
    background-color: var(--cor-fundo-claro);
    border-color: var(--cor-secundaria-laranja);
}

.kc-dropdown ul {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--cor-texto-claro);
    border: 1px solid var(--cor-borda);
    border-radius: 3px;
    list-style: none;
    min-width: 120px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    margin-top: 5px;
}

.kc-dropdown:hover ul {
    display: block;
}

.kc-dropdown-item {
    padding: 0;
}

.kc-dropdown-item a {
    display: block;
    padding: 10px 15px;
    color: var(--cor-texto-escuro);
    text-decoration: none;
    transition: background-color 0.3s;
}

.kc-dropdown-item a:hover {
    background-color: var(--cor-fundo-claro);
    color: var(--cor-secundaria-laranja);
}

/* ========== MENSAGENS DE ERRO/SUCESSO ========== */
.alert {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 13px;
}

.alert-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-warning {
    background-color: #ffeaa7;
    border: 1px solid #ffde8a;
    color: #856404;
}

.alert-success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* ========== SEÇÃO DE SOCIAL PROVIDERS ========== */
.kc-social-providers-section {
    margin-bottom: 30px;
}

.kc-social-providers-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cor-texto-escuro);
    text-align: center;
    margin-bottom: 15px;
}

.kc-social-providers-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.kc-social-providers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.kc-social-provider-item {
    list-style: none;
}

.kc-social-provider-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    background-color: #fff;
    color: var(--cor-texto-escuro);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kc-social-provider-button:hover {
    background-color: var(--cor-fundo-claro);
    border-color: var(--cor-secundaria-laranja);
    color: var(--cor-secundaria-laranja);
}

.kc-social-provider-button:active {
    transform: translateY(1px);
}

.kc-social-provider-button.kc-social-provider-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.kc-social-icon {
    font-size: 18px;
}

.kc-social-provider-name {
    flex: 1;
    text-align: left;
}

.kc-social-provider-grid-item {
    justify-content: center;
}

.kc-social-provider-grid-item .kc-social-provider-name {
    display: none;
}

/* ========== DIVISOR ========== */
.kc-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
    gap: 10px;
}

.kc-divider::before,
.kc-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background-color: var(--cor-borda);
}

.kc-divider-text {
    color: #999;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
}

/* ========== CONTEÚDO DO FORMULÁRIO ========== */
#kc-content {
    width: 100%;
}

#kc-form {
    width: 100%;
}

#kc-form-login {
    width: 100%;
}

/* ========== GRUPOS DE FORMULÁRIO ========== */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.kc-label {
    color: var(--cor-texto-escuro);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

/* ========== CAMPOS DE ENTRADA ========== */
.kc-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--cor-borda);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
}

.kc-input:focus {
    outline: none;
    border-color: var(--cor-secundaria-laranja);
    box-shadow: 0 0 0 3px rgba(235, 96, 18, 0.1);
}

.kc-input::placeholder {
    color: #999;
}

.kc-input-error-message {
    color: #c33;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

/* ========== CHECKBOX (LEMBRAR-ME) ========== */
.checkbox {
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.checkbox label {
    display: flex;
    align-items: center;
    margin: 0;
    font-weight: 400;
    cursor: pointer;
    gap: 8px;
}

.checkbox input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

/* ========== OPÇÕES DO FORMULÁRIO ========== */
#kc-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    font-size: 13px;
}

.kc-form-options-wrapper {
    text-align: right;
}

#kc-form-options a,
.kc-form-options-wrapper a {
    color: var(--cor-primaria-azul);
    text-decoration: none;
    transition: color 0.3s;
}

#kc-form-options a:hover,
.kc-form-options-wrapper a:hover {
    color: var(--cor-secundaria-laranja);
    text-decoration: underline;
}

.kc-form-setting {
    margin-bottom: 25px;
}

/* ========== BOTÃO DE LOGIN ========== */
#kc-form-buttons {
    margin-top: 30px;
    margin-bottom: 0;
}

.kc-button {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kc-button-primary {
    background: linear-gradient(135deg, var(--cor-secundaria-laranja) 0%, #d94f0a 100%);
    color: var(--cor-texto-claro);
    font-weight: 700;
}

.kc-button-primary:hover {
    background: linear-gradient(135deg, var(--cor-acento-amarelo1) 0%, var(--cor-secundaria-laranja) 100%);
    box-shadow: 0 4px 12px rgba(235, 96, 18, 0.3);
    transform: translateY(-2px);
}

.kc-button-primary:active {
    transform: translateY(0);
}

.kc-button-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.kc-button-block {
    width: 100%;
}

.kc-button-large {
    padding: 14px 20px;
    font-size: 16px;
}

/* ========== INFORMAÇÕES ADICIONAIS ========== */
#kc-registration-container {
    margin-top: 25px;
    text-align: center;
    font-size: 13px;
    color: var(--cor-texto-escuro);
}

#kc-registration a {
    color: var(--cor-primaria-azul);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

#kc-registration a:hover {
    color: var(--cor-secundaria-laranja);
    text-decoration: underline;
}

/* ========== RESPONSIVIDADE ========== */
@media (max-width: 1024px) {
    .login-visual-side::before {
        width: 80%;
        max-width: 400px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-visual-side {
        min-height: 280px;
        flex: none;
    }

    .login-visual-side::before {
        width: 60%;
        max-width: 250px;
    }

    .login-form-side {
        padding: 30px 20px;
        min-height: auto;
    }

    #kc-form-card {
        max-width: 100%;
    }

    #kc-logo-text {
        height: 80px;
    }

    #kc-locale {
        position: static;
        margin-bottom: 20px;
    }

    #kc-locale-wrapper {
        justify-content: center;
    }

    .kc-social-providers-grid {
        grid-template-columns: 1fr;
    }

    .kc-social-provider-grid-item .kc-social-provider-name {
        display: inline;
    }
}

@media (max-width: 480px) {
    .login-form-side {
        padding: 20px 15px;
    }

    #kc-header-wrapper {
        margin-bottom: 30px;
    }

    #kc-logo-text {
        height: 70px;
    }

    .kc-input {
        padding: 10px 12px;
        font-size: 16px;
    }

    .kc-button-large {
        padding: 12px 16px;
        font-size: 14px;
    }

    #kc-form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .login-visual-side {
        min-height: 200px;
    }

    .login-visual-side::before {
        width: 50%;
        max-width: 180px;
    }

    .kc-social-providers-title {
        font-size: 13px;
    }

    .kc-social-provider-button {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* ========== UTILITÁRIOS ========== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none !important;
}
