@font-face {
    font-family: 'Anuphan';
    src: url('../fonts/Anuphan-Thin.ttf') format('truetype');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'Anuphan';
    src: url('../fonts/Anuphan-ExtraLight.ttf') format('truetype');
    font-weight: 200;
    font-style: normal;
}

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

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

@font-face {
    font-family: 'Anuphan';
    src: url('../fonts/Anuphan-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Anuphan';
    src: url('../fonts/Anuphan-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

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

:root {
    --keycloak-bg-logo-url: url("../img/Login-Keycloak.svg");
}

.pf-v5-c-login__container {
    grid-template-columns: 34rem;
    grid-template-areas: "header"
                         "main"
}

.pf-v5-c-login__main {
  align-self: center;
  width: 100%;
  box-shadow: 0px 4px 8px 0px;
  border-radius: 16px;
  margin-bottom: 64px;
}

/* Info section - top margin + bottom padding */
.pf-v5-c-login__main-footer-band:first-child {
    margin-block-start: var(--pf-v5-global--spacer--lg);
}

.pf-v5-c-login__main-footer-band:last-child {
    padding-bottom: 0;
}
/* Info section */

.login-pf body {
    background: var(--keycloak-bg-logo-url) no-repeat center center fixed;
    background-size: cover;
    background-blend-mode: multiply;
    min-height: 100%;
    position: relative;
    z-index: 0;
}

/* Z-index stacking: body (0) -> kc-bg-content (1) -> kcLoginContainer (2) */
.kc-bg-content {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.kc-bg-logo-section {
    position: absolute;
    top: 5%;
    left: 4%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1em;
    pointer-events: auto;
}

.kc-bg-logo {
    height: clamp(24px, 3vw, 48px);
    width: clamp(24px, 3vw, 48px);
    background-image: url("../img/Logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

.kc-bg-text {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
}

.kc-bg-text h2 {
    margin: 0;
    font-size: clamp(36px, 5vw, 70px);
    font-weight: 400;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.1;
    letter-spacing: -1px;
}

.kc-bg-text p {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Powered by section - right */
.kc-bg-powered-by {
    position: absolute;
    bottom: 8%;
    right: 2%;
    display: flex;
    align-items: center;
    gap: 1em;
    pointer-events: auto;
}

.kc-powered-by-text {
    font-size: clamp(18px, 1.5vw, 24px);
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 300;
    white-space: nowrap;
}

.kc-powered-by-logo {
    height: clamp(32px, 2.5vw, 48px);
    width: clamp(100px, 12vw, 180px);
    background-image: url("../img/PowerbyLogo.svg");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    flex-shrink: 0;
}

/* Footer section - bottom of page */
.kc-bg-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    pointer-events: auto;
    gap: 1em;
}

.kc-footer-copyright {
    font-size: clamp(10px, 1vw, 14px);
    color: rgba(255, 255, 255, 0.6);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.kc-footer-links {
    display: flex;
    gap: 1em;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.kc-footer-link {
    font-size: clamp(10px, 1vw, 14px);
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    transition: color 0.3s ease;
    white-space: nowrap;
}

.kc-footer-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* kcLoginContainer sits on top */
.pf-v5-c-login {
    position: relative;
    z-index: 2;
}

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

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

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

.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;
}

#kc-recovery-codes-list {
    columns: 2;
}

#certificate_subjectDN {
    overflow-wrap: break-word
}

#kc-verify-email-form {
    margin-top: 24px;
    margin-bottom: 24px;
}

#kc-header-wrapper {
    font-size: 29px;
    text-transform: uppercase;
    letter-spacing: 3px;
    line-height: 1.2em;
    white-space: normal;
    color: var(--pf-v5-global--Color--light-100) !important;
    text-align: center;
}

#kc-code pre code {
    word-break: break-all;
}

hr {
    margin-top: var(--pf-v5-global--spacer--sm);
    margin-bottom: var(--pf-v5-global--spacer--md);
}

#kc-social-providers svg:not(.google) {
    filter: invert(47%) sepia(88%) saturate(7486%) hue-rotate(199deg) brightness(91%) contrast(101%);
}

#kc-social-providers svg {
    height: var(--pf-v5-global--FontSize--xl);
}

@media (prefers-color-scheme: dark) {
    #kc-social-providers svg:not(.google) {
        filter: invert(54%) sepia(96%) saturate(2028%) hue-rotate(174deg) brightness(99%) contrast(97%);
    }
}

@media (min-width: 768px) {
    div.pf-v5-c-login__main-header {
        grid-template-columns: 1fr;
    }
}

/* Login header: logo + title + subtitle */
#kc-page-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 16px;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: inherit;
}

.kc-login-header-logo {
    height: 100px;
    width: auto;
    object-fit: contain;
}

.kc-login-header-title {
    font-family: 'Anuphan', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #1a3c7a;
    text-align: center;
    line-height: 1.3;
}

.kc-login-header-subtitle {
    font-family: 'Anuphan', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #666;
    text-align: center;
    line-height: 1.5;
}