/* The shared navy frame surrounds the silver workspace canvas. */
html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) {
  --gkl-frame-navy: #082f67;
  --gkl-frame-text: #f2f6fc;
  --gkl-frame-muted: #c5d4e8;
  --gkl-frame-line: #41618c;
  --gkl-frame-active: #245f9f;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(nav.navbar, header.navbar) {
  background: var(--gkl-frame-navy) !important;
  border-bottom: 1px solid var(--gkl-frame-line) !important;
  box-shadow: none !important;
  color: var(--gkl-frame-text);
  min-height: 57px;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(nav.navbar, header.navbar) > :is(.container, .container-fluid) {
  align-items: center;
  margin-left: 0;
  margin-right: 0;
  max-width: none;
  min-height: 56px;
  padding-left: 24px;
  padding-right: 24px;
  width: 100%;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar :is(.navbar-brand, .gkl-support-header-brand, .gkl-support-header-brand strong, .gkl-support-header-brand span) {
  color: var(--gkl-frame-text) !important;
  -webkit-text-fill-color: var(--gkl-frame-text);
  text-shadow: none !important;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .nav-link {
  color: var(--gkl-frame-text) !important;
}

/* Frappe breadcrumbs use plain anchors and dark embedded arrow images. */
html body.flo-fixed-agent-sidebar-active .navbar #navbar-breadcrumbs,
html body.flo-fixed-agent-sidebar-active .navbar #navbar-breadcrumbs a {
  color: var(--gkl-frame-text) !important;
}

html body.flo-fixed-agent-sidebar-active .navbar #navbar-breadcrumbs a::before {
  filter: brightness(0) invert(1);
  opacity: .8;
}

html body.flo-fixed-agent-sidebar-active .navbar #navbar-breadcrumbs a:is(:hover, :focus-visible) {
  color: #fff !important;
  text-decoration: underline;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .nav-link:hover,
html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .nav-link:focus-visible {
  color: #fff !important;
}

/* Header buttons use both legacy icons and Frappe's newer es-icon sprites. */
html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .navbar-nav > .nav-item > .nav-link :is(.icon, .es-icon) {
  --icon-stroke: var(--gkl-frame-text);
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .navbar-nav > .nav-item > .nav-link .icon {
  --icon-fill: var(--gkl-frame-text);
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .notifications-icon .notifications-unseen .es-icon {
  --green-700: #6ee7a0;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .navbar .navbar-toggler-icon {
  filter: brightness(0) invert(1);
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(.agent-fixed-sidebar, .flo-fixed-agent-sidebar) {
  background: var(--gkl-frame-navy) !important;
  border-right: 1px solid var(--gkl-frame-line) !important;
  box-shadow: none !important;
  color: var(--gkl-frame-text);
  top: 57px;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(.agent-fixed-sidebar, .flo-fixed-agent-sidebar) :is(.agent-sidebar-item, .agent-sidebar-section, .flo-desk-sidebar-item) {
  color: var(--gkl-frame-muted) !important;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .agent-fixed-sidebar .agent-sidebar-section {
  color: var(--gkl-frame-text) !important;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(.agent-fixed-sidebar, .flo-fixed-agent-sidebar) :is(.agent-sidebar-item, .flo-desk-sidebar-item):is(:hover, :focus-visible) {
  background: #16477d !important;
  color: #fff !important;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(.agent-fixed-sidebar, .flo-fixed-agent-sidebar) :is(.agent-sidebar-item, .flo-desk-sidebar-item).is-active {
  background: var(--gkl-frame-active) !important;
  border-color: transparent !important;
  box-shadow: 0 3px 9px rgba(0, 23, 49, .15) !important;
  color: #fff !important;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) .agent-fixed-sidebar .agent-sidebar-divider {
  background: transparent !important;
  border-top-color: var(--gkl-frame-line) !important;
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(.agent-fixed-sidebar, .flo-fixed-agent-sidebar) .flo-notification-badge {
  border-color: var(--gkl-frame-navy);
}

html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(.agent-fixed-sidebar, .flo-fixed-agent-sidebar) .is-active .flo-notification-badge {
  border-color: var(--gkl-frame-active);
}

@media (min-width: 901px) {
  /* Website pages reserve sidebar space on the body; the header spans it. */
  html body:has(.agent-fixed-sidebar) > nav.navbar {
    margin-left: -250px !important;
    max-width: none !important;
    width: calc(100% + 250px);
  }
}

@media (max-width: 900px) {
  html body:is(:has(.agent-fixed-sidebar), .flo-fixed-agent-sidebar-active) :is(nav.navbar, header.navbar) > :is(.container, .container-fluid) {
    padding-left: 16px;
    padding-right: 16px;
  }
}
