/* Fonts */
@font-face {
    font-family: 'DM Sans';
    src: url('DMSans-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Urbanist';
    src: url('Urbanist-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Base */
:root {
    --pf-v5-global--link--Color: #015258;
    --pf-v5-global--link--Color--hover: #01333A;
    --pf-v5-global--link--TextDecoration: none;
    --pf-v5-global--link--TextDecoration--hover: underline;
}

a {
    color: var(--pf-v5-global--link--Color);
    text-decoration: var(--pf-v5-global--link--TextDecoration);
    font-weight: normal;
}

a:hover {
    color: var(--pf-v5-global--link--Color--hover);
    text-decoration: var(--pf-v5-global--link--TextDecoration--hover);
}

html, body {
    font-family: 'DM Sans', sans-serif;
    min-height: 100vh;
    background-image: url('../img/background.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6, .pf-v5-c-title {
    font-family: 'Urbanist', sans-serif;
}

/* Page layout */
.pf-v5-c-login {
    align-items: start;
    align-content: start;
}

.pf-v5-c-login__container {
    grid-template-columns: min(500px, 100%);
    grid-template-areas: "header" "main";
}

/* Logo */
#kc-header {
    margin-bottom: 40px;
}

#kc-header-wrapper {
    font-size: 0;
    background-image: url('../img/logo.svg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 200px;
    height: 40px;
    margin: 0 auto;
}

/* Form box */
.pf-v5-c-login__main {
    --pf-v5-c-login__main--BoxShadow: 2px 2px 8px rgba(0, 0, 0, 0.15);
    --sectigo-body-padding: clamp(20px, 5vw, 40px);
    position: relative;
    overflow: visible;
    border-radius: 6px;
}

/* Page header */
.pf-v5-c-login__main-header {
    padding: 30px var(--sectigo-body-padding) 0;
}

.pf-v5-c-login__main-header .pf-v5-c-title {
    font-size: 20px;
    font-weight: 700;
}

/* Form body */
.pf-v5-c-login__main-body {
    padding: 20px var(--sectigo-body-padding) var(--sectigo-body-padding);
}

/* Text inputs */
[data-password-toggle] {
    display: none;
}

.pf-v5-c-form-control::before,
.pf-v5-c-form-control::after {
    border: none;
}

.pf-v5-c-form-control input[type="text"],
.pf-v5-c-form-control input[type="email"],
.pf-v5-c-form-control input[type="password"],
.pf-v5-c-form-control input[type="tel"],
.pf-v5-c-form-control input[type="number"],
.pf-v5-c-form-control input:not([type]) {
    height: 40px;
    border: 1px solid #D6D6D6;
    border-radius: 6px;
    background: #fff;
    font-family: 'Urbanist', sans-serif;
    font-size: 16px;
    padding: 0 12px;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.pf-v5-c-form-control input[type="text"]:focus,
.pf-v5-c-form-control input[type="email"]:focus,
.pf-v5-c-form-control input[type="password"]:focus,
.pf-v5-c-form-control input[type="tel"]:focus,
.pf-v5-c-form-control input[type="number"]:focus,
.pf-v5-c-form-control input:not([type]):focus {
    border-color: #01333A;
}

/* Primary buttons */
.pf-v5-c-button.pf-m-primary {
    --pf-v5-c-button--after--BorderWidth: 0;
    height: 50px;
    border: none;
    border-radius: 1280px;
    background: #015258;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.pf-v5-c-button.pf-m-primary:hover {
    background: #01333A;
    color: #ffffff;
}

.pf-v5-c-button.pf-m-primary:focus-visible {
    outline: 2px solid #015258;
    outline-offset: 2px;
    background: #015258;
    color: #ffffff;
}

.pf-v5-c-button.pf-m-primary:active {
    background: #012b30;
    color: #ffffff;
}

/* Secondary buttons */
.pf-v5-c-button.pf-m-secondary, #cancelTOTPBtn {
    --pf-v5-c-button--after--BorderWidth: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    border: 1px solid #014149;
    border-radius: 1280px;
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #014149;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.pf-v5-c-button.pf-m-secondary:hover, #cancelTOTPBtn:hover {
    background: rgba(1, 65, 73, 0.06);
    color: #014149;
}

.pf-v5-c-button.pf-m-secondary:focus-visible, #cancelTOTPBtn:focus-visible {
    outline: 2px solid #014149;
    outline-offset: 2px;
    color: #014149;
}

.pf-v5-c-button.pf-m-secondary:active, #cancelTOTPBtn:active {
    background: rgba(1, 65, 73, 0.12);
    color: #014149;
}

/* Control button */
.pf-v5-c-button.pf-m-control:hover, .pf-v5-c-button.pf-m-control:focus {
    --pf-v5-c-button--m-control--after--BorderBottomColor: #015258;
}

/* Accounts list */
#accounts-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.account-card,
.account-other {
    display: flex;
    align-items: center;
    height: 65px;
    border-bottom: 1px solid #ededed;
}

.account-card > button:first-child,
.account-other > button {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    font-size: inherit;
    color: inherit;
}

.account-card > button:first-child:hover,
.account-other > button:hover {
    background: #f5f5f5;
    border-radius: 4px;
}

.account-avatar {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    user-select: none;
    background-color: #041c2c;
}

.account-avatar-0 { background-color: #802F0D; }
.account-avatar-1 { background-color: #014850; }
.account-avatar-2 { background-color: #5E3681; }
.account-avatar-3 { background-color: #7C6E13; }
.account-avatar-4 { background-color: #120887; }
.account-avatar-5 { background-color: #416440; }

.account-info {
    display: flex;
    flex-direction: column;
    padding-left: 16px;
    overflow: hidden;
    margin-right: 8px;
}

.account-name {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-email {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.account-remove {
    flex-shrink: 0;
    align-self: flex-start;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.5;
    font-size: 16px;
    color: inherit;
    line-height: 1;
}

.account-remove:hover {
    opacity: 1;
    color: #a30016;
}

.account-other > button {
    gap: 0;
    padding: 0;
    font-size: 15px;
    font-weight: 500;
}

.account-other > button > span:first-child {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.account-other .use-other {
    padding-left: 16px;
}

/* Social login button */
#kc-social-providers ul {
    list-style: none;
    margin: 0;
    padding: 0 !important;
}

#kc-social-providers li {
    padding-bottom: 0 !important;
}

#kc-social-providers .pf-v5-c-button {
    --pf-v5-c-button--m-secondary--after--BorderColor: #D6D6D6;
    --pf-v5-c-button--m-secondary--hover--after--BorderColor: #D6D6D6;
    --pf-v5-c-button--m-secondary--focus--after--BorderColor: #D6D6D6;
    --pf-v5-c-button--m-secondary--active--after--BorderColor: #D6D6D6;
    --pf-v5-c-button--after--BorderWidth: var(--pf-v5-global--BorderWidth--sm);
    --pf-v5-c-button--hover--after--BorderWidth: var(--pf-v5-global--BorderWidth--sm);
    --pf-v5-c-button--focus--after--BorderWidth: var(--pf-v5-global--BorderWidth--sm);
    --pf-v5-c-button--after--BorderRadius: 6px;
    --pf-v5-c-button--m-secondary--Color: #333132;
    --pf-v5-c-button--m-secondary--hover--Color: #333132;
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    gap: 12px;
    width: 100%;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    background: #fff;
    color: #333132;
    font-size: 20px;
    font-weight: normal;
    font-family: 'Urbanist', sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
}

#kc-social-providers .pf-v5-c-button:hover {
    background: #f8fafc;
}

#kc-social-providers .pf-v5-c-button svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

#kc-social-providers .pf-v5-c-button .pf-v5-u-m-auto {
    margin: 0 !important;
}

/* Or sign in with separator */
.pf-v5-c-login__main-footer-band {
    border: none;
}

.pf-v5-c-login__main-footer-band:not(#kc-info) {
    position: relative;
    text-align: center;
    margin: 20px 0;
    padding: 0px;
}

.pf-v5-c-login__main-footer-band:not(#kc-info)::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid #D6D6D6;
}

.pf-v5-c-login__main-footer-band:not(#kc-info) .pf-v5-c-login__main-footer-band-item {
    background: #fff;
    padding: 0 10px;
    font-size: 14px !important;
    color: #737373 !important;
    position: relative;
    z-index: 1;
}

/* Footer band */
#kc-info {
    border: none;
    margin: 0;
    padding: 0;
}

#kc-info-wrapper {
    padding: 0;
}

#kc-registration-container {
    margin: var(--pf-v5-global--spacer--lg, 1.5rem)
            calc(-1 * var(--sectigo-body-padding))
            calc(-1 * var(--sectigo-body-padding));
    padding: 30px var(--sectigo-body-padding);
    background: var(--pf-v5-global--palette--black-150, #F8F7F2);
    border-radius: 0 0 6px 6px;
    font-size: 14px;
}

#kc-registration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #333132;
}

#kc-registration form {
    display: contents;
}

#kc-registration form button {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #014149;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    text-decoration: none;
}

#kc-registration span a {
    display: inline-flex;
    align-items: center;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: #014149;
    font-family: inherit;
    font-size: inherit;
    font-weight: 600;
    text-decoration: none;
}

#kc-registration form button:hover {
    color: #014149;
}

#kc-registration span a:hover {
    color: #014149;
    text-decoration: none;
}

#kc-registration a i {
    font-size: 18px;
}

#kc-register-form .pf-v5-c-login__main-footer-band {
    margin: 0px;
}

[data-page-id="login-login-verify-email"] #kc-info .instruction,
[data-page-id="login-login-reset-password"] #kc-info span {
    margin: var(--pf-v5-global--spacer--lg, 1.5rem)
            calc(-1 * var(--sectigo-body-padding))
            calc(-1 * var(--sectigo-body-padding));
    padding: 10px var(--sectigo-body-padding);
    background: var(--pf-v5-global--palette--black-150, #F8F7F2);
    border-radius: 0 0 6px 6px;
    font-size: 14px;
}

[data-page-id="login-login-reset-password"] #kc-info span {
    display: block;
}

/* Back link */
.login-form-back {
    text-align: right;
    margin: 8px 0 10px;
}

.login-form-back a {
    font-size: 14px;
    display: inline-flex;
}

.login-form-back a:hover {
    text-decoration: none;
}

.login-form-back a i.pficon {
    color: var(--pf-v5-global--link--Color);
    font-size: 18px;
    padding: 1px 8px 0 6px;
    vertical-align: baseline;
}

/* Alerts */
.pf-v5-c-alert.pf-m-inline {
    --pf-v5-c-alert__icon--MarginRight: 8px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 16px;
}

.pf-v5-c-alert__title {
    font-weight: normal;
}

.pf-v5-c-alert__icon {
    display: inline;
}

.pf-v5-c-alert.pf-m-warning {
    --pf-v5-c-alert--m-warning__icon--Color: #EAC435;
    --pf-v5-c-alert--m-inline--BackgroundColor: #FFF4D6;
    --pf-v5-c-alert--m-warning__title--Color: #333132;
    border: 1px solid #EAC435;
}

.pf-v5-c-alert.pf-m-info {
    --pf-v5-c-alert__icon--Color: #059E8E;
    --pf-v5-c-alert--m-inline--BackgroundColor: #E6FAF7;
    --pf-v5-c-alert--m-warning__title--Color: #333132;
    border: 1px solid #059E8E;
}

/* Footer links below the white form box */
.pf-v5-c-login__main > .pf-v5-c-login__main-footer:last-child {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
}

#kc-footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 25px 0 16px;
}

#kc-footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 12px;
}

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

/* Form elements */
.pf-v5-c-form__label-text {
    font-weight: 500;
    color: #333132;
}

[data-page-id="login-register"] .pf-v5-c-form__label-required,
[data-page-id="login-register"] .pf-v5-u-mb-md-on-md:has(.subtitle) {
    display: none;
}

[data-page-id="login-register"] .pf-v5-c-login__main-body {
    padding-top: clamp(10px, 2vw, 16px);
    padding-bottom: clamp(10px, 2vw, 20px);
}

[data-page-id="login-register"] .pf-v5-c-form {
    gap: clamp(8px, 1.5vw, 10px);
}

/* Login page */
#kc-form-login .pf-v5-c-form__helper-text {
    justify-items: flex-end;
}

#kc-form-login .pf-v5-c-helper-text__item-text a {
    font-size: 12px;
    color: #015258;
}

#kc-form-login .pf-v5-c-helper-text__item-text a:hover {
    text-decoration: none;
    color: #015258;
}

#form-buttons-webauthn > div {
    border-bottom: 1px solid #D6D6D6;
    text-align: center;
    height: 15px;
    margin-bottom: 28px;
    margin-top: 20px;
}

#form-buttons-webauthn > div > span {
    background: #fff;
    padding: 0 5px;
    font-size: 14px;
    color: #737373;
}

/* Password change */
#kc-passwd-update-form .pf-v5-c-form__actions {
    flex-direction: column;
}

/* TOTP */
[data-page-id="login-login-config-totp"] #kc-header {
    margin-bottom: 20px;
    margin-top: 10px;
}

[data-page-id="login-login-config-totp"] .pf-v5-c-login__main-header {
    padding-top: 16px;
}

[data-page-id="login-login-config-totp"] .pf-v5-c-login__main-body {
    padding-top: 12px;
    padding-bottom: 16px;
}

[data-page-id="login-login-config-totp"] #kc-totp-settings.pf-v5-c-list {
    --pf-v5-global--spacer--md: 8px;
}

[data-page-id="login-login-config-totp"] #kc-totp-settings p {
    margin: 0 0 0.2rem;
}

#kc-totp-settings-form .pf-v5-c-form__actions {
    flex-direction: column;
    margin-left: 0;
    margin-right: 0;
}

#kc-totp-settings-form .pf-v5-c-form__actions > * {
    margin-left: 0;
    margin-right: 0;
}

#kc-totp-settings-form {
    gap: 10px;
}

#kc-totp-supported-apps {
    --pf-v5-c-list--nested--MarginTop: 0px;
    list-style: inside;
    line-height: 20px;
}

[data-page-id="login-login-config-totp"] ul li {
    --pf-v5-c-list--li--MarginTop: 0px;
}

[data-page-id="login-login-config-totp"] .pf-v5-c-form__group.pf-m-action {
  --pf-v5-c-form__group--m-action--MarginTop: 0px;
}

#kc-totp-secret-qr-code {
    display: block;
    margin: 0 auto;
    position: relative;
    left: -0.75rem;
}

/* Select OTP */
#kc-otp-login-form .pf-v5-c-form__group > div {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

#kc-otp-login-form .pf-v5-c-tile {
    padding: 16px;
}

#kc-otp-login-form .pf-v5-c-tile::before {
    --pf-v5-c-tile--before--BorderColor: #D6D6D6;
    border-radius: 6px;
}

#kc-otp-login-form .pf-v5-c-tile:hover {
    --pf-v5-c-tile__title--Color: #059E8E;
    --pf-v5-c-tile__icon--Color: #059E8E;
    --pf-v5-c-tile--after--BackgroundColor: #015258;
}
