/* Brand colors used below:
 *   #CC0000  brand red (buttons, focus, accents, text on white boxes)
 *   #A80000  brand red, hover
 *   #161616  card background
 *   #2A2A2A  raised surfaces on the card (hovered tile, warning alert)
 */

@font-face {
    font-family: 'Iliad';
    src: url('../fonts/iliad/Iliad-Light.woff2') format('woff2'),
    url('../fonts/iliad/Iliad-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Iliad';
    src: url('../fonts/iliad/Iliad-Regular.woff2') format('woff2'),
    url('../fonts/iliad/Iliad-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Iliad';
    src: url('../fonts/iliad/Iliad-Bold.woff2') format('woff2'),
    url('../fonts/iliad/Iliad-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

.login-pf body {
    position: relative; /* Required for the pseudo-element positioning */
    background: black no-repeat center center fixed;
    background-size: cover;
    height: 100%;
}

label{
    color: white;
}

/* Create a pseudo-element for the background image */
.login-pf body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
                    rgba(0, 0, 0, 0.5), 
                    rgba(0, 0, 0, 0.5)
                ),
                url("../img/image-bg-login.jpg") no-repeat center center fixed;
    background-size: 300%;
    z-index: -1;       /* Places the pseudo-element behind the content */
}

#login-header-image {
    background: url("../img/logo-freepro.svg");
    background-size: contain;
    width: 117px;
    height: 24px;
    margin-bottom: 30px;
}

.identity-providers-parent {
    display: flex;
    gap: 10px;
}

#forgot-password-link {
    margin-top: 20px;
}

#forgot-password-icon {
    background: url("../img/circle-question-mark.png");
    background-size: contain;
    width: 22px;
    height: 22px;
}

#forgot-password-text {
    flex: 1;
    text-align: left;
    font-family: 'Iliad';
    font-size: 15px;
    color: white;
    text-decoration-color: white;
}

.identity-provider-login-icon {
    background: url("../img/free.png");
    background-size: contain;
    width: 22px;
    height: 22px;
}

.identity-provider-login-text {
    flex: 1;
    text-align: left;
    font-family: 'Iliad';
    font-size: 15px;
    color: white;
    text-decoration-color: white;
}

.identity-provider-login-text:hover {
    color: white;
    text-decoration-color: white;
}

/* --- links: white on the dark card instead of PatternFly blue --- */
.login-pf a:not(.pf-c-button),
.login-pf a:not(.pf-c-button):hover,
.login-pf a:not(.pf-c-button):focus {
    color: #ffffff;
    text-decoration-color: #ffffff;
}

div.kc-logo-text {
    width: 198px;
    height: 64px;
    margin-bottom: 20px;
}

.kc-social-section hr {
    margin-bottom: 10px;
    border-color: #EEEEEE26;
}

/* --- text fields: same look on every page (login, OTP, e-mail code, TOTP setup...) ---
 * A field inside an input group (password + show/hide button) is borderless:
 * the group carries the border instead. */
.login-pf-page .pf-c-form-control:not(.pf-c-input-group > *),
.form-group .pf-c-input-group {
    border: 0.79px solid #959CA3;
    border-radius: 6px;
    box-shadow: 0px 2px 2px 0px #00000033;
    color: black;
    background-color: white /* not `background`: keep PatternFly's error icon */;
    transition: border-color 0.2s ease; /* Smooth transition when focus changes */
}

.login-pf-page input.pf-c-form-control:not(.pf-c-input-group > *) {
    height: 43px;
    padding: 10px;
}

.form-group .pf-c-input-group {
    padding: 2px;
}

.pf-c-input-group > .pf-c-form-control {
    border: 1px solid transparent;
    background-color: transparent;
    color: black;
}

.login-pf-page .pf-c-form-control:not(.pf-c-input-group > *):focus,
.pf-c-input-group:focus-within {
    border-color: #CC0000;
}

.login-pf-page .pf-c-form-control[aria-invalid=true]:not(.pf-c-input-group > *),
.pf-c-input-group:has([aria-invalid=true]) {
    border-color: #FF8080;
}

.pf-c-input-group .pf-c-button.pf-m-control{
    border: 1px solid transparent;
}

input:focus-visible {
    outline: none;
}

.kc-realm-name{
    position: relative;
    display: inline-block;
    padding-bottom: 4px;
    font-family: Iliad;
    font-size: 24.42px;
    font-weight: 400;
    line-height: 29.31px;
    letter-spacing: 0.5em;
    text-align: center;
    text-underline-position: from-font;
    text-decoration-skip-ink: none;
}
.kc-realm-name::after {
    content: "";
    position: absolute;
    bottom: 0;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    border-bottom: 1px solid #CC0000;
  }

#kc-page-title{
    font-family: Iliad;
    font-size: 25px;
    font-weight: 400;
    line-height: 28.75px;
    text-align: center;
    text-decoration-skip-ink: none;
    color:white;
}
#kc-page-subtitle {
    font-family: Iliad;
    font-size: 15px;
    font-weight: 400;
    line-height: 20px;
    text-align: center;
    text-decoration-skip-ink: none;
    color:white;
    margin-top: 10px;
    margin-left: 50px;
    margin-right: 50px;
}

/* --- buttons: same shape everywhere --- */
.pf-c-button{
    border-radius: 8px;
}

#kc-form-buttons .pf-c-button{
    padding: 10px 16px 10px 16px;
}

/* --- brand red on every primary button --- */
.pf-c-button.pf-m-primary,
.pf-c-button.pf-m-primary:not(:disabled) {
    background: #CC0000 !important;
    background-color: #CC0000 !important;
    border-color: #CC0000 !important;
    color: #ffffff !important;
    -webkit-appearance: none;
    appearance: none;
}

.pf-c-button.pf-m-primary:hover,
.pf-c-button.pf-m-primary:focus {
    background: #A80000 !important;
    background-color: #A80000 !important;
    border-color: #A80000 !important;
}

/* --- secondary buttons (Cancel, Resend...): outlined, white text --- */
.pf-c-button.btn-default,
.pf-c-button.pf-m-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
    color: #ffffff;
    font-weight: 400;
    text-shadow: none;
}

.pf-c-button.btn-default:hover,
.pf-c-button.btn-default:focus,
.pf-c-button.pf-m-secondary:hover,
.pf-c-button.pf-m-secondary:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: #CC0000;
    color: #ffffff;
}

/* --- labels: same font on every form --- */
.login-pf-page .pf-c-form__label{
    font-family: Iliad;
    font-size: 16px;
    font-weight: 400;
    line-height: 19.2px;
    text-align: left;
    padding-bottom: 12px;
    color: white;
}

.kc-logo-text{
    margin-bottom: 20px;
}

.login-pf-page .pf-c-button:after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    pointer-events: none;
    content: "";
    border: none;
}

.pf-c-button.pf-m-control {
    background: transparent;
    border-color: rgba(230, 230, 230, 0.5);
}

.login-pf-page .login-pf-page-header {
    margin-bottom: 0px;
}

.pf-c-form-control[aria-invalid=true]{
    background-repeat: no-repeat!important;
}

ol#kc-totp-settings {
    margin: 0 0 16px 0;
    padding: 20px 24px;
    background:white;
    border-radius: 8px;
}
form#kc-totp-settings-form .form-group label{
    font-family: Iliad;
    font-size: 16px;
    margin-top: 10px;
}

#instruction1 {
    background: #ffffff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 16px;
    font-family: Iliad;
    font-size: 15px;
    color: #1a1a1a;
    line-height: 1.6;
}

#instruction1 a {
    color: #CC0000;
    font-weight: 700;
    text-decoration: none;
}

.alert-info{
    font-family: Iliad;
}

.alert-info .pf-c-alert__icon{
    color: #CC0000;
}
.login-pf-page{
    overflow: auto;
    height: 100%;
}
.login-pf-page .card-pf{
    border: 1px solid #161616;
    background: #161616;
    border-radius: 12px;
}

code {
    color: #ffffff;
    background-color: #333333;
    padding: 2px 6px;
    border-radius: 6px;
}
/* --- enforce-mfa plugin: MFA method selection screen --- */
/* message above the methods: same look as their descriptions */
#kc-enforce-mfa-intro {
    color: #C3C9D3;
    font-family: Iliad;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 16px;
}

.select-auth-container {
    gap: 12px;
}

.select-auth-box-parent {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.select-auth-box-parent:hover,
.select-auth-box-parent:focus {
    background: #2A2A2A;
    border-color: #CC0000;
}

.select-auth-box-icon-properties {
    color: #CC0000;
}

.select-auth-box-headline {
    color: #ffffff;
    font-family: Iliad;
    font-size: 16px;
    font-weight: 400;
}

.select-auth-box-desc {
    font-family: Iliad;
    font-size: 14px;
    line-height: 1.4;
}

/* --- enforce-mfa plugin: Mobile Authenticator Setup (CONFIGURE_TOTP) --- */

.alert-warning.pf-c-alert {
    background: #2A2A2A;
    border: 1px solid #FF9F40;
    border-left: 4px solid #FF9F40;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px; /* add some space */
    align-items: flex-start;
}

.alert-warning .pf-c-alert__icon {
    color: #FF9F40;
}

.alert-warning .pf-c-alert__title {
    color: #ffffff;
    font-family: Iliad;
    font-size: 15px;
    font-weight: 400;
}

#kc-totp-settings > li {
    margin-bottom: 16px;
    font-family: Iliad;
}

#kc-totp-settings > li:last-child {
    margin-bottom: 0;
}

#kc-totp-settings > li::marker {
    color: #CC0000;
    font-weight: 700;
}

#kc-totp-settings p {
    font-family: Iliad;
    font-size: 15px;
    margin-bottom: 8px;
}

#kc-totp-supported-apps {
    list-style: none;
    padding: 0;
    margin: 0 0 8px 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#kc-totp-supported-apps li {
    background: #F2F3F5;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 14px;
}

#kc-totp-secret-qr-code {
    display: block;
    margin: 10px auto;
    padding: 12px;
    border: 1px solid #E6E6E6;
    border-radius: 8px;
}

#mode-manual {
    color: #CC0000;
    font-family: Iliad;
    font-size: 14px;
}

/* --- form validation error text (low contrast fix) --- */
.pf-c-form__helper-text.pf-m-error {
    color: #FF8080 !important;
    font-family: Iliad;
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
}

/* --- select-auth-box: beat pf-c-title / pf-c-* cascade order, same issue as button --- */
.select-auth-box-headline.pf-c-title {
    color: #ffffff !important;
}

.select-auth-box-desc {
    color: #C3C9D3 !important;
}

.select-auth-box-desc span {
    color: inherit;
}

/* --- delete-credential confirmation page (required-action) --- */
#kc-delete-text {
    color: #ffffff !important;
    font-family: Iliad;
    font-size: 15px;
    margin-bottom: 16px;
}

.form-actions {
    display: flex;
    gap: 12px;
}
