body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overscroll-behavior-x: none;
  height: 100%;
}

a {
    color: #d513c5;
    text-decoration: none;
} 

a:focus, a:hover {
    color: #E339CF;
    text-decoration: underline;
    outline: none;
}

/* Patternfly CSS places a "bg-login.jpg" as the background on this ".login-pf" class.
   This clashes with the "keycloak-bg.png' background defined on the body below.
   Therefore the Patternfly background must be set to none. */
.login-pf {
    background: none;
}

.login-pf body {
    background: none;
    background-color: #FAFEE1;
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    box-sizing: border-box;
}

.login-pf-page{
    min-height: auto;
    display: block;
    width: 100%;
}

textarea.pf-c-form-control {
	height: auto;
}

.pf-c-alert__title {
    font-size: var(--pf-global--FontSize--xs);
}

p.instruction {
    margin: 5px 0;
}

/* Password reveal button: matches the white input it's attached to (no pale tint,
   shares the input's border, square inner edge so the two read as one field). */
.pf-c-button.pf-m-control:not(.kc-social-item) {
    width: 40px;
    padding: 0;
    margin: 0;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-left: none;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    color: #72767b;
}
.pf-c-button.pf-m-control:not(.kc-social-item):hover {
    background-color: #f7f7f7;
    color: #333;
    box-shadow: none;
}

/* Flatten the input's right edge so it joins the reveal button seamlessly. */
.pf-c-input-group input.pf-c-form-control {
    border-radius: 2px 0 0 2px;
}



.pf-c-form__helper-text.pf-m-error{
    display: block;
    color: #FE4D4E;
    margin-top: 5px;
    font-size: 12px;
}

input.pf-c-button{
    outline: none;
    position: relative;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    font-weight: 400;
    white-space: nowrap;
    text-align: center;
    background-image: none;    
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
    user-select: none;
    touch-action: manipulation;
    color: #fff;
    background: #d513c5;
    background-color: #d513c5;
    box-shadow: 0 2px 0 rgba(255, 227, 251, 0.89);
    font-size: 14px;
    height: 32px;
    padding: 0px 15px;
    border-radius: 2px;
}

.pf-c-button.pf-m-primary{
    background: #d513c5;
}

.pf-c-input-group{
    display: flex;
    align-items: stretch;
    position: relative;
    width: 425px;
    max-width: 100%;
}

input.pf-c-button:hover{
    background: #E339CF;
}

/* Hierarchy: social signup is primary (filled magenta). The email-path "Register"
   button is secondary, so render it as a magenta outline that fills on hover. */
#kc-register-form #kc-form-buttons .pf-c-button,
#kc-register-form #kc-form-buttons input.pf-c-button {
    background: #fff;
    background-color: #fff;
    color: #d513c5;
    border: 1px solid #d513c5;
    box-shadow: none;
}
#kc-register-form #kc-form-buttons .pf-c-button:hover,
#kc-register-form #kc-form-buttons input.pf-c-button:hover {
    background: #d513c5;
    background-color: #d513c5;
    color: #fff;
}

h1#kc-page-title {
    margin-top: 10px;
    font-size: 20px;
    text-align: center !important;
    width: 100%;
    border-bottom: 2px solid #D513C5;
    padding-bottom: 20px;
}

#kc-header-wrapper .col-md-10,
.card-pf .col-md-10 {
    text-align: center;
    width: 100%;
    float: none;
}

@media (max-width: 767px) {
    #kc-header-wrapper {
        padding:0px;
    }
}

#kc-locale{
    margin-right: -25px;
}

#kc-locale ul {
    background-color: var(--pf-global--BackgroundColor--100);
    display: none;
    top: 20px;
    min-width: 100px;
    padding: 0;
}

#kc-locale-dropdown{
    display: inline-block; 
    padding: 5px 15px; 
    border: 1px solid #d9d9d9;

}

#kc-locale-dropdown:hover ul {
    display:block;
}



#kc-locale-dropdown button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--pf-global--Color--200);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
}

#kc-locale ul {
    background-color: var(--pf-global--BackgroundColor--100); /* Example using Keycloak's PatternFly variables */
    display: none; /* Hidden by default */
    position: absolute; /* Positions the dropdown relative to its parent */
    top: 23px;
    right: 0px;
    min-width: 150px;
    padding: 0;
    list-style: none; /* Remove bullet points */
    z-index: 100; /* Ensure it appears above other elements */
    /* Other styles for the dropdown list */
    background: #FFF;
    border: 1px solid #d9d9d9;    
}

#kc-locale-dropdown:hover ul {
    display: block; /* Show the list on hover */
}

#kc-locale-dropdown a {
    color: var(--pf-global--Color--200);
    text-align: right;
    font-size: var(--pf-global--FontSize--sm);
    padding: 10px 10px;
    display: block; /* Make the entire link clickable */
    text-decoration: none; /* Remove underline */
    /* Other styles for the links */
    border-bottom: 1px solid #d9d9d9;
}

a#kc-current-locale-link::after {      
    margin-left: var(--pf-global--spacer--xs);
    /* Other styles for the arrow icon */
}

button#kc-current-locale-link::after {    
    margin-left: var(--pf-global--spacer--xs)
}

.login-pf .container {
    padding-top: 40px;
}

.login-pf a:hover {
    color: #0099d3;
}

#kc-logo {
    width: 100%;
}

div.kc-logo-text {
    background-image: url(../img/nuzur_logo.png);
    background-repeat: no-repeat;    
    margin: 0 auto;
    background-size: contain; 
    background-clip: border-box;   
    height: 60px;
    width: 90px;
    display: inline-block;
}

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

#kc-header {
    color: #ededed;
    overflow: visible;
    white-space: nowrap;
    text-align: center;
    margin-bottom: 0px;
}

#kc-header-wrapper {
    font-size: 29px;
    text-transform: uppercase;
    letter-spacing: 3px;        
    white-space: normal;
    padding-bottom: 10px;    
    color:#333;
}

#kc-content {
    width: 100%;
}

#kc-attempted-username {
    font-size: 20px;
    font-family: inherit;
    font-weight: normal;
    padding-right: 10px;
}

#kc-username {
    text-align: center;
    margin-bottom:-10px;
}

#kc-webauthn-settings-form {
    padding-top: 8px;
}

#kc-form-webauthn .select-auth-box-parent {
    pointer-events: none;
}

#kc-form-webauthn .select-auth-box-desc {
    color: var(--pf-global--palette--black-600);
}

#kc-form-webauthn .select-auth-box-headline {
    color: var(--pf-global--Color--300);
}

#kc-form-webauthn .select-auth-box-icon {
    flex: 0 0 3em;
}

#kc-form-webauthn .select-auth-box-icon-properties {
    margin-top: 10px;
    font-size: 1.8em;
}

#kc-form-webauthn .select-auth-box-icon-properties.unknown-transport-class {
    margin-top: 3px;
}

#kc-form-webauthn .pf-l-stack__item {
    margin: -1px 0;
}

#kc-content-wrapper {
    margin-top: 20px;
}

#kc-form-wrapper {
    margin-top: 10px;
}

#kc-info {
    margin: 20px -40px -30px;
}

#kc-info-wrapper {
    font-size: 13px;
    padding: 15px 35px;
    border-top: 1px solid #ddd;
    margin-top: 30px;
}

#kc-form-options span {
    display: block;
}

#kc-form-options .checkbox {
    margin-top: 0;
    color: #72767b;
    accent-color: #d513c5;
}

#kc-form-options .checkbox label {
    font-size: 12px;
    font-weight: normal;
    display: flex;    
    gap: 5px;
    vertical-align: middle;
}

#kc-terms-text {
    margin-bottom: 20px;
}

#kc-registration-terms-text {
    max-height: 100px;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 5px;
}

#kc-registration {
    margin-bottom: 0;
}

/* TOTP */

.subtitle {
    text-align: right;
    margin-top: 30px;
    color: #909090;
    display: none;
}

.required {
    color: var(--pf-global--danger-color--200);
}

ol#kc-totp-settings {
    margin: 0;
    padding-left: 20px;
}

ul#kc-totp-supported-apps {
    margin-bottom: 10px;
}

#kc-totp-secret-qr-code {
    max-width:150px;
    max-height:150px;
}

#kc-totp-secret-key {
    background-color: #fff;
    color: #333333;
    font-size: 16px;
    padding: 10px 0;
}

/* OAuth */

#kc-oauth h3 {
    margin-top: 0;
}

#kc-oauth ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#kc-oauth ul li {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 12px;
    padding: 10px 0;
}

#kc-oauth ul li:first-of-type {
    border-top: 0;
}

#kc-oauth .kc-role {
    display: inline-block;
    width: 50%;
}

/* Code */
#kc-code textarea {
    width: 100%;
    height: 8em;
}

/* Social */
.kc-social-links {
    margin-top: 12px;
    padding: 0;
    list-style: none;
}

.kc-social-links li {
    width: 100%;
    margin-bottom: 10px;
}

.kc-social-provider-logo {
    font-size: 18px;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    float: none;
}

.kc-social-gray {
    color: #3c4043;
}

.kc-social-gray h2 {
    font-size: 1em;
}

/* Social signup is the PRIMARY, dominant action: large brand-magenta buttons. */
.kc-social-heading {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    text-align: center;
    margin: 0 0 16px;
}

a.kc-social-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 18px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: #D513C5 !important;
    background-color: #D513C5 !important;
    border: none;    
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 2px 0 rgba(213, 19, 197, 0.18);
}

.pf-c-button.pf-m-control.kc-social-item {
    color : #fff;
}

.pf-c-button.pf-m-control.kc-social-item:hover {
    color : #fff;
}

a.kc-social-item:hover {
    background: #E339CF !important;
    background-color: #E339CF !important;
    border-color: none;
    box-shadow: 0 2px 6px rgba(213, 19, 197, 0.35);
    color: #fff;
    text-decoration: none;
}

/* Force IdP icons white so they read on the magenta button (overrides kc-social-gray). */
.kc-social-item .kc-social-provider-logo,
.kc-social-item .kc-commonLogoIdP,
.kc-social-item i {
    color: #fff;
}

.kc-social-provider-name {
    position: static;
}

.kc-social-icon-text {
    left: 0;
}

.kc-social-grid {
    display: grid;
    grid-column-gap: 10px;
    grid-row-gap: 5px;
    grid-column-end: span 6;
    --pf-l-grid__item--GridColumnEnd: span 6;
}

.kc-social-grid .kc-social-icon-text {
    left: 0;
}

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

.kc-social-section {
    text-align: center;
}

.kc-social-section hr {
    margin-bottom: 10px;
}

.kc-login-tooltip .kc-tooltip-text{
    top:-3px;
    left:160%;
    background-color: black;
    visibility: hidden;
    color: #fff;

    min-width:130px;
    text-align: center;
    border-radius: 2px;
    box-shadow:0 1px 8px rgba(0,0,0,0.6);
    padding: 5px;

    position: absolute;
    opacity:0;
    transition:opacity 0.5s;
}

/* Show tooltip */
.kc-login-tooltip:hover .kc-tooltip-text {
    visibility: visible;
    opacity:0.7;
}

/* Arrow for tooltip */
.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 black transparent transparent;
}

@media (min-width: 768px) {
    #kc-container-wrapper {
        position: absolute;
        width: 100%;
    }

    .login-pf .container {
        padding-right: 80px;
    }

    #kc-locale {
        position: relative;
        text-align: right;
        z-index: 9999;
    }
}

@media (max-width: 767px) {

    #kc-header {
        padding-left: 15px;
        padding-right: 15px;
        float: none;
        text-align: center;
    }

    #kc-header-wrapper {
        font-size: 16px;
        font-weight: bold;
        padding: 0px;
        color: #72767b;
        letter-spacing: 0;
    }

    div.kc-logo-text {
        margin: 0;
        width: 150px;
        height: 32px;
        background-size: 100%;
    }

    #kc-form {
        float: none;
    }

    #kc-info-wrapper {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background-color: transparent;
    }

    .login-pf .container {
        padding-top: 15px;
        padding-bottom: 15px;
    }

    #kc-locale {
        position: absolute;
        width: 200px;
        top: 20px;
        right: 20px;
        text-align: right;
        z-index: 9999;
    }
}

@media (min-height: 646px) {
    #kc-container-wrapper {
        bottom: 12%;
    }
}

@media (max-height: 645px) {
    #kc-container-wrapper {
        padding-top: 50px;
        top: 20%;
    }
}

div.card-pf{
    background: #FFF;    
    border:none;
    border-radius: 2px;
    padding: 30px 80px;
    padding-bottom: 50px;
    box-shadow: 0 2px 0 rgba(173, 173, 173, 0.284);
}

.card-pf form.form-actions .btn {
    float: right;
    margin-left: 10px;
}

#kc-form-buttons {
    margin-top: 20px;
}

.login-pf-page .login-pf-brand {
    margin-top: 20px;
    max-width: 360px;
    width: 40%;
}

.select-auth-box-arrow{
    display: flex;
    align-items: center;
    margin-right: 2rem;
}

.select-auth-box-icon{
    display: flex;
    flex: 0 0 2em;
    justify-content: center;
    margin-right: 1rem;
    margin-left: 3rem;
}

.select-auth-box-parent{
    border-top: 1px solid var(--pf-global--palette--black-200);
    padding-top: 1rem;
    padding-bottom: 1rem;
    cursor: pointer;
    text-align: left;
    align-items: unset;
    background-color: unset;
    border-right: unset;
    border-bottom: unset;
    border-left: unset;
}

.select-auth-box-parent:hover{
    background-color: #f7f8f8;
}

.select-auth-container {
    padding-bottom: 0px !important;
}

.select-auth-box-headline {
    font-size: var(--pf-global--FontSize--md);
    color: var(--pf-global--primary-color--100);
    font-weight: bold;
}

.select-auth-box-desc {
    font-size: var(--pf-global--FontSize--sm);
}

.select-auth-box-paragraph {
    text-align: center;
    font-size: var(--pf-global--FontSize--md);
    margin-bottom: 5px;
}

.card-pf {
    margin: 0 auto;
    box-shadow: var(--pf-global--BoxShadow--lg);
    padding: 0 20px;
    max-width: 500px;
    border-top: 4px solid;
    border-color: var(--pf-global--primary-color--100);
    overflow: visible;
}

.g-recaptcha {
    transform-origin: left top;
    margin-bottom: 8px;
}

/* Keep the floating invisible-reCAPTCHA badge above everything so it isn't clipped. */
.grecaptcha-badge {
    z-index: 2147483647 !important;
}

@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.85);
    }
}

/*phone*/
@media (max-width: 768px) {
    .login-pf-page .card-pf {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding: 20px 20px;
        border-top: 0;
        box-shadow: 0 0;
    }

    div.card-pf {
        padding: 20px 20px;
    }

    .kc-social-grid {
        grid-column-end: 12;
        --pf-l-grid__item--GridColumnEnd: span 12;
    }

    .kc-social-grid .kc-social-icon-text {
        left: -15px;
    }

    input.pf-c-form-control {
        width: 100%;
        box-sizing: border-box;
    }

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

    .form-group.login-pf-settings {
        width: 100%;
    }
}

.login-pf-page .login-pf-signup {
    font-size: 15px;
    color: #72767b;
}
#kc-content-wrapper .row {
    margin-left: 0;
    margin-right: 0;
}

.login-pf-page.login-pf-page-accounts {
    margin-left: auto;
    margin-right: auto;
}

.login-pf-page .btn-primary {
    margin-top: 0;
}

.login-pf-page .list-view-pf .list-group-item {
    border-bottom: 1px solid #ededed;
}

.login-pf-page .list-view-pf-description {
    width: 100%;
}

#kc-form-login div.form-group:last-of-type,
#kc-register-form div.form-group:last-of-type,
#kc-update-profile-form div.form-group:last-of-type,
#kc-update-email-form div.form-group:last-of-type{
    margin-bottom: 0px;
}

.no-bottom-margin {
    margin-bottom: 0;
}

#kc-back {
    margin-top: 5px;
}

/* Recovery codes */
.kc-recovery-codes-warning {
    margin-bottom: 32px;
}
.kc-recovery-codes-warning .pf-c-alert__description p {
    font-size: 0.875rem;
}
.kc-recovery-codes-list {
    list-style: none;
    columns: 2;
    margin: 16px 0;
    padding: 16px 16px 8px 16px;
    border: 1px solid #D2D2D2;
}
.kc-recovery-codes-list li {
    margin-bottom: 8px;
    font-size: 11px;
}
.kc-recovery-codes-list li span {
    color: #6A6E73;
    width: 16px;
    text-align: right;
    display: inline-block;
    margin-right: 1px;
}

.kc-recovery-codes-actions {
    margin-bottom: 24px;
}
.kc-recovery-codes-actions button {
    padding-left: 0;
}
.kc-recovery-codes-actions button i {
    margin-right: 8px;
}

.kc-recovery-codes-confirmation {
    align-items: baseline;
    margin-bottom: 16px;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}
/* End Recovery codes */

label.pf-c-form__label{
    display: inline-block;
    padding: 5px 0px;    
}

input.pf-c-form-control{
    width: 420px;
    max-width: 100%;
    font-size: inherit;
    border: none;
    border-radius: 0;
    outline: none;
    background: transparent;
    color: inherit;    
    list-style: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    position: relative;
    display: inline-block;        
    border-radius: 2px;
    transition: all 0.2s;
    background: #fff;
    border-width: 1px;
    border-style: solid;
    border-color: #d9d9d9;
    padding: 5px;
    line-height: 1.5;
    background-image: none;
}


input.pf-c-form-control[aria-invalid="true"]{
    border-color: #FE4D4E;
    background-image: none;
}

/* Kill the pale-yellow Chrome/Safari autofill tint; keep our white field + dark text. */
input.pf-c-form-control:-webkit-autofill,
input.pf-c-form-control:-webkit-autofill:hover,
input.pf-c-form-control:-webkit-autofill:focus,
input.pf-c-form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: #333 !important;
    caret-color: #333;
    transition: background-color 5000s ease-in-out 0s;
}

/* Hide first/last name on registration. They're set optional in the user profile,
   but Keycloak still renders them; we drop them entirely for low-friction signup.
   (Safe because they're not required — empty values submit fine.)
   Belt-and-suspenders: hide the whole group via :has where supported, and the
   label/input directly as a fallback for browsers/markup where :has doesn't match. */
#kc-register-form .form-group:has(#firstName),
#kc-register-form .form-group:has(#lastName),
#kc-register-form .pf-c-form__group:has(#firstName),
#kc-register-form .pf-c-form__group:has(#lastName) {
    display: none !important;
}

#kc-register-form #firstName,
#kc-register-form #lastName,
#kc-register-form label[for="firstName"],
#kc-register-form label[for="lastName"] {
    display: none !important;
}

/* "or sign up with email" disclosure — secondary path, understated. */
.kc-email-disclosure {
    margin-top: 18px;
}

.kc-email-disclosure > .kc-email-disclosure-summary {
    list-style: none;
    cursor: pointer;
    color: #72767b;
    font-size: 18px;
    font-weight: 600;
    padding: 12px 0;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.kc-email-disclosure > .kc-email-disclosure-summary::-webkit-details-marker {
    display: none;
}

.kc-email-disclosure > .kc-email-disclosure-summary:hover {
    color: #D513C5;
    text-decoration: underline;
}

.kc-email-disclosure[open] > .kc-email-disclosure-summary {
    margin-bottom: 8px;
}

#kc-social-providers + .kc-email-disclosure > .kc-email-disclosure-summary::before,
#kc-social-providers + .kc-email-disclosure > .kc-email-disclosure-summary::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e0e0d4;
}

.form-group.login-pf-settings{
    display: block;
    padding-top: 0px;
    margin-bottom: 15px;
    font-size: 12px;
    width: 424px;
    max-width: 100%;
}

.form-group.login-pf-settings #kc-form-options {
    float: right;    
    display: inline-block;
}

#kc-form-options a {
    display: inline-block;
    font-size: 12px;
    float:right;
}

.form-group.login-pf-settings a:hover {
    color: #E339CF;
}

.login-pf-page .login-pf-signup a:hover {
    color: #E339CF;
}

@media (max-width: 768px) {
    .login-pf-page .card-pf {
        max-width: 94%;
        margin-left: auto;
        margin-right: auto;
        position: static;
    }
}

#kc-locale-wrapper {
    padding-right:10px;
}