/* ============================================
   Ciencias ULisboa - Keycloak Login Theme
   Native Keycloak theme CSS
   ============================================ */

/* ---------- Font ---------- */
@font-face {
    font-family: "Sofia-Pro-Medium";
    src: url('../fonts/Sofia-Pro/Sofia-Pro-Medium-Az.otf') format('opentype');
}

body {
    font-family: "Sofia-Pro-Medium", Arial, Helvetica, sans-serif !important;
    color: black !important;
}

/* ---------- Background ---------- */
.kcBodyClass {
    background: none !important;
    background-color: #2c3fb1 !important;
}

/* ---------- Page layout ---------- */
.login-pf-page {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* ---------- Header / Logo ---------- */
#kc-header {
    width: 100%;
    text-align: center;
    padding: 40px 0 20px;
}

#kc-header-wrapper {
    padding: 0px 10px 20px;
    display: flex;
    justify-content: center;
}

.kc-logo {
    max-width: 420px;
    height: auto;
}

/* ---------- Card ---------- */
.card-pf {
    max-width: 520px;
    width: 90%;
    margin: 0 auto;
    border: none;
    border-radius: 4px !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    padding: 30px 40px;
    background: #fff;
}

/* ---------- Locale selector ---------- */
#kc-locale {
    text-align: right;
    margin-bottom: 5px;
}

.kc-locale-toggle {
    color: #2c3fb1 !important;
    font-size: 0.8rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 2px 6px;
    font-weight: 400;
}

.locale-arrow {
    font-size: 0.7rem;
}

#language-switch1 {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    min-width: 120px;
    list-style: none;
    padding: 4px 0;
    margin: 0;
}

#language-switch1.show {
    display: block;
}

#language-switch1 a {
    display: block;
    padding: 6px 16px;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
}

#language-switch1 a:hover {
    background: #f0f0f0;
}

#kc-locale-dropdown {
    position: relative;
    display: inline-block;
}

/* ---------- Page title ---------- */
#kc-page-title {
    text-align: center;
    font-size: 1.35rem;
    font-weight: 500;
    color: #222;
    margin: 10px 0 20px;
}

/* ---------- Form header ---------- */
.login-pf-header {
    margin-bottom: 0;
}

/* ---------- Inputs ---------- */
input {
    border-radius: 5px !important;
}

.pf-c-form-control {
    border: 1px solid #2c3fb1;
    border-radius: 2%;
}

/* ---------- Social provider buttons ---------- */
.kcFormSocialAccountListButtonClass,
.pf-c-button.pf-m-control.pf-m-block.kc-social-item.kc-social-gray {
    display: block;
    width: 100%;
    color: white !important;
    background-color: #2c3fb1 !important;
    border-radius: 5px !important;

    margin-bottom: 8px;
    position: relative;
    border: none;
    text-align: center;
}

.kcFormSocialAccountListButtonClass:hover,
.pf-c-button.pf-m-control.pf-m-block.kc-social-item.kc-social-gray:hover {
    background-color: #465ddd !important;
}

/* Autenticacao.gov button — show logo as background, hide text */
#social-cmd-prod-saml,
#social-cmd-saml {
    background-image: url('../img/logo-ag.svg') !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent !important;
}

/* eIDAS button — show logo as background, hide text */
#social-eidas-saml {
    background-image: url('../img/eidas.png') !important;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    color: transparent !important;
}

/* Hide icon/text inside social buttons that use background-image */
#social-cmd-prod-saml span,
#social-cmd-prod-saml i,
#social-cmd-saml span,
#social-cmd-saml i,
#social-eidas-saml span,
#social-eidas-saml i {
    visibility: hidden;
}

/* ---------- "Ou" separator ---------- */
.kc-social-section h2,
[data-kc-msg="identity-provider-login-label"] {
    color: rgb(39, 39, 39);
    font-size: 1rem;
    font-weight: 400;
    text-align: center;
    margin: 12px 0;
}

/* ---------- Primary button (Entrar) ---------- */
.pf-c-button.pf-m-primary {
    background-color: #2c3fb1;
}

.kcButtonClass.pf-c-button.kcButtonPrimaryClass.pf-m-primary.kcButtonLargeClass.btn-lg {
    border-radius: 5px !important;
}

.kcButtonClass.pf-c-button.kcButtonPrimaryClass.pf-m-primary.kcButtonLargeClass.btn-lg:hover {
    background-color: #465ddd !important;
}

#kc-login {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    margin-top: 10px;
}

/* ---------- Password visibility toggle ---------- */
.kcFormPasswordVisibilityButtonClass,
.pf-c-button.pf-m-control[data-password-toggle] {
    background-color: #2c3fb1 !important;
    border-radius: 5px;
}

.kcFormPasswordVisibilityIconShow,
.kcFormPasswordVisibilityIconHide {
    color: white;
}

/* Remove PatternFly control button borders */
.pf-c-button.pf-m-control {
    --pf-c-button--after--BorderColor: none !important;
}

.pf-c-button.pf-m-control:hover {
    --pf-c-button--m-control--after--BorderBottomColor: transparent !important;
}

.pf-c-button.pf-m-control::after {
    border: none !important;
}

/* ---------- Forgot password link ---------- */
.login-pf-settings {
    display: flex;
    justify-content: flex-end;
}

.login-pf-settings a {
    color: #2c3fb1;
    font-size: 0.85rem;
}

/* ---------- Registration / info ---------- */
#kc-info-wrapper {
    background: none;
    text-align: center;
    padding: 15px 0 5px;
}

#kc-registration {
    font-size: 0.9rem;
    color: #555;
}

#kc-registration a {
    color: #2c3fb1;
    text-decoration: none;
    font-weight: 600;
}

#kc-registration a:hover {
    text-decoration: underline;
}

/* ---------- Link Account (for IdP linking page) ---------- */
#linkAccount {
    color: white !important;
    background-color: #2c3fb1 !important;
    border-radius: 5px !important;
    background-image: none !important;
    margin-top: 5%;
}

#linkAccount:hover {
    background-color: #465ddd !important;
}

/* ---------- Delete account text ---------- */
#kc-delete-text {
    padding-bottom: 5% !important;
}

/* ---------- Form actions layout ---------- */
.form-actions {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

/* ---------- Alert messages ---------- */
.pf-c-alert.pf-m-inline {
    margin-bottom: 15px;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .card-pf {
        max-width: 95%;
        padding: 20px 20px;
    }

    .kc-logo {
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .card-pf {
        padding: 15px;
    }

    .kc-logo {
        max-width: 200px;
    }

    #kc-page-title {
        font-size: 1.2rem;
    }
}

.fa {
    color: white;
}

#resend {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    margin-top: 10px;
}

.fa-exclamation-circle {
    color: #2c3fb1 !important;
}

.fa-check-circle {
    color: #2c3fb1 !important;
}
