/* Match the NCX application onboarding palette and Prism background. */
html.login-pf {
    min-height: 100%;
    background: #08000d !important;
}

.login-pf body.default-template-in-place {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    margin: 0;
    background: #08000d;
    color: #fbf9ff;
    color-scheme: dark;
    overflow-x: hidden;
    isolation: isolate;
}

.ncx-login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 15%, #32134466, transparent 65%), #08000d;
}

.ncx-login-background canvas {
    display: block;
    width: 100%;
    height: 100%;
    opacity: .16;
    mask-image: linear-gradient(90deg, transparent, #000 55%);
}

.ncx-login-background[data-ready="false"] canvas { opacity: 0; }

.default-template-in-place #default-template {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 40px 24px;
}

.default-template-in-place .login-pf-page { width: 100%; }

.default-template-in-place .login-pf-page .card-pf {
    box-sizing: border-box;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 28px 40px 32px;
    border: 1px solid #594069;
    border-radius: 16px;
    background: linear-gradient(125deg, #20102ebd, #100818a6);
    backdrop-filter: blur(18px);
    box-shadow: 0 16px 60px #00000026;
    animation: ncx-card-enter 420ms cubic-bezier(.22, 1, .36, 1) backwards;
    color: #fbf9ff;
}

.default-template-in-place #kc-page-title,
.default-template-in-place #kc-attempted-username {
    margin-top: 8px;
    color: #fbf9ff;
    font-size: 28px;
    line-height: 1.35;
    letter-spacing: -.8px;
}

.default-template-in-place #kc-page-subtitle {
    display: block;
    margin: 0;
    color: #b9adc4;
    font-weight: 400;
    line-height: 1.7;
}

.default-template-in-place .login-right {
    float: none;
    width: 100%;
    padding: 0;
}

.default-template-in-place input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    background: #100818 !important;
    border-color: #594069 !important;
    color: #fbf9ff !important;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.default-template-in-place input::placeholder { color: #b9adc4 !important; }

.default-template-in-place input:focus {
    border-color: #bc82fc !important;
    --tw-ring-color: #bc82fc !important;
}

.default-template-in-place .material-textfield {
    position: relative;
    margin-bottom: 24px;
}

.default-template-in-place .material-textfield label {
    position: absolute;
    top: 27px;
    left: 12px;
    margin: 0;
    padding: 0 5px;
    transform: translateY(-50%);
    background: #100818;
    color: #b9adc4;
    font-size: 14px;
    font-weight: 400;
    pointer-events: none;
    transition: top 160ms ease, font-size 160ms ease, color 160ms ease;
}

.default-template-in-place .material-textfield input:focus + label,
.default-template-in-place .material-textfield input:not(:placeholder-shown) + label {
    top: 0;
    font-size: 12px;
}

.default-template-in-place .material-textfield input[type="password"] { padding-right: 40px !important; }
.default-template-in-place .material-textfield input:focus + label { color: #bc82fc; }

.default-template-in-place .kc-social-item {
    border: 1px solid #594069;
    border-radius: 9px;
    background: #100818a6;
    color: #e4d3f3;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.default-template-in-place .kc-social-item:hover {
    border-color: #bc82fc;
    background: #24162f;
}

.default-template-in-place #kc-social-providers a[id^="social-"] {
    display: flex;
    padding-inline: 16px;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.default-template-in-place #kc-social-providers a[id^="social-"] .kc-social-provider-logo {
    position: static;
    flex: 0 0 22px;
    margin: 0;
    transform: none;
}

.default-template-in-place #kc-social-providers a[id^="social-"] .kc-social-provider-name {
    position: static;
    margin: 0;
    transform: none;
    text-align: center;
}

.default-template-in-place .kc-social-item svg.ncx-provider-icon {
    width: 22px;
    height: 22px;
    stroke: none;
    color: #e4d3f3;
}

.default-template-in-place .kc-social-item.pf-m-primary svg.kc-social-provider-logo {
    stroke: currentColor;
    color: inherit;
}

.default-template-in-place .kc-social-item.pf-m-primary .kc-social-icon-text {
    color: inherit;
}

.default-template-in-place .password-tooltip {
    display: none;
    position: absolute;
    z-index: 1000;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 12px 16px;
    border: 1px solid #594069;
    border-radius: 9px;
    background: #100818;
    color: #b9adc4;
    font-size: 12px;
    line-height: 1.7;
    box-shadow: 0 12px 32px #00000066;
}

.default-template-in-place .password-tooltip::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 24px;
    width: 12px;
    height: 12px;
    border-top: 1px solid #594069;
    border-left: 1px solid #594069;
    background: #100818;
    transform: rotate(45deg);
}

@media (min-width: 1000px) {
    .default-template-in-place .password-tooltip {
        top: 0;
        left: calc(100% + 12px);
        width: 250px;
    }

    .default-template-in-place .password-tooltip::before {
        top: 20px;
        left: -7px;
        border-top: 0;
        border-bottom: 1px solid #594069;
    }
}

.default-template-in-place .password-tooltip ul {
    list-style: disc;
    padding-left: 16px;
    margin: 0;
}

.default-template-in-place .password-tooltip .validated { color: #9affae; }

.default-template-in-place .ncx-recaptcha-field { margin: 0 0 8px; }

.default-template-in-place .ncx-recaptcha-frame {
    display: flex;
    justify-content: center;
    justify-content: safe center;
    width: 100%;
    padding: 12px 0;
    border: 1px solid #594069;
    border-radius: 9px;
    background: #100818a6;
    overflow-x: auto;
}

.default-template-in-place .g-recaptcha { flex: 0 0 auto; }
.default-template-in-place .g-recaptcha iframe {
    display: block;
    border: 0;
    /* Match Google's iframe document scheme to preserve its transparent canvas.
       The widget itself remains dark through data-theme="dark". */
    color-scheme: light;
}

.default-template-in-place .pf-m-primary,
.default-template-in-place .pf-c-button.pf-m-primary {
    background: linear-gradient(135deg, #bb85ff, #a96aee) !important;
    border: 0 !important;
    border-radius: 9px !important;
    color: #1c082e !important;
    font-weight: 700;
    box-shadow: inset 0 1px 0 #ffffff26, 0 3px 12px #7c3bbf15;
}

.default-template-in-place .pf-m-primary:hover {
    background: linear-gradient(135deg, #c99cff, #b780f5) !important;
}

.default-template-in-place a,
.default-template-in-place #kc-info-wrapper span a { color: #bc82fc; }
.login-pf .default-template-in-place a:hover { color: #dbb5ff; }

.default-template-in-place #kc-registration > span {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.default-template-in-place :is(a, button, input, summary):focus-visible {
    outline: 2px solid #dbb5ff;
    outline-offset: 4px;
}

.default-template-in-place .seperator,
.default-template-in-place .instruction,
.default-template-in-place #kc-form-options .checkbox,
.default-template-in-place .privacy,
.default-template-in-place .privacy a { color: #b9adc4 !important; }

.default-template-in-place .seperator span::before,
.default-template-in-place .seperator span::after { border-color: #392646; }

@keyframes ncx-card-enter {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .default-template-in-place .login-pf-page .card-pf { animation: none; }
}

@media (max-width: 767px) {
    .default-template-in-place #default-template { padding: 24px 16px; }
    .default-template-in-place .login-pf-page .card-pf { padding: 24px; }
    .default-template-in-place #kc-page-title { font-size: 24px; }
}
