/* App-specific overrides for the bundled DFV24 theme */

/*
  The theme's "simple" footer is positioned absolutely and reserves space via
  padding-bottom on .hk-pg-wrapper. In MainLayout we want a non-scrolling footer,
  so we make it participate in normal layout flow and remove the reserved space.
*/
.hk-wrapper.hk-fixed-footer[data-footer=simple] .hk-pg-wrapper {
  padding-bottom: 0;
}

.hk-wrapper.hk-fixed-footer[data-footer=simple] .hk-footer {
  position: static;
}

/*
  Plugin settings pages (rag/openroute/helpeddy/knowledge) use DFV24's
  .taskboardapp-wrap which is sized as calc(100vh - 65px). That ignores our
  footer-aware layout and can cause the plugin page to extend behind the footer.
  Inside MainLayout we size it to the parent scroll area instead.
*/
.hk-wrapper.hk-fixed-footer .taskboardapp-wrap {
  height: 100%;
}

/*
  Ensure page bodies can fill the available scroll container height.
  Many pages/plugins start with .hk-pg-body; without an explicit height it
  won't stretch to the parent, which breaks full-height taskboard layouts.
*/
.hk-wrapper.hk-fixed-footer .hk-pg-body {
  height: 100%;
  min-height: 100%;
  box-sizing: border-box;
}

/*
  Keep sidebar toggles above page layouts and plugin surfaces.
  The theme assigns a low z-index to .hk-sidebar-togglable, which allows
  taskboard/detail content to overlap it on complex admin and plugin pages.
*/
.hk-sidebar-togglable {
  z-index: 1100 !important;
}

.taskboardapp-wrap .taskboardapp-content .taskboardapp-detail-wrap header.taskboard-header {
  z-index: 100;
  isolation: isolate;
}

.users-settings-page .taskboard-header,
.users-settings-page .hk-sidebar-togglable {
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.users-settings-page.users-settings-modal-open .taskboard-header {
  background-color: #f3f4f6;
  z-index: 1 !important;
}

.users-settings-page.users-settings-modal-open .taskboard-header > * {
  opacity: 0.72;
}

.users-settings-page.users-settings-modal-open .hk-sidebar-togglable {
  z-index: 1 !important;
  background-color: #c7ced8 !important;
  box-shadow: none;
  filter: grayscale(1);
  opacity: 0.85;
  pointer-events: none;
}
