/* ============================================
   IfV Keycloak Theme - Account Console Styles
   Matches login theme branding
   Primary Blue: #005EAB
   Secondary Blue: #0057A3
   ============================================ */

/* --- Force light mode, disable dark mode --- */
:root {
    color-scheme: light !important;
}

html.pf-v5-theme-dark {
    color-scheme: light !important;
}

/* --- Top accent bar --- */
body::before {
    content: "";
    display: block;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #003d6e, #005EAB, #0072CC);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10000;
}

body {
    padding-top: 6px;
}

/* --- Override PatternFly brand colors --- */
:root,
.pf-v5-theme-dark {
    --pf-v5-global--primary-color--100: #005EAB;
    --pf-v5-global--primary-color--200: #004d8f;
    --pf-v5-global--primary-color--dark-100: #005EAB;
    --pf-v5-global--link--Color: #005EAB;
    --pf-v5-global--link--Color--hover: #003d6e;
    --pf-v5-global--link--Color--dark: #005EAB;
    --pf-v5-global--BackgroundColor--100: #fff;
    --pf-v5-global--BackgroundColor--200: #e8ecf1;
    --pf-v5-global--Color--100: #1a1a1a;
    --pf-v5-global--Color--200: #333;
    --pf-v5-global--active-color--100: #005EAB;
}

/* --- Page background --- */
.pf-v5-c-page,
.pf-v5-c-page__main {
    background-color: #e8ecf1 !important;
}

/* --- Masthead / header --- */
.pf-v5-c-masthead {
    --pf-v5-c-masthead--BackgroundColor: #005EAB;
    background-color: #005EAB !important;
}

.pf-v5-c-masthead .pf-v5-c-button,
.pf-v5-c-masthead a {
    color: #fff !important;
}

/* --- Logo in masthead --- */
.pf-v5-c-masthead__brand img,
.pf-v5-c-brand {
    max-height: 36px;
    width: auto;
}

.pf-v5-c-masthead__brand a {
    display: flex;
    align-items: center;
}

/* --- Sidebar / Navigation --- */
.pf-v5-c-page__sidebar {
    background-color: #fff !important;
}

.pf-v5-c-nav__link {
    color: #333 !important;
}

.pf-v5-c-nav__link:hover {
    --pf-v5-c-nav__link--after--BorderColor: #005EAB;
    color: #005EAB !important;
    background-color: rgba(0, 94, 171, 0.06) !important;
}

.pf-v5-c-nav__link.pf-m-current {
    --pf-v5-c-nav__link--after--BorderColor: #005EAB;
    color: #005EAB !important;
    font-weight: 600;
}

.pf-v5-c-nav__link.pf-m-current::after {
    border-left-color: #005EAB !important;
}

/* --- Primary buttons --- */
.pf-v5-c-button.pf-m-primary {
    --pf-v5-c-button--m-primary--BackgroundColor: #005EAB;
    background-color: #005EAB !important;
    border-color: #005EAB !important;
}

.pf-v5-c-button.pf-m-primary:hover {
    --pf-v5-c-button--m-primary--hover--BackgroundColor: #004d8f;
    background-color: #004d8f !important;
    border-color: #004d8f !important;
    box-shadow: 0 2px 8px rgba(0, 94, 171, 0.4);
}

.pf-v5-c-button.pf-m-primary:focus {
    background-color: #004d8f !important;
    border-color: #004d8f !important;
    outline: 2px solid rgba(0, 94, 171, 0.5);
    outline-offset: 2px;
}

/* --- Link buttons --- */
.pf-v5-c-button.pf-m-link {
    --pf-v5-c-button--m-link--Color: #005EAB;
    color: #005EAB !important;
}

.pf-v5-c-button.pf-m-link:hover {
    --pf-v5-c-button--m-link--hover--Color: #003d6e;
    color: #003d6e !important;
}

/* --- Links --- */
a {
    color: #005EAB;
}

a:hover {
    color: #003d6e;
}

/* --- Tabs --- */
.pf-v5-c-tabs__link::after {
    border-bottom-color: #005EAB !important;
}

/* --- Cards on the page --- */
.pf-v5-c-card {
    border-radius: 8px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* --- Form focus states --- */
.pf-v5-c-form-control > input:focus,
.pf-v5-c-form-control > textarea:focus,
.pf-v5-c-form-control > select:focus {
    border-bottom-color: #005EAB !important;
}

/* --- Checkbox colors --- */
.pf-v5-c-check__input:checked {
    background-color: #005EAB;
    border-color: #005EAB;
}

/* --- Switch / Toggle --- */
.pf-v5-c-switch__input:checked ~ .pf-v5-c-switch__toggle {
    --pf-v5-c-switch__input--checked__toggle--BackgroundColor: #005EAB;
    background-color: #005EAB !important;
}

/* --- Alert info --- */
.pf-v5-c-alert.pf-m-info {
    --pf-v5-c-alert--BackgroundColor: rgba(0, 94, 171, 0.08);
}

/* --- Spinner color --- */
.pf-v5-c-spinner__path {
    stroke: #005EAB;
}

/* --- Page header title --- */
.pf-v5-c-page__main-section .pf-v5-c-content h1,
.pf-v5-c-title {
    color: #1a1a1a;
}
