/* Custom Styles for GTSC Login Page (Light Theme Forced) */

/* Page background with a clean soft gradient */
body#keycloak-bg,
html.pf-v5-theme-dark body#keycloak-bg {
    background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%) !important;
    background-size: cover !important;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
    margin: 0 !important;
}

/* Center alignment for the entire page container, override PatternFly grid on wide screens */
.pf-v5-c-login,
html.pf-v5-theme-dark .pf-v5-c-login {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 100vh !important;
    background: transparent !important;
    grid-template-columns: unset !important;
    grid-template-rows: unset !important;
    grid-template-areas: unset !important;
}

/* Force vertical column stack and center items */
.pf-v5-c-login__container,
html.pf-v5-theme-dark .pf-v5-c-login__container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    max-width: 450px !important;
    padding: 24px !important;
    box-sizing: border-box !important;
    grid-column: unset !important;
    grid-row: unset !important;
    grid-area: unset !important;
}

/* Center the logo header above the login card */
#kc-header,
html.pf-v5-theme-dark #kc-header {
    width: 100% !important;
    display: flex !important;
    justify-content: center !important;
    margin-bottom: 24px !important;
    grid-column: unset !important;
    grid-row: unset !important;
    grid-area: unset !important;
}

#kc-header-wrapper.pf-v5-c-brand,
html.pf-v5-theme-dark #kc-header-wrapper.pf-v5-c-brand {
    display: block !important;
    background-image: url('../img/gtsc-logo.png') !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: contain !important;
    height: 70px !important;
    width: 200px !important;
    font-size: 0 !important;
    color: transparent !important;
    margin: 0 !important;
}

/* Login Card Container Styling - Forced Light Theme */
.pf-v5-c-login__main,
html.pf-v5-theme-dark .pf-v5-c-login__main {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 16px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03), 0 20px 25px -5px rgba(0, 0, 0, 0.05) !important;
    padding: 32px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    grid-column: unset !important;
    grid-row: unset !important;
    grid-area: unset !important;
}

/* Components background transparent inside the card */
.pf-v5-c-login__main-header,
.pf-v5-c-login__main-body,
.pf-v5-c-login__main-footer,
html.pf-v5-theme-dark .pf-v5-c-login__main-header,
html.pf-v5-theme-dark .pf-v5-c-login__main-body,
html.pf-v5-theme-dark .pf-v5-c-login__main-footer {
    background: transparent !important;
}

/* Heading style inside card */
.pf-v5-c-login__main-header,
html.pf-v5-theme-dark .pf-v5-c-login__main-header {
    margin-bottom: 24px !important;
}

.pf-v5-c-title,
html.pf-v5-theme-dark .pf-v5-c-title {
    color: #0f172a !important;
    font-weight: 700 !important;
    text-align: center !important;
    font-size: 24px !important;
    letter-spacing: -0.025em !important;
}

/* Form input labels */
.pf-v5-c-form__label-text,
html.pf-v5-theme-dark .pf-v5-c-form__label-text {
    color: #475569 !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}

/* Input fields with smooth transition on focus */
.pf-v5-c-form-control input,
html.pf-v5-theme-dark .pf-v5-c-form-control input {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pf-v5-c-form-control input:focus,
html.pf-v5-theme-dark .pf-v5-c-form-control input:focus {
    background-color: #ffffff !important;
    border-color: #2563eb !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
    color: #0f172a !important;
}

/* Eye icon toggle for password */
.pf-v5-c-button.pf-m-control,
html.pf-v5-theme-dark .pf-v5-c-button.pf-m-control {
    background-color: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #64748b !important;
    border-radius: 0 8px 8px 0 !important;
    border-left: none !important;
    padding: 0 14px !important;
    cursor: pointer !important;
}

.pf-v5-c-input-group__item .pf-v5-c-form-control input,
html.pf-v5-theme-dark .pf-v5-c-input-group__item .pf-v5-c-form-control input {
    border-radius: 8px 0 0 8px !important;
}

/* Checkbox alignment */
.pf-v5-c-check__label,
html.pf-v5-theme-dark .pf-v5-c-check__label {
    color: #475569 !important;
    font-size: 13px !important;
}

/* Login button with micro-interactions */
.pf-v5-c-button.pf-m-primary,
html.pf-v5-theme-dark .pf-v5-c-button.pf-m-primary {
    background-color: #2563eb !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.15) !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    width: 100% !important;
}

.pf-v5-c-button.pf-m-primary:hover,
html.pf-v5-theme-dark .pf-v5-c-button.pf-m-primary:hover {
    background-color: #1d4ed8 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2) !important;
}

.pf-v5-c-button.pf-m-primary:active,
html.pf-v5-theme-dark .pf-v5-c-button.pf-m-primary:active {
    transform: translateY(0) !important;
}

/* Helper links */
.pf-v5-c-login__main-footer-links-item-link,
.pf-v5-c-form__helper-text a,
html.pf-v5-theme-dark .pf-v5-c-login__main-footer-links-item-link,
html.pf-v5-theme-dark .pf-v5-c-form__helper-text a {
    color: #2563eb !important;
    font-size: 13px !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: color 0.15s ease !important;
}

.pf-v5-c-login__main-footer-links-item-link:hover,
.pf-v5-c-form__helper-text a:hover,
html.pf-v5-theme-dark .pf-v5-c-login__main-footer-links-item-link:hover,
html.pf-v5-theme-dark .pf-v5-c-form__helper-text a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline !important;
}
