/* ===== yuuline Custom Keycloak Login Theme ===== */

/* Brand Colors (yuuline palette):
   Primary:   #30b355
   Secondary: #54d678
   Tertiary:  #2a9d4a
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ----- Override Keycloak CSS variables ----- */
:root {
    --keycloak-card-top-color: #30b355;
}

body,
.login-pf body,
body#keycloak-bg {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    background: #ffffff !important;
    color: #232323 !important;
}

/* ----- Logo centered above login card ----- */
body#keycloak-bg::before {
    content: '';
    display: block;
    position: fixed;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 96px;
    height: 96px;
    background: url('../img/logo.png') no-repeat center center;
    background-size: contain;
    pointer-events: none;
    z-index: 0;
}

/* ----- Hide default Keycloak logo text and realm name ----- */
div.kc-logo-text {
    display: none;
}

#kc-header,
#kc-header-wrapper {
    display: none !important;
}

/* ----- Login card ----- */
.pf-v5-c-login__main {
    background: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
}

.pf-v5-c-login__main-header {
    border-top-color: #30b355 !important;
}

/* ----- Ensure login container is above decorative elements ----- */
.pf-v5-c-login {
    position: relative;
    z-index: 1;
}

/* ----- Primary Buttons (Green) ----- */
.pf-v5-c-button.pf-m-primary {
    background-color: #30b355 !important;
    border-color: #30b355 !important;
    color: #ffffff !important;
}

.pf-v5-c-button.pf-m-primary:hover {
    background-color: #2a9d4a !important;
    border-color: #2a9d4a !important;
}

.pf-v5-c-button.pf-m-primary:focus {
    outline-color: #30b355 !important;
    box-shadow: 0 0 0 3px rgba(48, 179, 85, 0.35) !important;
}

/* ----- Links (Green) ----- */
.pf-v5-c-login a {
    color: #30b355 !important;
}

.pf-v5-c-login a:hover {
    color: #2a9d4a !important;
}

/* ----- Form input focus ring ----- */
.pf-v5-c-form-control:focus-within {
    --pf-v5-c-form-control--m-focus--after--BorderBottomColor: #30b355;
}

/* ----- Dark mode adjustments ----- */
.pf-v5-theme-dark body,
.pf-v5-theme-dark {
    background: #121212 !important;
    color: #e0e0e0 !important;
}

.pf-v5-theme-dark .pf-v5-c-login__main {
    background: #1e1e1e !important;
}

.pf-v5-theme-dark .pf-v5-c-button.pf-m-primary {
    background-color: #3cc962 !important;
    border-color: #3cc962 !important;
}
