@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/Inter-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

:root {
    --um-app-background: #f4faff;
    --um-light-sky-blue: #dff1fd;
    --um-sky-blue: #2ba5db;
    --um-midnight-blue: #223160;
    --um-neutral-gray: #808080;
    --um-card-shadow: rgba(0, 0, 0, 0.08);
    --um-logo-size: 64px;
    --um-header-gap: 24px;
}

.pf-v5-c-login {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    z-index: 1;
    min-height: 100svh;
    padding: 24px 16px 28px;
}

.pf-v5-c-login::before {
    content: "";
    position: fixed;
    width: 260px;
    height: 120px;
    border-radius: 48px;
    background: rgba(43, 165, 219, 0.08);
    transform: rotate(-18deg);
    right: max(2vw, 20px);
    bottom: max(8vh, 40px);
    z-index: 0;
    pointer-events: none;
}

.login-pf body {
    background: linear-gradient(
        135deg,
        var(--um-app-background) 0%,
        var(--um-light-sky-blue) 100%
    );
    background-attachment: fixed;
    min-height: 100svh;
    height: 100%;
    color: var(--um-midnight-blue);
    position: relative;
}

.login-pf body::before,
.login-pf body::after {
    content: "";
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.login-pf body::before {
    width: 260px;
    height: 260px;
    right: min(-40px, -5vw);
    top: max(-120px, -14vh);
    background: rgba(43, 165, 219, 0.14);
}

.login-pf body::after {
    width: 220px;
    height: 220px;
    left: min(-70px, -8vw);
    bottom: -96px;
    background: rgba(223, 241, 253, 0.8);
}

.pf-v5-c-login__container {
    grid-template-columns: minmax(21rem, 40rem);
    grid-template-areas: "header"
                         "main";
    position: relative;
    z-index: 2;
    width: min(100%, 40rem);
    margin: 0 auto;
}

.pf-v5-c-login__header {
    margin-bottom: 0;
}

#kc-header-wrapper {
    position: relative;
    margin-bottom: var(--um-header-gap);
    padding-top: calc(var(--um-logo-size) + var(--um-header-gap));
    color: var(--um-midnight-blue) !important;
    text-transform: none;
    letter-spacing: 0;
    line-height: 1.15;
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 2.125rem;
    font-weight: 600;
    white-space: normal;
    text-align: center;
}

#kc-locale-select-container.elumiti-locale-select-container {
    width: min(100%, 320px);
    margin: 10px auto 36px;
}

.elumiti-locale-select-wrap {
    position: relative;
}

.elumiti-locale-select-wrap::after {
    content: "";
    position: absolute;
    right: 16px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid #5f6368;
    border-bottom: 2px solid #5f6368;
    transform: translateY(-65%) rotate(45deg);
    pointer-events: none;
}

.elumiti-locale-select {
    width: 100%;
    min-height: 40px;
    border-radius: 999px;
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #3c4043;
    padding: 0 38px 0 14px;
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    transition: border-color 120ms ease, box-shadow 120ms ease;
}

.elumiti-locale-select:hover {
    border-color: #bdc1c6;
}

.elumiti-locale-select:focus,
.elumiti-locale-select:focus-visible {
    outline: none;
    border-color: #1a73e8;
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

#kc-header-wrapper::before,
#kc-header-wrapper::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

#kc-header-wrapper::before {
    top: 0;
    width: var(--um-logo-size);
    height: var(--um-logo-size);
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

#kc-header-wrapper::after {
    top: 0;
    width: var(--um-logo-size);
    height: var(--um-logo-size);
    background: url("../img/app-logo.png") no-repeat center;
    background-size: contain;
}

.pf-v5-c-login__main {
    border-radius: 26px;
    border: 1px solid transparent;
    background:
        linear-gradient(#ffffff, #ffffff) padding-box,
        linear-gradient(
            135deg,
            var(--um-light-sky-blue) 0%,
            rgba(43, 165, 219, 0.35) 100%
        ) border-box;
    box-shadow: 0 8px 18px var(--um-card-shadow);
}

.pf-v5-c-login__main-header {
    border-top: none;
}

#kc-page-title {
    color: var(--um-midnight-blue);
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: 0;
}

.pf-v5-c-login__main-header-desc {
    font-family: "Inter", "Segoe UI", sans-serif;
    color: var(--um-neutral-gray);
}

.pf-v5-c-form__group-label {
    padding-bottom: 6px;
}

.pf-v5-c-form__label-text {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--um-neutral-gray);
}

.pf-v5-c-form-control {
    border-radius: 16px;
    border: 1px solid rgba(43, 165, 219, 0.25);
    background: var(--um-app-background);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.06);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.pf-v5-c-form-control:focus-within {
    border-color: rgba(43, 165, 219, 0.55);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.06);
}

.pf-v5-c-form-control input {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: var(--um-midnight-blue);
}

.pf-v5-c-form-control input::placeholder {
    color: #96a2bf;
}

.pf-v5-c-form-control::before,
.pf-v5-c-form-control::after {
    display: none !important;
}

.pf-v5-c-form-control input,
.pf-v5-c-form-control input:focus,
.pf-v5-c-form-control input:focus-visible {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    background: transparent;
}

.elumiti-password-control {
    position: relative;
    display: block;
    padding-right: 52px;
}

.elumiti-password-control input {
    width: 100%;
}

.pf-v5-c-button.pf-m-control.elumiti-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    min-height: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 10px;
    background: transparent !important;
    color: var(--um-midnight-blue);
    box-shadow: none !important;
    transition: color 120ms ease;
}

.pf-v5-c-button.pf-m-control.elumiti-password-toggle i {
    font-size: 14px;
}

.pf-v5-c-button.pf-m-control.elumiti-password-toggle:hover,
.pf-v5-c-button.pf-m-control.elumiti-password-toggle:focus,
.pf-v5-c-button.pf-m-control.elumiti-password-toggle:focus-visible,
.pf-v5-c-button.pf-m-control.elumiti-password-toggle:active {
    outline: none;
    border: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.pf-v5-c-button.pf-m-control.elumiti-password-toggle::before,
.pf-v5-c-button.pf-m-control.elumiti-password-toggle::after {
    display: none !important;
}

.pf-v5-c-button.pf-m-primary {
    min-height: 54px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: linear-gradient(90deg, var(--um-light-sky-blue) 0%, var(--um-sky-blue) 100%);
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--um-midnight-blue);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.12);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.pf-v5-c-button.pf-m-primary:hover,
.pf-v5-c-button.pf-m-primary:focus {
    transform: translateY(-1px);
    box-shadow: 0 10px 14px rgba(0, 0, 0, 0.14);
}

.pf-v5-c-button.pf-m-primary:active {
    transform: scale(0.98);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.pf-v5-c-button.pf-m-secondary,
.pf-v5-c-button.pf-m-link,
#try-another-way,
#kc-social-providers .pf-v5-c-button {
    min-height: 50px;
    border-radius: 999px;
    border: 1px solid rgba(43, 165, 219, 0.35);
    background: rgba(255, 255, 255, 0.95);
    color: var(--um-midnight-blue);
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 5px 8px rgba(0, 0, 0, 0.08);
}

.pf-v5-c-button.pf-m-secondary:hover,
.pf-v5-c-button.pf-m-secondary:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.1);
}

.pf-v5-c-button.pf-m-link {
    justify-content: center;
    text-decoration: none;
}

#kc-login,
#kc-form-buttons,
#kc-reset-password-form #kc-back-to-login {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.elumiti-btn-icon {
    font-size: 14px;
    line-height: 1;
    flex: 0 0 auto;
}

.pf-v5-c-form__helper-text a,
#kc-registration a,
#try-another-way {
    color: var(--um-sky-blue);
    text-decoration: none;
}

.pf-v5-c-form__helper-text a:hover,
#kc-registration a:hover,
#try-another-way:hover {
    text-decoration: underline;
}

.pf-v5-c-form__helper-text,
.pf-v5-c-helper-text__item-text,
.pf-v5-c-form__helper-text a {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 13px;
}

.pf-v5-c-alert {
    border-radius: 12px;
    border: 0;
    box-shadow: none;
}

.pf-v5-c-alert.pf-m-danger {
    background: rgba(220, 38, 38, 0.12);
}

.pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__title {
    color: #b91c1c;
}

.pf-v5-c-alert.pf-m-success {
    background: rgba(16, 185, 129, 0.12);
}

.pf-v5-c-alert.pf-m-success .pf-v5-c-alert__title {
    color: #047857;
}

#kc-registration-container {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#kc-registration-container::before,
#kc-registration-container::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(43, 165, 219, 0.2);
}

#kc-registration {
    font-family: "Inter", "Segoe UI", sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: var(--um-neutral-gray);
    text-align: center;
    white-space: nowrap;
}

#kc-registration a {
    font-weight: 600;
}

#kc-reset-password-form #kc-back-to-login {
    margin-top: 10px;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    text-decoration: none;
}

#kc-reset-password-form #kc-back-to-login:visited,
#kc-reset-password-form #kc-back-to-login:hover,
#kc-reset-password-form #kc-back-to-login:active {
    color: var(--um-midnight-blue);
    text-decoration: none;
}

.pf-v5-c-login__main-header-utilities .pf-v5-c-form-control {
    border-radius: 12px;
    background: #ffffff;
    box-shadow: none;
}

.pf-v5-c-button.pf-m-control {
    border-radius: 14px;
    color: var(--um-midnight-blue);
}

#kc-recovery-codes-list {
    columns: 2;
}

#certificate_subjectDN {
    overflow-wrap: break-word;
}

#kc-verify-email-form {
    margin-top: 24px;
    margin-bottom: 24px;
}

#kc-code pre code {
    word-break: break-all;
}

.kc-login-tooltip {
    position: relative;
    display: inline-block;
}

.kc-login-tooltip .kc-tooltip-text {
    top: -3px;
    left: 160%;
    background-color: #0f172a;
    visibility: hidden;
    color: #ffffff;
    min-width: 130px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.4);
    padding: 6px;
    position: absolute;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity: 0.9;
}

.kc-login-tooltip .kc-tooltip-text::after {
    content: " ";
    position: absolute;
    top: 15px;
    right: 100%;
    margin-top: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent #0f172a transparent transparent;
}

#kc-social-providers svg {
    height: var(--pf-v5-global--FontSize--xl);
}

#kc-social-providers svg:not(.google) {
    filter: invert(49%) sepia(49%) saturate(1036%) hue-rotate(162deg) brightness(92%) contrast(89%);
}

@media (min-width: 768px) {
    .pf-v5-c-login {
        padding: 28px 22px 34px;
    }

    .pf-v5-c-login__container {
        grid-template-columns: minmax(22rem, 40rem);
        width: min(100%, 40rem);
    }

    .pf-v5-c-login__main-header {
        grid-template-columns: 70% 30%;
    }
}

@media (max-width: 767px) {
    :root {
        --um-logo-size: 56px;
        --um-header-gap: 20px;
    }

    .pf-v5-c-login {
        padding: 16px 12px 20px;
    }

    .pf-v5-c-login__container {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
    }

    #kc-header-wrapper {
        font-size: 1.55rem;
        line-height: 1.2;
        margin-bottom: 18px;
        padding-top: calc(var(--um-logo-size) + 16px);
    }

    #kc-locale-select-container.elumiti-locale-select-container {
        width: min(100%, 320px);
        margin: 8px auto 30px;
    }

    .elumiti-locale-select {
        min-height: 40px;
        font-size: 12.5px;
    }

    .pf-v5-c-login__main {
        border-radius: 20px;
    }

    #kc-page-title {
        font-size: 1.32rem;
        text-align: center;
    }

    .pf-v5-c-form__label-text {
        font-size: 12px;
    }

    .pf-v5-c-form-control {
        border-radius: 14px;
    }

    .elumiti-password-control {
        padding-right: 48px;
    }

    .pf-v5-c-button.pf-m-control.elumiti-password-toggle {
        width: 34px;
        height: 34px;
        right: 6px;
    }

    .pf-v5-c-button.pf-m-primary,
    .pf-v5-c-button.pf-m-secondary,
    .pf-v5-c-button.pf-m-link,
    #try-another-way,
    #kc-social-providers .pf-v5-c-button {
        min-height: 48px;
        font-size: 15px;
    }

    #kc-registration-container {
        gap: 8px;
    }

    #kc-registration {
        white-space: normal;
        text-align: center;
    }

    .login-pf body::after {
        width: 170px;
        height: 170px;
        left: -85px;
        bottom: -120px;
    }
}

@media (max-width: 420px) {
    :root {
        --um-logo-size: 52px;
        --um-header-gap: 16px;
    }

    .pf-v5-c-login {
        padding: 12px 10px 16px;
    }

    #kc-header-wrapper {
        font-size: 1.36rem;
        margin-bottom: 14px;
        padding-top: calc(var(--um-logo-size) + 14px);
    }

    #kc-locale-select-container.elumiti-locale-select-container {
        margin: 6px auto 22px;
    }

    .elumiti-locale-select {
        min-height: 38px;
        padding: 0 34px 0 12px;
        font-size: 12px;
    }

    .pf-v5-c-login__main {
        border-radius: 16px;
    }

    .pf-v5-c-button.pf-m-primary,
    .pf-v5-c-button.pf-m-secondary,
    .pf-v5-c-button.pf-m-link,
    #try-another-way,
    #kc-social-providers .pf-v5-c-button {
        min-height: 46px;
        font-size: 14px;
    }

}

@media (max-height: 820px) {
    .login-pf body::after {
        width: 170px;
        height: 170px;
        bottom: -130px;
    }
}
