/* CSS Variables */
:root {
    --pips-logo-url: url('../img/pips-logo-text.svg');
    --pips-logo-height: 63px;
    --pips-logo-width: 300px;
    --pips-card-top-color: var(--pf-v5-global--palette--blue-400);
}

/* Body styling - exact match to new theme with Inter font */
body, .login-pf body, body.kcBodyClass {
    background-color: #0b0f17;
    background-image: var(--pips-bg-logo-url), linear-gradient(180deg, #0b0f17, #081018);
    background-repeat: no-repeat, no-repeat;
    background-position: center center, center center;
    background-attachment: fixed, fixed;
    background-size: cover, cover;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable both-edges;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    height: 100vh;
    margin: 0px;
    position: relative;
}

/* Light screen overlay only behind login container - configurable intensity */
.pf-v5-c-login__container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, var(--screen-filter-opacity, 0.19));
    border-radius: 2rem;
    z-index: -1;
    pointer-events: none;
}

.pf-v5-c-login__container {
    position: relative;
}

/* Apply Inter font to text elements but exclude Font Awesome icons */
body, input, button, select, textarea, label, span, div, p, h1, h2, h3, h4, h5, h6, a {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Main body text color; this fixes an issue with the glassy these where the text defaults to black (RP: Dean, FX: Bashir) */
.pf-v5-c-login__main-body {
    color: #fff;
}

/* But if we're using the white theme, then we want to keep the text color as black (RP: Dean, FX: Bashir) */
body.theme-white .pf-v5-c-login__main-body {
    color: #000;
}

/* Login page layout - exact match to new theme */
.pf-v5-c-login {
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    height: calc(100vh - 100px);
    padding: 50px;
}

/* Login container - beautiful bright glassmorphic with light screen behind for readability */
.pf-v5-c-login__container {
    border-top: 0;
    border-color: transparent;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    backdrop-filter: saturate(160%) blur(24px);
    -webkit-backdrop-filter: saturate(160%) blur(24px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.28);
    background-clip: padding-box;
    border-radius: 2rem;
    width: 100%;
    max-width: 25rem;
    margin: auto;
    padding: 2rem 2rem 1.5rem;
    grid-template-columns: 1fr;
    grid-template-areas:
        "header"
        "main";
}

/* Reset PatternFly defaults */
.pf-v5-c-login__main {
    background: transparent;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

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

.pf-v5-c-login__main-header {
    margin-bottom: 0;
    padding-bottom: 0;
    min-height: 0;
    height: auto;
}

.pf-v5-c-login__main-body {
    margin-top: 0;
    padding-top: 0;
    padding-bottom: 0;
}

/* Header styling */
#kc-header-wrapper {
    padding: 0px 10px 12px;
    text-align: center;
    color: rgba(255,255,255,0.95);
    margin-bottom: 1rem;
}

/* Logo styling */
.kc-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.kc-logo-img, #realm-logo {
    max-width: 200px;
    height: auto;
    display: block;
    margin: 0 auto;
}

div.kc-logo-text {
    background-image: var(--pips-logo-url);
    height: var(--pips-logo-height);
    width: var(--pips-logo-width);
    background-repeat: no-repeat;
    background-size: contain;
    margin: 0 auto;
}

div.kc-logo-text span {
    display: none;
}

/* Form labels - exact match to kcLabelClass */
label, .pf-v5-c-form__label, .pf-v5-c-form__label-text {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.14rem;
    font-weight: 500;
    display: inline;
    letter-spacing: 0.025em;
}

/* Required field asterisk - inline with label */
.pf-v5-c-form__label {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.pf-v5-c-form__label-required {
    color: #ef4444; /* red-500 */
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
}

/* Required fields text styling */
.subtitle .pf-v5-c-helper-text__item-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 400;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.subtitle .pf-v5-c-form__label-required {
    font-size: 13px;
}

/* Glassmorphic role selection buttons */
.kc-role-button {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: saturate(120%) blur(12px);
    -webkit-backdrop-filter: saturate(120%) blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-clip: padding-box;
    border-radius: 1rem;
    width: 100%;
    max-width: 400px;
    min-width: 280px;
    height: 56px;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 0;
    box-sizing: border-box;
}

.kc-role-button:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.kc-role-button i {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* OTP/Email verification specific styling */
#email-otp, input[name="email-otp"], input[autocomplete="one-time-code"] {
    background: rgba(0, 0, 0, 0.14);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.75rem;
    color: #e5e7eb;
    caret-color: #e5e7eb;
    padding: 0.875rem 0.5rem;
    height: 48px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.1rem;
    font-family: 'Courier New', Courier, monospace;
}

#email-otp:focus, input[name="email-otp"]:focus, input[autocomplete="one-time-code"]:focus {
    border-color: rgba(59, 130, 246, 0.5);
    background-color: rgba(0, 0, 0, 0.40);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
    color: #f3f4f6;
    caret-color: #f3f4f6;
}

/* Input group layout fix for OTP flow */
.pf-v5-c-input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.pf-v5-c-input-group__item.pf-m-fill {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.pf-v5-c-input-group__item {
    display: flex;
    flex-shrink: 0;
}

/* Readonly username field wrapper in OTP flow */
.pf-v5-c-form-control.pf-m-readonly {
    background: rgba(0, 0, 0, 0.14);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.75rem 0 0 0.75rem;
    border-right: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: not-allowed;
    height: 48px;
    padding: 0;
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    position: relative;
}

/* Make the inner input fill the entire wrapper */
.pf-v5-c-form-control.pf-m-readonly input,
#kc-attempted-username {
    background: transparent;
    border: none;
    outline: none;
    padding: 0.875rem 1rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    box-shadow: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: absolute;
    top: 0;
    left: 0;
    cursor: not-allowed;
}

/* Restart login button */
#reset-login.pf-v5-c-button.pf-m-control {
    background: rgba(0, 0, 0, 0.14);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-left: none;
    color: rgba(255, 255, 255, 0.8);
    border-radius: 0 0.75rem 0.75rem 0;
    height: 48px;
    min-width: 48px;
    transition: all 0.2s ease;
}

#reset-login.pf-v5-c-button.pf-m-control:hover {
    background: rgba(0, 0, 0, 0.20);
    border-color: rgba(255, 255, 255, 0.35);
    color: rgba(255, 255, 255, 0.9);
}

/* Hide tooltip text */
.kc-tooltip-text {
    display: none;
}

/* OTP form buttons layout - inline with resend first */
#kc-otp-login-form #kc-form-buttons .pf-v5-c-form__group,
#kc-otp-login-form .pf-v5-c-form__group:has(#kc-form-buttons) {
    display: flex;
    gap: 0.75rem;
    flex-direction: column;
}

#kc-otp-login-form #kc-form-buttons > div,
#kc-otp-login-form .pf-v5-c-form__group:has(#kc-form-buttons) > div > div {
    display: flex;
    gap: 0.75rem;
    flex-direction: row-reverse;
}

#kc-otp-login-form .pf-v5-c-button.pf-m-primary,
#kc-otp-login-form .pf-v5-c-button.pf-m-secondary {
    flex: 1;
    min-width: 0;
}

/* Secondary button styling for resend actions */
.pf-v5-c-button.pf-m-secondary,
button.pf-v5-c-button.pf-m-secondary,
#kc-resend-email {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: saturate(120%) blur(12px);
    -webkit-backdrop-filter: saturate(120%) blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 0.875rem;
    padding: 0.875rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 52px;
}

.pf-v5-c-button.pf-m-secondary:hover,
button.pf-v5-c-button.pf-m-secondary:hover,
#kc-resend-email:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    transform: translateY(-1px);
}

/* Error message styling - simple */
#kc-error-message p,
#kc-info-message p,
.instruction {
    color: rgba(255, 255, 255, 0.85);
}

/* Alert messages */
.pf-v5-c-alert.pf-m-warning .pf-v5-c-alert__title,
.pf-v5-c-alert.pf-m-info .pf-v5-c-alert__title,
.pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__title,
.kc-feedback-text {
    color: rgba(255, 255, 255, 0.9);
}

/* Links in messages and info sections */
#backToApplication,
#kc-error-message a,
#kc-info-message a,
#kc-info a,
.instruction a {
    color: #60a5fa;
    text-decoration: none;
}

#backToApplication:hover,
#kc-error-message a:hover,
#kc-info-message a:hover,
#kc-info a:hover,
.instruction a:hover {
    color: #93c5fd;
}

/* Form groups spacing */
.pf-v5-c-form__group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Last form group should have less spacing */
.pf-v5-c-form__group:last-child {
    margin-bottom: 0.8rem;
}

/* Input fields - exact match to kcInputClass.pf-c-form-control */
.pf-v5-c-form-control input,
input#username,
input#password {
    border-radius: 0.75rem;
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #e5e7eb;
    caret-color: #e5e7eb;
    background-color: rgb(0 0 0 / 15%);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    padding: 0.875rem 1rem;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 48px;
    width: 100%;
    box-sizing: border-box;
}

/* Override default input sizing */
.pf-v5-c-form-control {
    width: 100%;
    position: relative;
    display: block;
}

.pf-v5-c-form-control span {
    display: block;
    width: 100%;
}

/* Input group styling for password field - overlay approach */
.pf-v5-c-input-group {
    position: relative;
    width: 100%;
}

.pf-v5-c-input-group__item.pf-m-fill {
    width: 100%;
}

.pf-v5-c-input-group .pf-v5-c-form-control {
    width: 100%;
}

.pf-v5-c-input-group .pf-v5-c-form-control input {
    border-radius: 0.75rem;
    width: 100%;
    padding-right: 3rem; /* Add space for the button */
}

/* Input focus states - exact match to reference CSS */
.pf-v5-c-form-control input:focus,
input#username:focus,
input#password:focus {
    border-radius: 0.75rem;
    border: 1px solid rgba(59, 130, 246, 0.5);
    color: #f3f4f6;
    caret-color: #f3f4f6;
    background-color: rgb(0 0 0 / 26%);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Focus states for input group password fields - overlay approach */
.pf-v5-c-input-group .pf-v5-c-form-control input:focus {
    border-radius: 0.75rem;
    padding-right: 3rem;
}

/* Placeholder styling - exact match to reference CSS */
.pf-v5-c-form-control input::placeholder,
input#username::placeholder,
input#password::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    font-weight: 400;
    font-size: 14px;
}

/* Specific placeholder styling for username and password */
input#username.pf-v5-c-form-control::placeholder {
    content: 'Enter your username or email';
}

input#password.pf-v5-c-form-control::placeholder {
    content: 'Enter your password';
}

/* Specific username and password field styling */
input#username.pf-v5-c-form-control,
input#password.pf-v5-c-form-control {
    background-color: rgb(0 0 0 / 14%);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 48px;
}

input#username.pf-v5-c-form-control:focus,
input#password.pf-v5-c-form-control:focus {
    background-color: rgba(0, 0, 0, 0.40);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

/* Password visibility button - integrated overlay approach */
.pf-v5-c-button.pf-m-control[data-password-toggle] {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    z-index: 10;
    background: rgb(0 0 0 / 0%);
    backdrop-filter: saturate(140%) blur(12px);
    -webkit-backdrop-filter: saturate(140%) blur(12px);
    border: none;
    border-radius: 0 0.75rem 0.75rem 0;
    box-shadow: none;
    color: rgba(255, 255, 255, 0.7);
    width: 3rem;
    min-width: 3rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.pf-v5-c-button.pf-m-control[data-password-toggle]:hover,
.pf-v5-c-button.pf-m-control[data-password-toggle]:focus {
    background: rgb(0 0 0 / 5%);
    color: rgba(255, 255, 255, 0.9);
    border-left-color: rgba(255, 255, 255, 0.25);
}

.pf-v5-c-button.pf-m-control[data-password-toggle] i,
.pf-v5-c-button.pf-m-control[data-password-toggle] svg,
.pf-v5-c-button.pf-m-control[data-password-toggle] .pf-v5-c-button__icon {
    color: inherit;
    fill: currentColor;
}

/* Primary button styling - exact match to kcButtonClass.pf-c-button.kcButtonPrimaryClass */
.pf-v5-c-button.pf-m-primary,
button[type="submit"]#kc-login {
    background: linear-gradient(135deg, #3c86ef, #3b82f6);
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: 0.875rem;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.025em;
    height: 52px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25), 0 2px 5px rgba(0, 0, 0, 0.16);
    text-transform: none;
    position: relative;
    overflow: hidden;
    width: 100%;
    color: #ffffff;
    cursor: pointer;
}

.pf-v5-c-button.pf-m-primary:hover {
    background: linear-gradient(135deg, #408ff5, #366fde);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.pf-v5-c-button.pf-m-primary:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* Social section styling */
.pf-v5-c-login__main-footer-band {
    text-align: center;
    margin: 1rem 0;
}

.pf-v5-c-login__main-footer-band-item {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin: 0.5rem 0 0.5rem 0;
    color: rgba(255, 255, 255, 0.7);
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-align: center;
}

.pf-v5-c-login__main-footer-band-item::before,
.pf-v5-c-login__main-footer-band-item::after {
    content: '';
    height: 1px;
    width: 60px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
}

/* Responsive adjustments for the divider lines */
@media (max-width: 480px) {
    .pf-v5-c-login__main-footer-band-item::before,
    .pf-v5-c-login__main-footer-band-item::after {
        width: 60px;
    }
    
    .pf-v5-c-login__main-footer-band-item {
        gap: 0.5rem;
        font-size: 13px;
    }
}

/* Remove duplicate lines around divider if PF also renders a rule */
.pf-v5-c-login__main-footer-band { border: 0; }

/* Hide any duplicate "Or sign in with" text that might appear */
.pf-v5-c-login__main-footer-band:not(:first-of-type) {
    display: none;
}

/* Social providers list */
#kc-social-providers {
    margin-top: 1.5rem;
    width: 100%;
}

.kcFormSocialAccountListClass,
#kc-social-providers ul,
#kc-social-providers .pf-v5-c-login__main-body {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    width: 100% !important;
}

/* Single-column layout when configured via SOCIAL_LAYOUT=ROWS */
body.social-layout-rows #kc-social-providers ul,
#kc-social-providers.social-layout-rows ul,
#kc-social-providers ul.social-layout-rows {
    grid-template-columns: 1fr !important;
}

body.social-layout-rows #kc-social-providers li,
#kc-social-providers.social-layout-rows li {
    grid-column: 1 / -1 !important;
}

/* All list items base styling */
#kc-social-providers li {
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* Non-main providers - span both columns to take full width */
#kc-social-providers li:not(.kc-social-main) {
    grid-column: 1 / -1 !important;
}

/* Ensure non-main provider buttons are also centered */
#kc-social-providers li:not(.kc-social-main) a {
    justify-content: center !important;
    width: 100% !important;
}

/* Force all social provider list items to be visible */
#kc-social-providers li[hidden],
#kc-social-providers li[aria-hidden="true"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Force all social provider buttons to be visible */
#kc-social-providers a[hidden],
#kc-social-providers a[aria-hidden="true"],
#kc-social-providers a[style*="display: none"] {
    display: flex;
    visibility: visible;
    opacity: 1;
}

/* Base styling for ALL social buttons */
#kc-social-providers .pf-v5-c-button,
#kc-social-providers a,
a[id*="social-"] {
    border-radius: 1rem;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 14px;
    letter-spacing: 0.01em;
    transition: all 0.2s ease;
    transform: translateY(0);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    text-decoration: none;
    color: #ffffff;
    padding: 0 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    box-sizing: border-box;
}

/* Icon and text side by side for all social buttons - centered */
#social-apple, #social-google, #social-facebook, #social-microsoft {
    flex-direction: row;
    justify-content: center;
    width: 100%;
}

/* Icon styling for social buttons */
#social-apple i, #social-google i, #social-facebook i, #social-microsoft i,
#kc-social-providers i, #kc-social-providers .pf-v5-c-button__icon {
    margin-right: 0;
    margin-bottom: 0;
    margin-top: 0;
    font-size: 18px;
    flex-shrink: 0;
}

/* Text styling for social buttons */
#social-apple span, #social-google span, #social-facebook span, #social-microsoft span,
#kc-social-providers span, .kc-social-provider-name {
    font-size: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.025em;
    line-height: 1.2;
    color: #fff;
    opacity: 1;
}

/* Default glassmorphism styling for non-main providers */
#kc-social-providers a:not(#social-apple):not(#social-google):not(#social-facebook):not(#social-microsoft) {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: saturate(120%) blur(12px);
    -webkit-backdrop-filter: saturate(120%) blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    background-clip: padding-box;
}

/* Default glassmorphism hover for non-main providers */
#kc-social-providers a:not(#social-apple):not(#social-google):not(#social-facebook):not(#social-microsoft):hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
}

.kcFormSocialAccountListButtonClass:hover,
#kc-social-providers .pf-v5-c-button:hover,
#kc-social-providers a[role="button"]:hover,
#social-facebook:hover,
#social-google:hover,
#social-microsoft:hover,
#social-apple:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 6px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.25);
}

#kc-social-providers .pf-v5-c-button:active,
#kc-social-providers a[role="button"]:active,
#social-facebook:active,
#social-google:active,
#social-microsoft:active {
    transform: translateY(0);
    transition-duration: 0.1s;
}

/* Focus states for social buttons */
#kc-social-providers .pf-v5-c-button:focus,
#kc-social-providers a[role="button"]:focus {
    outline: 2px solid rgba(255,255,255,.5);
    border-radius: 1rem;
}

/* Brand-specific styling for main 4 providers */
#social-apple {
    background: #000 !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

#social-apple:hover {
    background: #1a1a1a !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
}

#social-google {
    background: #DB4437 !important;
    border: 1px solid #DB4437 !important;
}

#social-google:hover {
    background: #C53D2F !important;
    border-color: #C53D2F !important;
    transform: translateY(-1px) !important;
}

#social-microsoft {
    background: #107C41 !important; /* Microsoft green */
    border: 1px solid #107C41 !important;
}

#social-microsoft:hover {
    background: #0C5E31 !important;
    border-color: #0C5E31 !important;
    transform: translateY(-1px) !important;
}

#social-facebook {
    background: #1877F2 !important;
    border: 1px solid #1877F2 !important;
}

#social-facebook:hover {
    background: #1463cc !important;
    border-color: #1463cc !important;
    transform: translateY(-1px) !important;
}

/* =============================================================================
   GLASSY SOCIAL BUTTONS MODE
   ============================================================================= */

/* Override brand colors with glassmorphic styling when glassy-socials class is present */
body.glassy-socials #social-apple,
body.glassy-socials #social-google,
body.glassy-socials #social-microsoft,
body.glassy-socials #social-facebook {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)) !important;
    backdrop-filter: saturate(120%) blur(12px) !important;
    -webkit-backdrop-filter: saturate(120%) blur(12px) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

body.glassy-socials #social-apple:hover,
body.glassy-socials #social-google:hover,
body.glassy-socials #social-microsoft:hover,
body.glassy-socials #social-facebook:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08)) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    transform: translateY(-1px) !important;
    color: #ffffff !important;
}

/* Social button icons and text styling - Font Awesome 6 */
#kc-social-providers i,
#kc-social-providers [class*="fa-"],
.kcFormSocialAccountListButtonClass i,
.kcFormSocialAccountListButtonClass [class*="fa-"] {
    font-size: 20px;
    color: #ffffff;
}

/* Password visibility icon */
.pf-v5-c-button[data-password-toggle] i {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* Solid icons should be bold, brands should not be forced bold */
.fa-solid, i.fa-solid { font-weight: 900; }
.fa-brands, i.fa-brands { font-weight: 400; }

/* Force icons and text inside socials to white */
.kc-social-provider-name, 
.kc-social-provider-logo,
.kcFormSocialAccountNameClass,
.pf-v5-u-m-auto {
    color: #fff;
    fill: #fff;
    font-weight: 600;
    letter-spacing: 0.025em;
}

#kc-social-providers .pf-v5-u-m-auto,
#kc-social-providers span,
.kcFormSocialAccountNameClass {
    color: #fff;
    fill: #fff;
    font-weight: 600;
    letter-spacing: 0.025em;
    font-size: 14px;
}

/* Additional text styling */
.kcFormOptionsWrapperClass a, #kc-form-options .checkbox label, .kcFormSocialAccountSectionClass h2 {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0,0,0,.8);
}

/* Remember me and other helper text */
.pf-v5-c-check__label, .pf-v5-c-form__helper-text, .instruction, .helper-text, #rememberMe, #kc-info, #kc-registration span {
    color: rgba(255,255,255,0.9);
    margin-bottom: -2px;
}

/* Forgot password links */
#kc-form-options a, #kc-reset-password a, .forgot-password a, a#kc-reset-password, a#kc-forgot-password { 
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

#kc-form-options a:hover, #kc-reset-password a:hover, .forgot-password a:hover, a#kc-reset-password:hover, a#kc-forgot-password:hover { 
    color: #93c5fd;
    border-bottom-color: rgba(147, 197, 253, 0.5);
}

/* Remember Me checkbox styling - exact match to reference CSS */
.pf-v5-c-check__input,
input[type="checkbox"]#rememberMe {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    margin-right: 0.5rem;
    flex-shrink: 0;
    vertical-align: middle;
    margin-top: -2px;
}

.pf-v5-c-check__input:checked,
input[type="checkbox"]#rememberMe:checked {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.pf-v5-c-check__input:checked::after,
input[type="checkbox"]#rememberMe:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.pf-v5-c-check__input:hover,
input[type="checkbox"]#rememberMe:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
}

.pf-v5-c-check__label,
.pf-v5-c-check {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
    user-select: none;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0px;
}

.pf-v5-c-check__label:hover,
.pf-v5-c-check:hover {
    color: #f3f4f6;
}

/* Forgot password link styling */
.pf-v5-c-helper-text__item-text a {
    font-size: 14px;
    font-weight: 500;
    color: #60a5fa;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.pf-v5-c-helper-text__item-text a:hover {
    color: #93c5fd;
    border-bottom-color: rgba(147, 197, 253, 0.5);
}

/* Form spacing adjustments */
.pf-v5-c-form__group {
    margin-bottom: 1.5rem;
}

.pf-v5-c-helper-text {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Error states for inputs and helper text */
.pf-v5-c-form-control.pf-m-error,
.pf-v5-c-form-control[aria-invalid="true"],
input[aria-invalid="true"],
input.pf-m-error {
    border-color: #ef4444; /* red-500 */
    box-shadow: none;
}

/* Ensure input fields inside error form controls also get red border */
.pf-v5-c-form-control.pf-m-error input,
.pf-v5-c-form-control[aria-invalid="true"] input,
span.pf-v5-c-form-control.pf-m-error input {
    border-color: #ef4444; /* red-500 */
}

.pf-v5-c-form-control__utilities .pf-v5-c-form-control__icon.pf-m-status i,
.pf-v5-c-form-control__utilities .pf-v5-c-form-control__icon.pf-m-status svg {
    color: #ef4444;
}

/* Error icon container styling */
.pf-v5-c-form-control.pf-m-error {
    position: relative;
}

/* Hide error icons and remove extra padding */
.pf-v5-c-form-control__utilities,
.pf-v5-c-form-control__icon.pf-m-status {
    display: none;
}

/* Validation error messages styling */
.pf-v5-c-helper-text__item.pf-m-error .pf-v5-c-helper-text__item-text,
.kc-feedback-text.pf-m-error {
    color: #fca5a5; /* red-300 */
}

/* Error container styling */
#input-error-container-username,
#input-error-container-password,
#input-error-container-password-confirm,
#input-error-container-email,
#input-error-container-firstName,
#input-error-container-lastName,
[id^="input-error-container-"] {
    margin-top: 0.5rem;
}

/* Login form specific error styling */
#input-error-container-username .pf-v5-c-form__helper-text,
#input-error-container-password .pf-v5-c-form__helper-text {
    margin: 0;
    padding: 0;
}

#input-error-container-username .pf-v5-c-helper-text,
#input-error-container-password .pf-v5-c-helper-text {
    margin: 0;
    padding: 0;
    display: block;
}

/* Error message integrated as part of the field */
.pf-v5-c-helper-text__item-text.pf-m-error.kc-feedback-text,
.pf-v5-c-helper-text__item-text.pf-m-error,
span.pf-v5-c-helper-text__item-text.pf-m-error.kc-feedback-text {
    position: relative;
    margin: 0.125rem 0 0 0;
    background: rgba(239, 68, 68, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* List-based error messages (e.g., password validation) */
.pf-v5-c-helper-text__item-text.pf-m-error.kc-feedback-text li {
    color: #fca5a5;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.pf-v5-c-helper-text__item-text.pf-m-error.kc-feedback-text li:last-child {
    margin-bottom: 0;
}

/* Form group label spacing */
.pf-v5-c-form__group-label {
    margin-bottom: 0.5rem;
}

/* Responsive improvements */
@media (max-width: 640px) {
    .pf-v5-c-login {
        padding: 0rem 1rem;
        height: 100vh;
    }
    
    .pf-v5-c-login__container {
        margin: 15px auto;
        border-radius: 2rem;
    }
    
    .pf-v5-c-helper-text {
        flex-direction: row;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 380px) {
    /* on super small screens, being on another line is fine... */
    .pf-v5-c-helper-text {
        flex-direction: column;
    }
}

/* Remove any unwanted spacing or conflicts */
.pf-v5-c-login__main-footer-band:last-child {
    padding-bottom: 0;
}

/* Powered by ParentIDPassport footer styling */
div[style*="display:flex"][style*="justify-content:center"] {
    color: rgba(255, 255, 255, 0.8);
}

div[style*="display:flex"][style*="justify-content:center"] a,
div[style*="display:flex"][style*="justify-content:center"] span {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

div[style*="display:flex"][style*="justify-content:center"] a:hover {
    color: rgba(255, 255, 255, 1);
}

/* Ensure social providers display correctly */
#kc-social-providers {
    display: block;
}

/* Remove extra spacing from PatternFly defaults */
.pf-v5-u-pb-sm {
    padding-bottom: 0;
}

/* List styling for setup pages */
#kc-totp-settings,
.pf-v5-c-list {
    color: rgba(255, 255, 255, 0.9);
    padding-left: 1.5rem;
    margin: 1.5rem 0;
}

#kc-totp-settings li,
.pf-v5-c-list li {
    margin-bottom: 1rem;
    line-height: 1.6;
}

#kc-totp-settings p,
.pf-v5-c-list p {
    color: rgba(255, 255, 255, 0.85);
    margin: 0.5rem 0;
    line-height: 1.5;
}

#kc-totp-supported-apps {
    margin: 0.75rem 0 0.75rem 1.5rem;
    list-style-type: disc;
}

#kc-totp-supported-apps li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

/* QR Code styling */
#kc-totp-secret-qr-code {
    display: block;
    margin: 1rem auto;
    max-width: 200px;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Setup page links */
#mode-manual {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

#mode-manual:hover {
    color: #93c5fd;
}

/* Accessible hidden text utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* General themess */
.pf-v5-c-title {
    font-size: 1.6rem;
    font-weight: 600;
    color: #fff;
}

/* Back button header bar styling */
.kc-header-with-back {
    background: rgba(107, 114, 128, 0.2); /* gray-500/20 */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border-radius: 2rem 2rem 0 0;
    margin: -2rem -2rem 1rem -2rem; /* Extend to card edges */
}

.kc-back-button {
    height: 36px;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 50%;
    transition: all 0.2s ease;
    position: absolute;
    left: 1rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.kc-back-button:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 1);
}

.kc-back-button:active {
    background: rgba(255, 255, 255, 0.15);
}

.kc-back-button i {
    font-size: 18px;
    color: inherit;
}

.kc-header-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    margin: 0;
    text-align: center;
}

.kc-header-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    margin: 0;
    text-align: center;
    margin-top: 2px;
}

/* Adjust logo area when back button is present */
.kc-header-with-back #kc-header-wrapper {
    padding: 0;
    margin-bottom: 0;
}

.kc-header-with-back .kc-logo,
.kc-header-with-back #realm-logo {
    display: none;
}

/* Adjust main content spacing when header has back button */
.kc-page-with-back .pf-v5-c-login__main {
    margin-top: 0;
}

.kc-page-with-back .pf-v5-c-login__main-header {
    margin-bottom: 1rem;
}

.kc-page-with-back .pf-v5-c-login__main-body {
    padding-top: 1.25rem;
}

/* Explainer text above form for back button pages */
.kc-explainer-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Ensure all buttons have proper cursor styles */
.pf-v5-c-button,
button,
input[type="submit"],
input[type="button"],
.kcButtonClass,
a[role="button"],
.kc-social-provider-name,
#kc-form-buttons input,
#kc-form-buttons button {
    cursor: pointer;
}

/* Global alert messages styling */
.pf-v5-c-alert {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04));
    backdrop-filter: saturate(160%) blur(18px);
    -webkit-backdrop-filter: saturate(160%) blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Danger/Error alert styling */
.pf-v5-c-alert.pf-m-danger {
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.06));
    border-color: rgba(239, 68, 68, 0.3);
}

/* Success alert styling */
.pf-v5-c-alert.pf-m-success {
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.12), rgba(34, 197, 94, 0.06));
    border-color: rgba(34, 197, 94, 0.3);
}

/* Warning alert styling */
.pf-v5-c-alert.pf-m-warning {
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.12), rgba(245, 158, 11, 0.06));
    border-color: rgba(245, 158, 11, 0.3);
}

/* Info alert styling */
.pf-v5-c-alert.pf-m-info {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.06));
    border-color: rgba(59, 130, 246, 0.3);
}

/* Alert icon styling */
.pf-v5-c-alert__icon {
    margin-right: 0.75rem;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.pf-v5-c-alert__icon i,
.pf-v5-c-alert__icon svg {
    font-size: 1.25rem;
}

/* Danger alert icon color */
.pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__icon i,
.pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__icon svg {
    color: #fca5a5; /* red-300 */
}

/* Success alert icon color */
.pf-v5-c-alert.pf-m-success .pf-v5-c-alert__icon i,
.pf-v5-c-alert.pf-m-success .pf-v5-c-alert__icon svg {
    color: #86efac; /* green-300 */
}

/* Warning alert icon color */
.pf-v5-c-alert.pf-m-warning .pf-v5-c-alert__icon i,
.pf-v5-c-alert.pf-m-warning .pf-v5-c-alert__icon svg {
    color: #fcd34d; /* yellow-300 */
}

/* Info alert icon color */
.pf-v5-c-alert.pf-m-info .pf-v5-c-alert__icon i,
.pf-v5-c-alert.pf-m-info .pf-v5-c-alert__icon svg {
    color: #93c5fd; /* blue-300 */
}

/* Alert title/message styling */
.pf-v5-c-alert__title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    margin: 0;
}

/* Alert container layout */
.pf-v5-c-alert.pf-m-inline {
    display: flex;
    align-items: flex-start;
}

/* =============================================================================
   WHITE THEME OVERRIDES - MINIMAL COLOR-ONLY CHANGES
   ============================================================================= */

/* Main login container - white theme */
body.theme-white .kcFormCardClass.card-pf,
body.theme-white .card-pf,
body.theme-white .pf-v5-c-login__main-body,
body.theme-white .kcFormCardClass,
body.theme-white .pf-v5-c-login__container {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background-clip: border-box;
}

/* Input fields - ONLY colors for white mode */
body.theme-white .pf-v5-c-form-control,
body.theme-white .pf-v5-c-form-control input,
body.theme-white input.pf-v5-c-form-control,
body.theme-white .kcInputClass,
body.theme-white input#username,
body.theme-white input#password,
body.theme-white input#password-new,
body.theme-white input#password-confirm,
body.theme-white #email-otp,
body.theme-white input[name="email-otp"],
body.theme-white input[autocomplete="one-time-code"],
body.theme-white input[type="password"],
body.theme-white input[type="text"],
body.theme-white input[type="email"] {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: #d1d5db;
    color: #374151;
    caret-color: #374151;
}

body.theme-white .pf-v5-c-form-control:focus,
body.theme-white .pf-v5-c-form-control input:focus,
body.theme-white input.pf-v5-c-form-control:focus,
body.theme-white input#password-new:focus,
body.theme-white input#password-confirm:focus,
body.theme-white #email-otp:focus,
body.theme-white input[name="email-otp"]:focus,
body.theme-white input[autocomplete="one-time-code"]:focus,
body.theme-white input[type="password"]:focus,
body.theme-white input[type="text"]:focus,
body.theme-white input[type="email"]:focus {
    border-color: #3b82f6;
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    color: #111827;
    caret-color: #111827;
}

body.theme-white .pf-v5-c-form-control::placeholder,
body.theme-white input::placeholder,
body.theme-white input#username::placeholder,
body.theme-white input#password::placeholder {
    color: #9ca3af;
    opacity: 1;
}

/* Buttons - white theme colors */
body.theme-white .pf-v5-c-button.pf-m-primary,
body.theme-white .kcButtonClass.pf-v5-c-button.kcButtonPrimaryClass {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: 1px solid #3b82f6;
    color: #ffffff;
}

body.theme-white .pf-v5-c-button.pf-m-secondary,
body.theme-white #kc-resend-email {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #d1d5db;
    color: #374151;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

body.theme-white .pf-v5-c-button.pf-m-secondary:hover,
body.theme-white #kc-resend-email:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
    transform: none;
}

/* Role buttons - white theme */
body.theme-white .kc-role-button {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #d1d5db;
    color: #374151;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

body.theme-white .kc-role-button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #111827;
    transform: none;
}

/* Page titles and main headings - dark text */
body.theme-white .pf-v5-c-title,
body.theme-white #kc-page-title,
body.theme-white .kcLoginMainTitle,
body.theme-white .kc-header-title {
    color: #374151;
}

body.theme-white .kc-header-subtitle {
    color: #6b7280;
}

/* List and content styling - white theme */
body.theme-white #kc-totp-settings,
body.theme-white .pf-v5-c-list {
    color: #374151;
}

body.theme-white #kc-totp-settings p,
body.theme-white .pf-v5-c-list p {
    color: #4b5563;
}

body.theme-white #kc-totp-supported-apps li {
    color: #6b7280;
}

body.theme-white #mode-manual {
    color: #2563eb;
}

body.theme-white #mode-manual:hover {
    color: #1d4ed8;
}

/* Labels and form text */
body.theme-white label,
body.theme-white .pf-v5-c-form__label,
body.theme-white .pf-v5-c-form__label-text {
    color: #374151;
}

/* Alert messages and feedback text - white theme */
body.theme-white .kc-feedback-text,
body.theme-white .pf-v5-c-alert__title {
    color: #374151;
}

/* Alert containers - white theme */
body.theme-white .pf-v5-c-alert {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Danger/Error alert - white theme */
body.theme-white .pf-v5-c-alert.pf-m-danger {
    background: #fef2f2;
    border-color: #fca5a5;
}

body.theme-white .pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__title,
body.theme-white .pf-v5-c-alert.pf-m-danger .kc-feedback-text {
    color: #dc2626;
}

/* Success alert - white theme */
body.theme-white .pf-v5-c-alert.pf-m-success {
    background: #f0fdf4;
    border-color: #86efac;
}

body.theme-white .pf-v5-c-alert.pf-m-success .pf-v5-c-alert__title,
body.theme-white .pf-v5-c-alert.pf-m-success .kc-feedback-text {
    color: #16a34a;
}

/* Warning alert - white theme */
body.theme-white .pf-v5-c-alert.pf-m-warning {
    background: #fffbeb;
    border-color: #fcd34d;
}

body.theme-white .pf-v5-c-alert.pf-m-warning .pf-v5-c-alert__title,
body.theme-white .pf-v5-c-alert.pf-m-warning .kc-feedback-text {
    color: #d97706;
}

/* Info alert - white theme */
body.theme-white .pf-v5-c-alert.pf-m-info {
    background: #eff6ff;
    border-color: #93c5fd;
}

body.theme-white .pf-v5-c-alert.pf-m-info .pf-v5-c-alert__title,
body.theme-white .pf-v5-c-alert.pf-m-info .kc-feedback-text {
    color: #2563eb;
}

/* Field validation error messages - white theme */
body.theme-white .pf-v5-c-helper-text__item-text.pf-m-error,
body.theme-white .pf-v5-c-helper-text__item-text.pf-m-error.kc-feedback-text,
body.theme-white span.pf-v5-c-helper-text__item-text.pf-m-error.kc-feedback-text {
    background: #fef2f2;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    color: #dc2626;
    border: 1px solid #fca5a5;
    font-weight: 600;
}

body.theme-white .pf-v5-c-form-control.pf-m-error input,
body.theme-white .pf-v5-c-form-control[aria-invalid="true"] input,
body.theme-white span.pf-v5-c-form-control.pf-m-error input {
    border-color: #dc2626;
}

/* Readonly form controls - white theme */
body.theme-white .pf-v5-c-form-control.pf-m-readonly {
    background: #f9fafb;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid #d1d5db;
    color: #6b7280;
}

body.theme-white .pf-v5-c-form-control.pf-m-readonly input,
body.theme-white #kc-attempted-username {
    background: transparent;
    color: #6b7280;
    border: none;
}

/* Error message colors - white theme */
body.theme-white #kc-error-message p,
body.theme-white #kc-info-message p,
body.theme-white #kc-error-message .instruction,
body.theme-white #kc-info-message .instruction {
    color: #dc2626;
}

body.theme-white #kc-error-message a,
body.theme-white #kc-info-message a,
body.theme-white #backToApplication {
    color: #2563eb;
}

body.theme-white #kc-error-message a:hover,
body.theme-white #kc-info-message a:hover,
body.theme-white #backToApplication:hover {
    color: #1d4ed8;
}

/* "Or sign in with" section - ONLY colors for white theme */
body.theme-white .kcFormSocialAccountSectionClass h2 {
    color: #6b7280;
}

body.theme-white .kcFormSocialAccountSectionClass h2::before,
body.theme-white .kcFormSocialAccountSectionClass h2::after {
    background: linear-gradient(90deg, transparent, rgba(107, 114, 128, 0.4), transparent);
}

/* Remember me checkbox - ONLY colors for white mode */
body.theme-white #kc-form-options .checkbox input[type="checkbox"],
body.theme-white .pf-v5-c-check__input,
body.theme-white input[type="checkbox"]#rememberMe {
    border-color: #d1d5db;
    background: #ffffff;
    backdrop-filter: none;
}

body.theme-white #kc-form-options .checkbox input[type="checkbox"]:hover,
body.theme-white .pf-v5-c-check__input:hover,
body.theme-white input[type="checkbox"]#rememberMe:hover {
    border-color: #9ca3af;
    background: #f9fafb;
}

body.theme-white #kc-form-options .checkbox label,
body.theme-white .pf-v5-c-check__label,
body.theme-white .pf-v5-c-check {
    color: #6b7280;
}

body.theme-white #kc-form-options .checkbox label:hover,
body.theme-white .pf-v5-c-check__label:hover,
body.theme-white .pf-v5-c-check:hover {
    color: #374151;
}

/* Remember me checkbox checked state - white theme */
body.theme-white #kc-form-options .checkbox input[type="checkbox"]:checked,
body.theme-white .pf-v5-c-check__input:checked,
body.theme-white input[type="checkbox"]#rememberMe:checked {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

body.theme-white #kc-form-options .checkbox input[type="checkbox"]:checked::after,
body.theme-white .pf-v5-c-check__input:checked::after,
body.theme-white input[type="checkbox"]#rememberMe:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Links and helper text */
body.theme-white .kcFormOptionsWrapperClass a {
    color: #3b82f6;
    text-decoration: none;
}

body.theme-white .kcFormOptionsWrapperClass a:hover {
    color: #374151;
}

/* Password toggle button - white theme */
body.theme-white .pf-v5-c-button.pf-m-control[data-password-toggle] {
    background: #f3f4f6;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-left: 1px solid #d1d5db;
    color: #6b7280;
}

body.theme-white .pf-v5-c-button.pf-m-control[data-password-toggle]:hover,
body.theme-white .pf-v5-c-button.pf-m-control[data-password-toggle]:focus {
    background: #e5e7eb;
    border-left-color: #9ca3af;
    color: #374151;
}

/* Footer powered by text and all footer elements */
body.theme-white .pf-v5-c-login__main-footer,
body.theme-white .pf-v5-c-login__main-footer *,
body.theme-white .kcLoginMainFooter,
body.theme-white .kcLoginMainFooter *,
body.theme-white div[style*="display:flex"][style*="justify-content:center"],
body.theme-white div[style*="display:flex"][style*="justify-content:center"] *,
body.theme-white .pf-v5-c-login__main-footer-helpertext,
body.theme-white #kc-form-options .checkbox label,
body.theme-white .kcFormOptionsWrapperClass {
    color: #6b7280;
}

/* Global white text override */
body.theme-white *[style*="color: white"],
body.theme-white *[style*="color:#fff"],
body.theme-white *[style*="color: #ffffff"] {
    color: #6b7280;
}

/* Remove all glassmorphic effects in white mode */
body.theme-white * { 
    backdrop-filter: none; 
    -webkit-backdrop-filter: none; 
}

/* Comprehensive text readability for login container */
body.theme-white .pf-v5-c-login__container *:not(input):not(button):not(a) {
    color: #525151;
}
body.theme-white .pf-v5-c-login__main-footer-band-item::before,
body.theme-white .pf-v5-c-login__main-footer-band-item::after {
    background: linear-gradient(90deg, transparent, rgb(5 5 5 / 25%), transparent);
}

body.theme-white .pf-v5-c-login__container h2,
body.theme-white .pf-v5-c-login__container .subtitle,
body.theme-white .pf-v5-c-login__container .helper-text {
    color: #6b7280;
}

/* Header bar colors - white theme */
body.theme-white .kc-header-with-back {
    background: rgb(252 252 252);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

body.theme-white .kc-back-button {
    color: rgba(0, 0, 0, 0.6);
}

body.theme-white .kc-back-button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: rgba(0, 0, 0, 0.8);
}

body.theme-white .kc-header-title {
    color: #374151;
}

body.theme-white .kc-header-subtitle {
    color: #6b7280;
}

/* List and content styling - white theme */
body.theme-white #kc-totp-settings,
body.theme-white .pf-v5-c-list {
    color: #374151;
}

body.theme-white #kc-totp-settings p,
body.theme-white .pf-v5-c-list p {
    color: #4b5563;
}

body.theme-white #kc-totp-supported-apps li {
    color: #6b7280;
}

body.theme-white #mode-manual {
    color: #2563eb;
}

body.theme-white #mode-manual:hover {
    color: #1d4ed8;
}
