/* VLearned Admin Dashboard Theme - Subtle Styling Only */

/* Force VLearned brand colors in PatternFly variables */
:root {
    /* PatternFly v5 variables */
    --pf-v5-global--primary-color--100: #f97316 !important;
    --pf-v5-global--primary-color--200: #ea580c !important;
    --pf-v5-global--link--Color: #f97316 !important;
    --pf-v5-global--link--Color--hover: #ea580c !important;
    --pf-v5-c-button--m-primary--BackgroundColor: #f97316 !important;
    --pf-v5-c-button--m-primary--hover--BackgroundColor: #ea580c !important;
    --pf-v5-c-button--m-primary--BorderColor: #f97316 !important;
    --pf-v5-c-nav__link--m-current--BackgroundColor: #f97316 !important;
    --pf-v5-c-nav__link--m-current--Color: #ffffff !important;
    --pf-v5-c-tabs__link--m-current--BorderBottomColor: #f97316 !important;
    --pf-v5-c-tabs__link--m-current--Color: #f97316 !important;
    
    /* Legacy v4 for compatibility */
    --pf-global--primary-color--100: #f97316 !important;
    --pf-global--primary-color--200: #ea580c !important;
    --pf-global--link--Color: #f97316 !important;
    --pf-global--link--Color--hover: #ea580c !important;
    --pf-c-button--m-primary--BackgroundColor: #f97316 !important;
    --pf-c-button--m-primary--hover--BackgroundColor: #ea580c !important;
    --pf-c-button--m-primary--BorderColor: #f97316 !important;
}

/* Fix invisible section headers */
.pf-v5-c-nav__section-title,
.pf-c-nav__section-title {
    color: #0f172a !important;
    font-weight: 600 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* VLearned logo replacement - more aggressive targeting */
.pf-v5-c-brand img,
.pf-c-brand img,
.pf-v5-c-page__header-brand img,
.pf-c-page__header-brand img,
.pf-v5-c-masthead__brand img,
.pf-c-masthead__brand img,
.pf-v5-c-page__masthead .pf-v5-c-brand img,
.pf-c-page__masthead .pf-c-brand img,
.pf-v5-c-masthead .pf-v5-c-brand img,
.pf-c-masthead .pf-c-brand img {
    content: url("../img/vlearned-logo.webp") !important;
    width: 140px !important;
    height: auto !important;
    max-height: 45px !important;
}

/* Hide Keycloak text branding */
.pf-v5-c-page__header-brand-text,
.pf-c-page__header-brand-text,
.pf-v5-c-brand__text,
.pf-c-brand__text {
    display: none !important;
}

/* Subtle sidebar styling - light background */
.pf-v5-c-page__sidebar,
.pf-c-page__sidebar,
.pf-v5-c-nav,
.pf-c-nav {
    background-color: #f8fafc !important;
    border-right: 1px solid #e2e8f0 !important;
}

/* Orange buttons */
.pf-v5-c-button.pf-m-primary,
.pf-c-button.pf-m-primary {
    background-color: #f97316 !important;
    border-color: #f97316 !important;
    color: white !important;
}

.pf-v5-c-button.pf-m-primary:hover,
.pf-c-button.pf-m-primary:hover,
.pf-v5-c-button.pf-m-primary:focus,
.pf-c-button.pf-m-primary:focus {
    background-color: #ea580c !important;
    border-color: #ea580c !important;
}

/* Orange navigation active state */
.pf-v5-c-nav__link.pf-m-current,
.pf-c-nav__link.pf-m-current {
    background-color: #f97316 !important;
    color: white !important;
}

/* Orange tabs */
.pf-v5-c-tabs__link.pf-m-current,
.pf-c-tabs__link.pf-m-current {
    border-bottom-color: #f97316 !important;
    color: #f97316 !important;
}

/* Orange links */
a {
    color: #f97316 !important;
}

a:hover {
    color: #ea580c !important;
}

/* Orange form focus states */
.pf-v5-c-form-control:focus,
.pf-c-form-control:focus {
    border-color: #f97316 !important;
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2) !important;
}

/* Clean header with VLearned branding - match header.jsx */
.pf-v5-c-page__header,
.pf-c-page__header,
.pf-v5-c-masthead,
.pf-c-masthead,
.pf-v5-c-page__masthead,
.pf-c-page__masthead {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 30 !important;
}

/* Remove dark masthead background */
.pf-v5-c-masthead.pf-m-dark,
.pf-c-masthead.pf-m-dark {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Ensure masthead content has proper styling */
.pf-v5-c-masthead__main,
.pf-c-masthead__main,
.pf-v5-c-masthead__content,
.pf-c-masthead__content {
    background-color: transparent !important;
}

/* Fix masthead toolbar and icons */
.pf-v5-c-masthead .pf-v5-c-toolbar,
.pf-c-masthead .pf-c-toolbar {
    background-color: transparent !important;
}

/* Fix hamburger menu and icon colors */
.pf-v5-c-masthead .pf-v5-c-menu-toggle,
.pf-c-masthead .pf-c-menu-toggle,
.pf-v5-c-masthead .pf-v5-c-menu-toggle.pf-m-plain,
.pf-c-masthead .pf-c-menu-toggle.pf-m-plain,
.pf-v5-c-masthead button,
.pf-c-masthead button,
.pf-v5-c-masthead svg,
.pf-c-masthead svg {
    color: #374151 !important;
    fill: #374151 !important;
}

/* Fix menu toggle text */
.pf-v5-c-masthead .pf-v5-c-menu-toggle__text,
.pf-c-masthead .pf-c-menu-toggle__text {
    color: #0f172a !important;
}

/* Fix dropdown menu styling - all dropdown menus */
.pf-v5-c-menu,
.pf-c-menu,
.pf-v5-c-dropdown__menu,
.pf-c-dropdown__menu {
    background-color: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1) !important;
}

/* Target the dropdown and sidebar specifically */
.pf-v5-c-menu[data-testid="options"],
.pf-v5-c-menu[data-ouia-component-type="PF5/Dropdown"] {
    z-index: 999999 !important;
    position: absolute !important;
}

/* Force sidebar to lower z-index */
.pf-v5-c-page__sidebar,
.pf-c-page__sidebar,
.pf-v5-c-nav,
.pf-c-nav {
    z-index: 10 !important;
    position: relative !important;
}

/* Force main content area to lower z-index */
.pf-v5-c-page__main,
.pf-c-page__main,
.pf-v5-c-page__main-section,
.pf-c-page__main-section {
    z-index: 10 !important;
    position: relative !important;
}

/* Ensure React app container doesn't create stacking context issues */
#app,
.container {
    z-index: auto !important;
}

.pf-v5-c-menu__item,
.pf-c-menu__item,
.pf-v5-c-dropdown__menu-item,
.pf-c-dropdown__menu-item {
    color: #374151 !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px !important;
    margin: 2px !important;
}

.pf-v5-c-menu__item:hover,
.pf-c-menu__item:hover,
.pf-v5-c-dropdown__menu-item:hover,
.pf-c-dropdown__menu-item:hover {
    background-color: #f3f4f6 !important;
    color: #0f172a !important;
}

.pf-v5-c-menu__item-text,
.pf-c-menu__item-text,
.pf-v5-c-dropdown__link,
.pf-c-dropdown__link {
    color: #374151 !important;
}

/* Fix sidebar dropdown and navigation items */
.pf-v5-c-nav__link,
.pf-c-nav__link {
    color: #374151 !important;
}

.pf-v5-c-nav__subnav .pf-v5-c-nav__link,
.pf-c-nav__subnav .pf-c-nav__link {
    color: #374151 !important;
    background-color: transparent !important;
}

.pf-v5-c-nav__subnav .pf-v5-c-nav__link:hover,
.pf-c-nav__subnav .pf-c-nav__link:hover {
    background-color: #f3f4f6 !important;
    color: #0f172a !important;
}

/* Force all dropdown text to be dark */
.pf-v5-c-menu a,
.pf-c-menu a,
.pf-v5-c-dropdown a,
.pf-c-dropdown a,
.pf-v5-c-nav a,
.pf-c-nav a {
    color: #374151 !important;
    text-decoration: none !important;
}

.pf-v5-c-menu a:hover,
.pf-c-menu a:hover,
.pf-v5-c-dropdown a:hover,
.pf-c-dropdown a:hover,
.pf-v5-c-nav a:hover,
.pf-c-nav a:hover {
    color: #0f172a !important;
}

/* Add VLearned title to header */
.pf-v5-c-page__header::after,
.pf-c-page__header::after {
    content: "VLearned Admin Console" !important;
    position: absolute !important;
    right: 2rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #0f172a !important;
    font-size: 1.125rem !important;
    font-weight: 600 !important;
    z-index: 1000 !important;
}

/* Footer branding */
body::after {
    content: "Powered by VLearned Learning Management System" !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(90deg, #f97316, #ea580c) !important;
    color: white !important;
    text-align: center !important;
    padding: 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    z-index: 2000 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1) !important;
}

/* VLearned Card Styling - match card.jsx: rounded-xl border py-6 shadow-sm */
.pf-v5-c-card,
.pf-c-card {
    border-color: #e5e7eb !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
    background-color: #ffffff !important;
}

/* Card headers with proper spacing */
.pf-v5-c-card__header,
.pf-c-card__header {
    padding-bottom: 0.75rem !important;
}

.pf-v5-c-card__title,
.pf-c-card__title {
    font-weight: 600 !important;
    line-height: 1 !important;
}

/* Tab styling inspired by VLearned tabs.jsx */
.pf-v5-c-tabs__list,
.pf-c-tabs__list {
    background-color: #f3f4f6 !important;
    border-radius: 8px !important;
    padding: 3px !important;
    display: inline-flex !important;
    height: 36px !important;
    width: fit-content !important;
    align-items: center !important;
    justify-content: center !important;
}

.pf-v5-c-tabs__item,
.pf-c-tabs__item {
    border-radius: 6px !important;
}

.pf-v5-c-tabs__link,
.pf-c-tabs__link {
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    border: 1px solid transparent !important;
    padding: 0.25rem 0.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
}

.pf-v5-c-tabs__link.pf-m-current,
.pf-c-tabs__link.pf-m-current {
    background-color: white !important;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important;
    border: 1px solid #e5e7eb !important;
    color: #0f172a !important;
}

/* Badge styling inspired by VLearned badge.jsx */
.pf-v5-c-label,
.pf-c-label {
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    padding: 0.125rem 0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    white-space: nowrap !important;
}

.pf-v5-c-label.pf-m-green,
.pf-c-label.pf-m-green {
    background-color: #f0fdf4 !important;
    color: #15803d !important;
    border: 1px solid #bbf7d0 !important;
}

.pf-v5-c-label.pf-m-blue,
.pf-c-label.pf-m-blue {
    background-color: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
}

.pf-v5-c-label.pf-m-orange,
.pf-c-label.pf-m-orange {
    background-color: #fff7ed !important;
    color: #c2410c !important;
    border: 1px solid #fed7aa !important;
}

/* Better page section spacing */
.pf-v5-c-page__main-section,
.pf-c-page__main-section {
    border-color: #e5e7eb !important;
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

/* Adjust main content for footer */
.pf-v5-c-page__main,
.pf-c-page__main {
    padding-bottom: 3rem !important;
}

/* Force White Background - Override Dark Mode */
body,
html,
.pf-c-page,
.pf-v5-c-page,
.pf-c-page__main,
.pf-v5-c-page__main,
.pf-c-page__main-section,
.pf-v5-c-page__main-section,
.pf-c-page__main-section.pf-m-no-padding,
.pf-v5-c-page__main-section.pf-m-no-padding,
.pf-c-page__drawer,
.pf-v5-c-page__drawer,
.pf-c-drawer__main,
.pf-v5-c-drawer__main,
.pf-c-drawer__content,
.pf-v5-c-drawer__content,
.pf-c-drawer__panel,
.pf-v5-c-drawer__panel,
.pf-c-tabs__content,
.pf-v5-c-tabs__content,
.pf-c-tab-content,
.pf-v5-c-tab-content {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #374151 !important;
}

/* Force Content Areas to White */
.pf-c-card__body,
.pf-v5-c-card__body,
.pf-c-card__footer,
.pf-v5-c-card__footer,
.pf-c-data-list,
.pf-v5-c-data-list,
.pf-c-data-list__item,
.pf-v5-c-data-list__item,
.pf-c-data-list__item-content,
.pf-v5-c-data-list__item-content,
.pf-c-table,
.pf-v5-c-table,
.pf-c-table tbody tr,
.pf-v5-c-table tbody tr,
.pf-c-table tbody td,
.pf-v5-c-table tbody td,
.pf-c-toolbar__content,
.pf-v5-c-toolbar__content,
.pf-c-toolbar__item,
.pf-v5-c-toolbar__item,
.pf-c-form__group,
.pf-v5-c-form__group,
.pf-c-expandable-section__content,
.pf-v5-c-expandable-section__content {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #374151 !important;
}

/* Override Dark Text Colors */
.pf-c-content,
.pf-v5-c-content,
.pf-c-content h1,
.pf-v5-c-content h1,
.pf-c-content h2,
.pf-v5-c-content h2,
.pf-c-content h3,
.pf-v5-c-content h3,
.pf-c-content h4,
.pf-v5-c-content h4,
.pf-c-content h5,
.pf-v5-c-content h5,
.pf-c-content h6,
.pf-v5-c-content h6,
.pf-c-content p,
.pf-v5-c-content p,
.pf-c-content span,
.pf-v5-c-content span,
.pf-c-content div,
.pf-v5-c-content div,
.pf-c-data-list__item-row,
.pf-v5-c-data-list__item-row,
.pf-c-data-list__cell,
.pf-v5-c-data-list__cell,
.pf-c-data-list__cell-text,
.pf-v5-c-data-list__cell-text,
.pf-c-table td,
.pf-v5-c-table td,
.pf-c-table th,
.pf-v5-c-table th,
.pf-c-description-list__term,
.pf-v5-c-description-list__term,
.pf-c-description-list__description,
.pf-v5-c-description-list__description,
.pf-c-form__label,
.pf-v5-c-form__label,
.pf-c-form__label-text,
.pf-v5-c-form__label-text,
.pf-c-form__helper-text,
.pf-v5-c-form__helper-text,
.pf-c-expandable-section__toggle-text,
.pf-v5-c-expandable-section__toggle-text {
  color: #374151 !important;
}

/* Force Input Backgrounds */
.pf-c-form-control,
.pf-v5-c-form-control,
.pf-c-select__toggle,
.pf-v5-c-select__toggle,
.pf-c-text-input-group,
.pf-v5-c-text-input-group,
.pf-c-text-input-group__text-input,
.pf-v5-c-text-input-group__text-input,
.pf-c-select__menu,
.pf-v5-c-select__menu,
.pf-c-select__menu-item,
.pf-v5-c-select__menu-item {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: #374151 !important;
}

/* Override PatternFly v5 Dark Mode Variables */
:root {
  /* Force light color scheme */
  color-scheme: light !important;
  
  /* Override PatternFly v5 background variables */
  --pf-v5-global--BackgroundColor--100: #ffffff !important;
  --pf-v5-global--BackgroundColor--150: #ffffff !important;
  --pf-v5-global--BackgroundColor--200: #ffffff !important;
  --pf-v5-global--BackgroundColor--300: #ffffff !important;
  --pf-v5-global--BackgroundColor--400: #ffffff !important;
  --pf-v5-global--BackgroundColor--light-100: #ffffff !important;
  --pf-v5-global--BackgroundColor--light-200: #ffffff !important;
  --pf-v5-global--BackgroundColor--light-300: #ffffff !important;
  --pf-v5-global--BackgroundColor--dark-100: #ffffff !important;
  --pf-v5-global--BackgroundColor--dark-200: #ffffff !important;
  --pf-v5-global--BackgroundColor--dark-300: #ffffff !important;
  --pf-v5-global--BackgroundColor--dark-400: #ffffff !important;
  
  /* Override PatternFly v5 text color variables */
  --pf-v5-global--Color--100: #374151 !important;
  --pf-v5-global--Color--200: #374151 !important;
  --pf-v5-global--Color--300: #374151 !important;
  --pf-v5-global--Color--400: #374151 !important;
  --pf-v5-global--Color--dark-100: #374151 !important;
  --pf-v5-global--Color--dark-200: #374151 !important;
  --pf-v5-global--Color--light-100: #374151 !important;
  --pf-v5-global--Color--light-200: #374151 !important;
  --pf-v5-global--Color--light-300: #374151 !important;
  
  /* Override page-specific variables */
  --pf-v5-c-page--BackgroundColor: #ffffff !important;
  --pf-v5-c-page__main-section--BackgroundColor: #ffffff !important;
  --pf-v5-c-page__main-section--m-light--BackgroundColor: #ffffff !important;
  --pf-v5-c-page__main-section--m-light-100--BackgroundColor: #ffffff !important;
  --pf-v5-c-page__main-nav--BackgroundColor: #ffffff !important;
  --pf-v5-c-page__main-breadcrumb--BackgroundColor: #ffffff !important;
  --pf-v5-c-page__main-tabs--BackgroundColor: #ffffff !important;
}

/* Disable Dark Mode Media Queries */
@media (prefers-color-scheme: dark) {
  body,
  html,
  .pf-c-page,
  .pf-v5-c-page,
  .pf-c-page__main,
  .pf-v5-c-page__main,
  .pf-c-page__main-section,
  .pf-v5-c-page__main-section {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #374151 !important;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pf-v5-c-page__header::after,
    .pf-c-page__header::after {
        display: none;
    }
    
    .pf-v5-c-brand img,
    .pf-c-brand img {
        width: 100px !important;
        max-height: 32px !important;
    }
}