﻿/* assets/style.css */

:root {
  --header-height: 56px;
  /* Height of main header nav */
  --subnav-height: 50px;
  /* Height of sub nav in analysis bias tab */
  --logo-header-height: 45px;
  /* Height of logo in header menu */
  --tb-shell-divider-color: #ccc;
}

html,
body,
.dash-app {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: #222;
  margin-top: 0px;
  margin-bottom: 0.5rem;
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: 1.6rem;
  color: #0059ff;
}

h2 {
  font-size: 1.5rem;
  color: #0059ff;
}

h3 {
  font-size: 1.2rem;
  color: #0059ff;
}

.justify-text { text-align: justify; }

/* Splash screen - Custom loader of the Valotra app */
#custom-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #ffffff;
  transition: opacity 0.3s ease;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.loader-logo {
  display: block;
  width: 252px;
  box-sizing: border-box;
  padding: 22px 24px;
  object-fit: contain;
  margin-bottom: 24px;
}

body[data-show-logo="false"] .logoHeader,
body[data-show-logo="false"] .loader-logo {
  display: none;
}

.loader-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e1e1e1;
  border-top-color: #0059ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loader-text {
  margin-top: 18px;
  font-size: 1.1rem;
  color: #0059ff;
  letter-spacing: 0.5px;
}

/* --- WebKit (Chrome, Safari) --- */
.reportBlockInner::-webkit-scrollbar {
  width: 8px;  /* šířka lišty */
}

.reportBlockInner::-webkit-scrollbar-track {
  background: transparent;  /* průhledné pozadí celého tracku */
}

.reportBlockInner::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.3);  /* jen trochu viditelný thumb */
  border-radius: 4px;
}

/* --- Firefox --- */
.reportBlockInner {
  scrollbar-width: thin;                /* tenký scrollbar */
  scrollbar-color: rgba(0,0,0,0.3) transparent;  
  /* první hodnota = thumb, druhá = track */
}

/* Main Figure */
.mainFigure {
  padding: 0px 0px 0px 0px;
  margin: 0 auto;
}

/* App header with menu, logo and other elements */
.headerApp {
  position: relative;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
  height: var(--header-height);
  border-bottom: 1px solid var(--tb-shell-divider-color);
}

.headerApp.headerApp--with-subnav {
  border-bottom: none;
}

.logoHeader {
  display: block;
  align-self: center;
  height: var(--header-height);
  width: auto;
  box-sizing: border-box;
  padding: 12px 20px 12px 20px;
  object-fit: contain;
  object-position: center left;
  vertical-align: middle;
  flex: 0 0 auto;
}

.mainDashboardContent {
  display: flex;
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
}

/* Header horizontal navigation */
.navButtons {
  height: var(--header-height);
  display: flex;
  position: relative;
  background-image: linear-gradient(
    to bottom,
    transparent calc(100% - 1px),
    var(--tb-shell-divider-color) calc(100% - 1px)
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
  background-color: #ffffff;
  font-size: 1rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  justify-content: flex-start;
  /* Align buttons containers to the left */
}

.headerApp.headerApp--with-subnav .navButtons {
  background-image: none;
}

.navButton {
  text-decoration: none;
  font-size: 1rem;
  color: #343a40;
  background: none;
  display: flex;
  align-items: center;
  border: none;
  outline: none;
  cursor: pointer;
  transition: all .2s;
  line-height: var(--header-height);
  height: 100%;
  padding: 0px 14px 0px 14px;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  /* Text to center position */
}

.navButtonWrap {
  position: relative;
  display: flex;
  height: 100%;
  flex: 0 0 auto;
}

.navButton__label {
  display: inline-flex;
  align-items: center;
}

.navButton::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  opacity: 0;
  background-color: #0059ff;
  transition: height 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.navButton:hover {
  color: #343A40;
  background-color: #e1ebf5 !important;
}
.navButton:hover::after,
.navButton.active::after {
  height: 4px;
  opacity: 1;
}

.headerFlyoutPanel {
  position: absolute;
  top: calc(100% - 1px);
  left: -10px;
  z-index: 40;
  width: 420px;
  padding-top: 14px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    visibility 0.16s ease;
}

.headerFlyoutPanel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 18px;
}

.headerFlyoutPanel--wide {
  width: 640px;
}

.navButtonWrap--hasFlyout:hover .headerFlyoutPanel,
.navButtonWrap--hasFlyout:focus-within .headerFlyoutPanel,
.navButtonWrap--hasFlyout.tbFlyout--open .headerFlyoutPanel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.navButtonWrap--flyout-suppressed:hover .headerFlyoutPanel,
.navButtonWrap--flyout-suppressed:focus-within .headerFlyoutPanel,
.navButtonWrap--hasFlyout.tbFlyout--suppressed:hover .headerFlyoutPanel,
.navButtonWrap--hasFlyout.tbFlyout--suppressed:focus-within .headerFlyoutPanel,
.navButtonWrap--hasFlyout.tbFlyout--suppressed.tbFlyout--open .headerFlyoutPanel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
}

.headerFlyoutSurface {
  display: grid;
  position: relative;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  padding: 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.headerFlyoutSurface::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 34px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-top: 1px solid #d1d5db;
  border-left: 1px solid #d1d5db;
  transform: rotate(45deg);
}

.headerFlyoutGroup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce4f2;
  border-radius: 8px;
  background: #fbfcff;
  box-shadow: none;
}

.headerFlyoutGroup__title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #5b6789;
}

.headerFlyoutGroup__description {
  font-size: 0.8rem;
  line-height: 1.4;
  color: #667085;
}

.headerFlyoutGroup__items {
  display: grid;
  gap: 8px;
}

.headerFlyoutLink {
  width: 100%;
  min-height: 52px;
  border: 1px solid #d6d9e6;
  border-radius: 6px;
  padding: 10px 12px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: #1d2a44;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    color 0.16s ease;
}

.headerFlyoutLink__title {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.2;
}

.headerFlyoutLink__description {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #5b6789;
}

.headerFlyoutLink:hover,
.headerFlyoutLink:focus-visible {
  outline: none;
  border-color: #b8c4ff;
  background: #f8fbff;
  box-shadow: none;
}

.headerFlyoutLink:hover .headerFlyoutLink__description,
.headerFlyoutLink:focus-visible .headerFlyoutLink__description {
  color: #475467;
}

/* Journaling: Timeframe sliding menu */
.journaling-tf-menu {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 34px; /* match tool button height */
}

/* Hover bridge to avoid flicker when moving from button to menu */
.journaling-tf-menu::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 0;
  width: 12px; /* small transparent bridge */
  height: 100%;
  background: transparent;
  z-index: 5; /* below options (10), above background */
}

.journaling-tf-menu__current {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  padding: 0;
  border-radius: 4px;
  border: 1px solid #d1d5db; /* gray */
  background: #ffffff; /* white */
  color: #111827;
  cursor: pointer;
}

.journaling-tf-menu__current:hover {
  border-color: #0059ff; /* company blue */
}

.journaling-tf-menu__options {
  position: absolute;
  left: calc(100% - 1px); /* snug to button, slight overlap */
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
  padding: 8px;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: max-width 160ms ease, opacity 160ms ease;
  z-index: 4300; /* ensure above chart layers and pickers */
  margin-left: 5px;
}

/* Flip to open left when needed */
.journaling-tf-menu.is-flip .journaling-tf-menu__options {
  left: auto;
  right: calc(100% - 1px);
}

.journaling-tf-menu:hover .journaling-tf-menu__options,
.journaling-tf-menu.is-open .journaling-tf-menu__options {
  max-width: 520px; /* enough for all buttons in a row */
  opacity: 1;
  pointer-events: auto;
}

.journaling-tf-btn {
  font-size: 0.8rem;
  min-width: 40px;
  min-height: 30px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 4px;
  border: 1px solid #d1d5db; /* gray */
  background: #ffffff; /* white */
  color: #111827;
  cursor: pointer;
}

/* Journaling: tool buttons default hover border like timeframe toggle */
#journaling-trade-reset-view,
#journaling-trade-toggle-markers,
#journaling-trade-toggle-sltp,
#journaling-trade-toggle-volume {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  max-width: 34px !important;
  max-height: 34px !important;
  padding: 0 !important;
  border-radius: 4px;
  border-width: 1px !important;
  background: #ffffff;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transform: none !important;
  transition: none !important;
  line-height: 0 !important;
  flex: 0 0 34px !important;
}

#journaling-trade-reset-view { border: 1px solid #d1d5db; }
#journaling-trade-toggle-markers:not(.is-active),
#journaling-trade-toggle-sltp:not(.is-active),
#journaling-trade-toggle-volume:not(.is-active) { border: 1px solid #d1d5db !important; }

#journaling-trade-reset-view:hover,
#journaling-trade-toggle-markers:not(.is-active):hover,
#journaling-trade-toggle-sltp:not(.is-active):hover,
#journaling-trade-toggle-volume:not(.is-active):hover {
  border-color: #0059ff !important; /* company blue */
}

/* Ensure inner icon doesn't affect layout */
#journaling-trade-reset-view img,
#journaling-trade-toggle-markers img,
#journaling-trade-toggle-sltp img,
#journaling-trade-toggle-volume img {
  width: 18px !important;
  height: 18px !important;
  display: block;
}

.journaling-tf-btn:hover {
  border-color: #0059ff; /* company blue */
}

.navButton.active {
  color: #343A40;
  background-color: #e1ebf5 !important;
}

/* Sub-navigation of Analysis Bias tab */
.subnavAnalysisBiasButtons {
  display: flex;
  padding: 0px 0px 0px 0px;
  margin: 0px 0px 0px 0px;
  background-color: #F6F6F6;
  border-top: 1px solid var(--tb-shell-divider-color);
  border-bottom: 1px solid var(--tb-shell-divider-color);
  height: 50px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  justify-content: flex-start;
  box-sizing: border-box;
  /* Align buttons containers to the left */
}

.subnavAnalysisBiasButtons.dashboard-subnav {
  align-items: center;
  padding: 0 12px;
  overflow: visible;
}

.subnavAnalysisBiasButtons.analysis-bias-picker-subnav {
  align-items: center;
  padding: 0 12px;
  overflow: visible;
}

.subnavAnalysisBiasButtons.research-subnav {
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 0;
  overflow: visible;
}

.research-subnav-primary,
.research-subnav-context,
.research-subnav-context-group {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.research-subnav-primary {
  flex: 0 0 auto;
  gap: 0;
}

.subnavFlyoutWrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 100%;
  flex: 0 0 auto;
}

.subnavFlyoutPanel {
  position: absolute;
  top: calc(100% - 1px);
  left: 0;
  z-index: 58;
  min-width: 238px;
  padding-top: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(5px);
  transition:
    opacity 0.14s ease,
    transform 0.14s ease,
    visibility 0.14s ease;
}

.subnavFlyoutWrap:first-child .subnavFlyoutPanel {
  left: 12px;
}

.subnavFlyoutWrap:hover .subnavFlyoutPanel,
.subnavFlyoutWrap:focus-within .subnavFlyoutPanel,
.subnavFlyoutWrap.tbFlyout--open .subnavFlyoutPanel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.subnavFlyoutWrap.tbFlyout--suppressed:hover .subnavFlyoutPanel,
.subnavFlyoutWrap.tbFlyout--suppressed:focus-within .subnavFlyoutPanel,
.subnavFlyoutWrap.tbFlyout--suppressed.tbFlyout--open .subnavFlyoutPanel {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(5px);
}

.subnavFlyoutPanel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 10px;
}

.subnavFlyoutPanel__title,
.subnavFlyoutPanel__items {
  position: relative;
  background: #ffffff;
  border-left: 1px solid #d8dfea;
  border-right: 1px solid #d8dfea;
}

.subnavFlyoutPanel__title {
  padding: 10px 12px 7px;
  border-top: 1px solid #d8dfea;
  border-radius: 7px 7px 0 0;
  color: #5b6789;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.subnavFlyoutPanel__items {
  display: grid;
  gap: 2px;
  padding: 4px 6px 6px;
  border-bottom: 1px solid #d8dfea;
  border-radius: 0 0 7px 7px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.subnavFlyoutLink {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 8px 9px;
  background: #ffffff;
  color: #1f2a45;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  transition:
    border-color 0.14s ease,
    background 0.14s ease,
    color 0.14s ease;
}

.subnavFlyoutLink:hover,
.subnavFlyoutLink:focus-visible {
  outline: none;
  border-color: #b8c4ff;
  background: #f8fbff;
}

.subnavFlyoutLink__title {
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
}

.subnavFlyoutLink__description {
  color: #667085;
  font-size: 0.74rem;
  line-height: 1.3;
}

.research-subnav-context {
  flex: 1 1 auto;
  justify-content: flex-start;
  min-width: 0;
  margin-left: 0;
  overflow: hidden;
}

.research-subnav-context-group {
  gap: 8px;
  min-width: 0;
  flex-wrap: nowrap;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.research-subnav-context-group .tb-subnav-actions,
.research-subnav-context-group .tb-subnav-action-cluster {
  margin-left: 8px;
}

.research-subnav-context-group .subnavAnalysisBiasButton {
  height: 34px;
  min-height: 34px;
  padding: 0 18px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #ffffff;
  color: #2b364f;
  font-size: 0.9rem;
  font-weight: 400;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: none;
  transition: all 0.2s ease;
}

.research-subnav-context-group .subnavAnalysisBiasButton::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  height: 100%;
  width: 4px;
  opacity: 1;
  background-color: transparent;
  transition: background-color 0.2s ease;
}

.research-subnav-context-group .subnavAnalysisBiasButton:hover {
  color: #2b364f;
  border-color: #0059ff;
  background: #ffffff !important;
  box-shadow: none;
}

.research-subnav-context-group .subnavAnalysisBiasButton:hover::after {
  height: 100%;
  background-color: #0059ff;
}

.research-subnav-context-group .subnavAnalysisBiasButton.active,
.research-subnav-context-group .subnavAnalysisBiasButton.subnavAnalysisBiasButtonActive {
  color: #1f2a45;
  border-color: #0059ff;
  background: #ffffff !important;
  box-shadow: none;
}

.research-subnav-context-group .subnavAnalysisBiasButton.active::after,
.research-subnav-context-group .subnavAnalysisBiasButton.subnavAnalysisBiasButtonActive::after {
  height: 100%;
  background-color: #007BFF;
}

.research-subnav-context-group .tb-icon-btn,
.research-subnav-context-group .tb-subnav-icon-action {
  min-width: 36px;
  width: 36px;
  padding: 0;
}

.research-subnav-divider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 34px;
  margin: 0 18px 0 10px;
  flex: 0 0 20px;
}

.research-subnav-divider__line,
.research-subnav-divider__node {
  display: none;
}

.research-subnav-divider__line {
  display: block;
  width: 1px;
  height: 22px;
  background: #d8e0ec;
}

.research-subnav-actions {
  flex: 0 0 auto;
  margin-left: auto;
}

.analysis-bias-picker-subnav__picker {
  display: inline-flex;
  align-items: center;
  min-height: 100%;
}

.dashboard-subnav-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 100%;
  height: 100%;
  margin-left: auto;
  position: relative;
  overflow: visible;
}

.dashboard-color-switch-shell {
  --dashboard-switch-tl: #0059ff;
  --dashboard-switch-tr: #4ae9dd;
  --dashboard-switch-br: #232323;
  --dashboard-switch-bl: #ffffff;
  --dashboard-panel-surface: linear-gradient(168deg, #ffffff 0%, #f4f8ff 100%);
  --dashboard-panel-border: #d9e2f0;
  --dashboard-panel-shadow: 0 14px 30px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  position: relative;
  width: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
}

.dashboard-color-switch-slider-wrap {
  width: 72px;
  padding: 4px 2px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cfd8e6;
  box-shadow: none;
}

.dashboard-color-switch-slider {
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box;
}

.dashboard-color-switch-slider .rc-slider {
  margin: 0;
  height: 24px;
  padding: 0 !important;
  box-sizing: border-box;
}

#dashboard-color-switch-slider.rc-slider,
#dashboard-color-switch-slider .rc-slider {
  width: calc(100% - 24px);
  margin: 0 auto;
  padding: 0 !important;
}

.dashboard-color-switch-slider.rc-slider-with-marks,
.dashboard-color-switch-slider .rc-slider.rc-slider-with-marks,
#dashboard-color-switch-slider.rc-slider-with-marks,
#dashboard-color-switch-slider .rc-slider.rc-slider-with-marks {
  margin-bottom: 0 !important;
}

.dashboard-color-switch-slider .rc-slider-rail {
  display: none;
}

.dashboard-color-switch-slider .rc-slider-track {
  display: none;
}

.dashboard-color-switch-slider .rc-slider-step {
  top: 0;
  height: 100%;
}

.dashboard-color-switch-slider .rc-slider-dot {
  width: 6px;
  height: 6px;
  margin-left: 0;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  border: none;
  background: rgba(112, 123, 140, 0.58);
  box-shadow: none;
}

.dashboard-color-switch-slider .rc-slider-dot-active {
  background: rgba(89, 102, 123, 0.8);
}

.dashboard-color-switch-slider .rc-slider-handle {
  width: 24px;
  height: 24px;
  top: 50% !important;
  margin-top: 0 !important;
  margin-left: 0 !important;
  transform: translate(-50%, -50%) !important;
  border-radius: 999px;
  border: 1px solid #ccd6e5;
  box-shadow: 0 3px 8px rgba(12, 22, 36, 0.2);
  background:
    linear-gradient(to right, var(--dashboard-switch-tl) 0 50%, var(--dashboard-switch-tr) 50% 100%) top / 100% 50% no-repeat,
    linear-gradient(to right, var(--dashboard-switch-bl) 0 50%, var(--dashboard-switch-br) 50% 100%) bottom / 100% 50% no-repeat;
  overflow: hidden;
  cursor: grab;
}

.dashboard-color-switch-slider .rc-slider-handle::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.44);
  opacity: 1;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.dashboard-color-switch-slider .rc-slider-handle:active {
  cursor: grabbing;
}

.dashboard-color-switch-slider .rc-slider-handle:hover,
.dashboard-color-switch-slider .rc-slider-handle:focus,
.dashboard-color-switch-slider .rc-slider-handle:focus-visible {
  border-color: #b8c7dc;
  box-shadow: 0 4px 10px rgba(12, 22, 36, 0.26);
}

.dashboard-color-switch-slider .rc-slider-handle:hover::after,
.dashboard-color-switch-slider .rc-slider-handle:focus::after,
.dashboard-color-switch-slider .rc-slider-handle:focus-visible::after,
.dashboard-color-switch-slider .rc-slider-handle:active::after,
.dashboard-color-switch-shell--panel-open .dashboard-color-switch-slider .rc-slider-handle::after {
  opacity: 0;
}

.dashboard-color-custom-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: -2px;
  z-index: 1200;
  width: min(92vw, 704px);
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(208px, 1fr));
  gap: 12px;
  padding: 0 14px;
  max-height: 0;
  opacity: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--dashboard-panel-surface);
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  transform: translateY(-8px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.2s ease, max-height 0.2s ease, padding 0.18s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-color-custom-panel::before {
  content: "";
  position: absolute;
  top: -8px;
  right: 28px;
  width: 14px;
  height: 14px;
  background: #f8faff;
  border-top: 1px solid var(--dashboard-panel-border);
  border-left: 1px solid var(--dashboard-panel-border);
  transform: translateY(4px) rotate(45deg);
  opacity: 0;
  transition: opacity 0.16s ease, transform 0.2s ease;
}

.dashboard-color-custom-panel--open {
  max-height: 560px;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  transform: translateY(0) scale(1);
  padding: 14px;
  border-color: var(--dashboard-panel-border);
  box-shadow: var(--dashboard-panel-shadow);
}

.dashboard-color-custom-panel--open::before {
  opacity: 1;
  transform: translateY(0) rotate(45deg);
}

.dashboard-color-picker-item {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dce4f2;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.18s ease;
}

.dashboard-color-picker-item:hover,
.dashboard-color-picker-item:focus-within {
  background: #ffffff;
  border-color: #b8caf1;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.dashboard-color-picker-title {
  font-size: 0.72rem;
  line-height: 1;
  color: #344054;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dashboard-color-picker-control {
  width: 100%;
  min-width: 0;
}

.dashboard-color-picker-control .mantine-ColorPicker-root {
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.dashboard-color-picker-control .mantine-ColorPicker-wrapper {
  width: 100%;
  min-width: 0;
}

.dashboard-color-picker-control .mantine-ColorPicker-saturation {
  width: 100% !important;
  border-radius: 9px;
  border: 1px solid #d9e2f0;
  overflow: hidden;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.05);
}

.dashboard-color-picker-control .mantine-ColorPicker-slider {
  width: 100% !important;
  border-radius: 999px;
  border: 1px solid #d9e2f0;
  background: #e9f0fb;
}

.dashboard-color-picker-control .mantine-ColorPicker-preview {
  border: 1px solid #d9e2f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.dashboard-color-picker-control .mantine-ColorPicker-thumb {
  border: 1px solid rgba(27, 52, 105, 0.24) !important;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 89, 255, 0.24) !important;
}

@media (max-width: 900px) {
  .dashboard-color-switch-shell {
    width: min(70vw, 72px);
  }

  .dashboard-color-switch-slider-wrap {
    width: min(70vw, 72px);
  }

  .dashboard-color-custom-panel {
    width: min(94vw, 620px);
  }
}

@media (max-width: 620px) {
  .dashboard-color-custom-panel {
    width: min(94vw, 360px);
    grid-template-columns: 1fr;
  }
}

.subnavAnalysisBiasButton {
  background: none;
  border: none;
  font-size: 0.9rem;
  padding: 0 15px;
  /* The subnav shell owns the 1px top/bottom dividers, so the interactive
     buttons must fit inside the content box instead of covering those lines. */
  height: calc(var(--subnav-height) - 2px);
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  outline: none;
  box-sizing: border-box;
  position: relative;
}
.subnavAnalysisBiasButton::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  /* Keep the complete indicator inside horizontally scrollable subnav hosts.
     Their required overflow-y clipping used to hide the final pixel. */
  bottom: 0;
  height: 0;
  opacity: 0;
  background-color: #0059ff;
  transition: height 0.2s ease, opacity 0.2s ease;
  pointer-events: none;
}

.subnavAnalysisBiasButton:hover {
  color: #343A40;
  background-color: #e1ebf5 !important;
  outline: none;
}
.subnavAnalysisBiasButton:hover::after,
.subnavAnalysisBiasButton.active::after {
  height: 4px;
  opacity: 1;
}

.subnavAnalysisBiasButton.active {
  color: #343A40;
  background-color: #e1ebf5 !important;
}

.subnavAnalysisBiasButton.tb-subnav-compound {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.tb-subnav-compound__label {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  line-height: 1;
}

.tb-subnav-compound__close {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  margin: 0;
  color: currentColor;
  opacity: 0.72;
  font-size: 0;
  line-height: 0;
  text-align: center;
}

.tb-subnav-compound__close::before,
.tb-subnav-compound__close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.75px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}

.tb-subnav-compound__close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}

.tb-subnav-compound__close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.subnavAnalysisBiasButton:hover .tb-subnav-compound__close,
.subnavAnalysisBiasButton.active .tb-subnav-compound__close,
.subnavAnalysisBiasButton.subnavAnalysisBiasButtonActive .tb-subnav-compound__close {
  opacity: 1;
}

.tb-subnav-actions,
.tb-subnav-action-cluster {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 100%;
  padding-right: 10px;
  flex: 0 0 auto;
}

.tb-icon-btn {
  padding: 0 10px;
  min-width: 40px;
  border-bottom: 0px solid #ccc;
  background-clip: padding-box;
}

.tb-icon-btn::after {
  display: none;
}

.tb-subnav-icon-action {
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background-color: transparent !important;
  opacity: 0.78;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-clip: padding-box;
  transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

.tb-subnav-icon-action::after {
  content: none;
  display: none;
}

.tb-subnav-icon-action:hover,
.tb-subnav-icon-action:focus-visible,
.tb-subnav-icon-action[aria-expanded="true"],
.tb-subnav-icon-action.active,
.tb-subnav-icon-action.is-active {
  background-color: transparent !important;
  border-color: #0059ff;
  opacity: 1;
  outline: none;
}

.tb-subnav-icon-action:disabled {
  background-color: transparent !important;
  opacity: 0.38;
  cursor: not-allowed;
  border-color: transparent;
}

.tb-icon-btn__icon,
.tb-subnav-icon-action__icon {
  width: 22px;
  height: 22px;
  display: block;
}

.tb-subnav-action-cluster--compact {
  gap: 6px;
}

.tb-subnav-action-cluster--scrollable {
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.tb-subnav-action-cluster__group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 100%;
}

.tb-subnav-action-cluster__feedback {
  align-self: center;
  color: #4a5568;
  font-size: 12px;
}

.tb-subnav-action-separator {
  display: inline-flex;
  width: 1px;
  height: 22px;
  background: #d8e0ec;
}

.intel-subnav-buttons {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0;
}

.analysis-date-picker-icon {
  height: 18px;
  width: 18px;
  margin-left: 10px !important;
}

.analysis-date-picker-input {
  height: 34px !important;
  min-height: 34px;
  line-height: 34px;
  padding-right: 17px;
  padding-left: 45px;
}

.analysis-date-picker-input:hover {
  border: 1px solid #0059ff;
  box-shadow: 0px 0px 0px rgba(0,0,0,.06);
}

.analysis-date-picker-input:active {
  border: 1px solid #0059ff;
  box-shadow: 0px 0px 0px rgba(0,0,0,.06);
}
