/*
Theme Name: Twenty Twenty-Five Chart Child
Theme URI: http://localhost/chartv8/
Description: Child theme for Twenty Twenty-Five for the charting application.
Author: Your Name
Template: twentytwentyfive
Version: 1.0.0
*/
/* Import the parent stylesheet */
/* @import url("../twentytwentyfive/style.css"); */

/* * Your custom styles.css should go here, but loaded via functions.php (Step 4).
 * You can paste your chart-specific CSS into this file if it's simpler.
*/



:root {
  --primary-bg-color: #0e3040;
  --secondary-bg-color: #124054;
  --inactive-color: #67809f;
  --accent-color: #ffa117;
  --accent: #7be3ff;
  --text-color: #ffffff;
  --text-dim: #9eb1c7;
  --border-radius: 10px;
  --menu-color: #124054;
  --font-family: 'Poppins', sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--primary-bg-color);
  color: var(--text-color);
  margin: 0;
}

/* ================================
   TOP BAR & SEARCH BAR
================================ */
.top-bar {
  position: relative;
  background-color: var(--secondary-bg-color);
  padding: 10px;
  border-radius: var(--border-radius);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 12;
}

.top-bar-line-1 {
  display: flex;
  align-items: center;
  gap: 15px;
  border: 1px solid #1a5e78;
  padding: 2px 5px;
  border-radius: var(--border-radius);
}

/* search bar container */
.search-bar {
  position: relative;
  flex-grow: 1;
  display: flex;
  align-items: center;
  padding: 8px 10px;
  padding-left: 35px;
  background: var(--primary-bg-color);
  border-radius: var(--border-radius);
  /* border: 1px solid #1a5e78; */
  /* flex-wrap: wrap; */
  max-width: calc(100% - 203px);
}

.search-bar:focus-within {
  outline: none;
  /* border-color: var(--accent-color);
  box-shadow: 0 0 0 1px var(--accent-color); */
}

/* magnifying glass icon */
.search-bar>.fa-search {
  margin-right: 8px;
}

/* fade/slide + spacing collapse */
.search-bar .fa-search {
  color: var(--text-dim);
  transition:
    opacity 180ms ease,
    transform 180ms ease,
    margin-right 180ms ease,
    max-width 180ms ease;
  display: inline-block;
  max-width: 20px;
  overflow: hidden;
}

.search-bar.typing .fa-search {
  opacity: 0;
  transform: translateX(-6px);
  margin-right: 0;
  max-width: 0;
}

/* selected items container */
#selectedItemsContainer {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  padding-right: 5px;
  width: max-content;
  max-width: calc(100% - 100px);
  flex-shrink: 0;
  position: relative;
}

/* input */
.search-input {
  flex-grow: 1;
  min-width: 100px;
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
  color: var(--text-color);
  font-size: 15px;
}

.search-input:focus {
  outline: none;
  border-color: transparent;
  box-shadow: none;
  border: none;
}

/* ================================
   SEARCH PILLS
================================ */
.search-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border-radius: 16px;
  border: 1px solid var(--border-color, #ddd);
  background-color: var(--pill-bg, #f4f4f4);
  color: #8FB0C2;
  font-weight: 500;
  font-size: 0.85rem;
  width: max-content;
  position: relative;
  cursor: pointer;
}

.search-pill i.fa-cog {
  /* color: #555; */
  font-size: 0.7rem;
  /* cursor: pointer; */
}

.search-pill .remove-pill {
  color: inherit;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  margin-left: 4px;
}

.search-pill .remove-pill:hover {
  color: #000;
}

/* ================================
   PILLS / BUTTONS / DROPDOWNS
================================ */
.pill {
  background-color: var(--accent);
  color: var(--text-color);
  padding: 5px 12px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  font-size: 14px;
  user-select: none;
}

.pill:hover {
  background-color: #ffb54a;
}

.pill:active {
  transform: scale(0.98);
}

.pill-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.top-bar-line-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-toolbar-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.chart-toolbar-controls .right-controls {
  display: flex;
  gap: 15px;
  align-items: center;
}

.chart-toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border: 1px solid #336a83;
  border-radius: var(--border-radius);
}

.chart-toolbar-group.no-border {
  border: none;
  padding: 0;
}

.chart-dropdown-label {
  font-size: 13px;
  color: var(--text-dim);
  user-select: none;
}

.dropdown {
  background-color: transparent;
  border: none;
  color: var(--text-color);
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  outline: none;
}

.dropdown:hover {
  background-color: #1a5e78;
}

.dropdown:focus {
  box-shadow: 0 0 0 2px var(--accent-color);
}

.dropdown option {
  background-color: var(--secondary-bg-color);
  color: var(--text-color);
}

@media (max-width: 768px) {
  .main-chart-wrapper {
    height: 420px;
  }

  /* was 320px */
  body {
    padding: 10px;
  }

  .top-bar-line-1,
  .top-bar-line-2 {
    flex-direction: column;
    align-items: stretch;
  }

  .chart-toolbar-controls,
  .chart-toolbar-controls .right-controls {
    flex-wrap: wrap;
    gap: 8px;
  }

  .chart-toolbar-group {
    border: none;
    padding: 0;
  }

  .main-chart-wrapper {
    height: 320px;
  }

  #label-toolbar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    width: min(94vw, 560px);
  }
}

/* ================================
   AUTOCOMPLETE DROPDOWN
================================ */
.autocomplete {
  position: absolute;
  top: 100%;
  left: 10px;
  background: var(--menu-color);
  border-radius: var(--border-radius);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  /* width: calc(100% - 60px); */
  width: 100%;
  max-height: 260px;
  /* overflow-y: auto; */
  z-index: 15;
  margin-top: 5px;
  display: none;
}

.search-result-item {
  padding: 10px 15px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-color);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.search-result-item:hover {
  background-color: var(--primary-bg-color);
  background-color: rgba(14, 48, 64, 0.5);

}

.search-result-item.selected,
.search-result-item[aria-selected="true"] {
  /* background-color: var(--accent-color); */
  /* color: #000; */
}

/* ================================
   CHART CONTAINER & LABELS
================================ */
.chart-container {
  display: flex;
  flex-direction: column;
  background-color: var(--secondary-bg-color);
  border: 1px solid #1a5e78;
  border-radius: var(--border-radius);
  padding: 15px;
  margin-bottom: 20px;
}

.chart-container .chart-title {
  color: var(--text-color);
  font-size: 18px;
  margin-bottom: 10px;
  display: flex;
  /* justify-content: space-between; */
  align-items: center;
  justify-content: center;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.main-chart-wrapper {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

#chartCanvas {
  flex: 1 1 auto;
  width: 100% !important;
  height: 100% !important;
  background-color: var(--secondary-bg-color);
  border-radius: var(--border-radius);
  display: block;
}

/* label layer */
#label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ce-label {
  position: absolute;
  background: rgba(14, 48, 64, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 13px;
  pointer-events: auto;
  color: #fff;
  min-width: 60px;
}

.ce-label .ce-del {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: rgba(255, 71, 71, 0.9);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 10px;
  cursor: pointer;
}

.ce-label.ce-selected {
  outline: 1px solid #ffa117;
}

/* label toolbar */
#label-toolbar {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #0e3040;
  border: 1px solid #1a5e78;
  border-radius: 10px;
  padding: 6px 10px;
  display: none;
  gap: 8px;
  align-items: center;
  z-index: 9999;
}

#label-toolbar input,
#label-toolbar select {
  background-color: var(--secondary-bg-color);
  color: var(--text-color);
  border: 1px solid #336a83;
  border-radius: 4px;
  padding: 2px 6px;
}

#label-toolbar button {
  background: var(--accent-color);
  border: none;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

/* ================================
   MINIMAP
================================ */
.minimap-chart-wrapper {
  position: relative;
  height: 90px;
  margin-top: 12px;
}

#minimapCanvasWrapper {
  position: relative;
  width: 100%;
  height: 80px;
  margin-top: 6px;
}

#minimapCanvas {
  width: 100% !important;
  height: 100% !important;
  background-color: var(--secondary-bg-color);
  border-radius: var(--border-radius);
  touch-action: none;
  margin: 0;
  display: block;
}

.minimap-brush {
  position: absolute;
  cursor: grab;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  top: 0;
  left: 0;
  width: 0;
  pointer-events: auto;
  user-select: none;
  transition: background-color 0.1s;
}

.minimap-brush.collapsed {
  cursor: ew-resize;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  width: 2px !important;
}

.minimap-brush:hover {
  background: rgba(255, 255, 255, 0.25);
}

.minimap-dim {
  position: absolute;
  background: rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.minimap-brush-handle {
  position: absolute;
  width: 12px;
  height: 100%;
  top: 0;
  cursor: ew-resize;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.minimap-brush-handle.left {
  left: -6px;
}

.minimap-brush-handle.right {
  right: -6px;
}

.minimap-brush-handle::before {
  content: '';
  display: block;
  width: 4px;
  height: 20px;
  border-radius: 2px;
  background: var(--text-color);
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* ================================
   APP FOOTER
================================ */
.app-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-dim);
  font-size: 13px;
}

.app-footer .footer-links a {
  color: var(--text-dim);
  margin-left: 10px;
  text-decoration: none;
}

.app-footer .footer-links a:hover {
  color: var(--accent-color);
}

/* ================================
   MOBILE
================================ */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }

  .top-bar-line-1 {
    flex-wrap: wrap;
  }

  .chart-toolbar-controls {
    gap: 8px;
  }

  .main-chart-wrapper {
    height: 55vh;
  }

  .autocomplete {
    width: 100%;
    left: 0;
  }

  #label-toolbar {
    width: 95%;
    left: 2.5%;
    transform: none;
  }
}

/* === Top bar second line layout === */

.top-bar-controls {
  display: flex;
  justify-content: space-between;
  /* left/right edges */
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 10px;
}

/* Individual date pills */
.date-pill {
  display: flex;
  align-items: center;
  background: var(--bg);
  border-radius: var(--radius-pill);
  flex: 0 0 auto !important;

  /* NEW â€” tighter top/bottom so pills match Today pill */
  padding: 4px 6px !important;
}


.date-pill-icon {
  font-size: 13px;
  color: var(--muted);
  margin-right: 2px;
}

/* Visible date inputs */
.date-pill input[type="date"] {
  background: none;
  border: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;

  /* NEW â€” cut intrinsic height */
  line-height: 1;
  height: 20px;

  min-width: 0;
  padding: 0 !important;
  margin: 0 !important;
  width: auto !important;
}

/* Tighten built-in Chrome/Edge padding + icon spacing */
.date-pill input[type="date"]::-webkit-datetime-edit {
  padding: 0 !important;
  margin: 0 !important;
}

.date-pill input[type="date"]::-webkit-calendar-picker-indicator {
  margin-left: -12px !important;
  /* was -10 */
  padding: 0 !important;
  width: 14px;
}

/* Reset (circular arrow) */
.date-reset-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--menu-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
}

/* OK pill */
.date-close-btn {
  padding: 5px 13px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #0e3040;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

/* Caret rotation on open */
.date-header-btn .caret {
  transition: transform .2s ease;
}

.date-header-btn[aria-expanded="true"] .caret {
  transform: rotate(-90deg);
}


/* ================================
   Chart overlays (labels/shapes/lines)
   ================================ */
.ce-overlay-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 50;
}

.ce-overlay-layer .chart-label,
.ce-overlay-layer .chart-shape,
.ce-overlay-layer .chart-line {
  pointer-events: auto;
}

.chart-label {
  background: rgba(11, 26, 44, 0.55);
  border: 1px dashed var(--border-color);
  border-radius: 12px;
  padding: 10px 14px;
  backdrop-filter: blur(6px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

.chart-label[contenteditable="true"] {
  outline: 2px solid rgba(252, 131, 121, .35);
}

.shape-remove,
.label-remove {
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: rgba(12, 30, 53, .95);
  border: 1px solid rgba(252, 131, 121, .45);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ce-rotate-handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 161, 23, .7);
  background: rgba(255, 161, 23, .15);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
  cursor: grab;
}

.chart-line .ce-rotate-handle {
  top: -8px;
  right: -8px;
}

.chart-shape .ce-rotate-handle {
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
}

/* ================================
   Annotate controls (toolbar row)
   ================================ */
.chart-toolbar-group.no-border {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-dropdown-label {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-color);
  opacity: .9;
}

.annotate-options.with-border {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--border-color);
  background: rgba(11, 26, 44, .55);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.annotate-btn {
  width: 36px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(83, 93, 125, .35);
  background: rgba(12, 30, 53, .9);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.annotate-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 161, 23, .55);
}

.annotate-btn:active {
  transform: translateY(0px);
}

.annotate-btn i {
  font-size: 14px;
}

/* ================================
   Date range inline (matches pills)
   ================================ */
.date-range-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border: 1px solid var(--border-color);
  background: rgba(11, 26, 44, .55);
  border-radius: 999px;
  backdrop-filter: blur(6px);
}

.date-pill {
  display: flex;
  align-items: center;
  padding: 0 10px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(83, 93, 125, .35);
  background: rgba(12, 30, 53, .9);
}

.date-pill input[type="date"] {
  background: transparent;
  border: none;
  color: var(--text);
  font-family: inherit;
  font-size: 12px;
  outline: none;
}

.date-range-separator {
  color: var(--text-color);
  opacity: .8;
}

.date-reset-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(83, 93, 125, .35);
  background: rgba(12, 30, 53, .9);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease;
}

.date-reset-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(252, 131, 121, .55);
}

/* ================================
   ANNOTATE TOOLBAR GROUP
================================ */

.annotate-options {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid #336a83;
  border-radius: 8px;
  background-color: var(--secondary-bg-color);
}

.annotate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 34px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.annotate-btn:hover {
  background-color: #1a5e78;
  color: var(--text-color);
}

.annotate-btn.active {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--text-color);
  border-color: var(--inactive-color);
}

/* ================================
   OVERLAY ELEMENTS
================================ */

.ce-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ce-item {
  position: absolute;
  pointer-events: auto;
  cursor: move;
}

.ce-label {
  padding: 6px 10px;
  font-weight: 700;
  font-size: 14px;
  color: #ffa117;
  border: 1px dashed var(--inactive-color);
  background: transparent;
  min-width: 80px;
  text-align: center;
}

.ce-remove {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fc8379;
  color: #000;
  font-size: 11px;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.ce-shape {
  border: 2px solid #ffa117;
  background: transparent;
}

.ce-line {
  height: 3px;
  background: #ffa117;
  transform-origin: left center;
}

style.css Displaying style.css.
/* ================================
   App Layout Skeleton
================================ */

/* Layout shell */
body.ce-layout {
  padding: 0;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Fixed header/footer */
.ce-header,
.ce-footer {
  height: 67.5px;
  flex: 0 0 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Middle workspace row */
.ce-main {
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 182.5px 1fr 182.5px;
  min-height: 0;
  /* critical for Chart.js sizing */
}

/* Sidebars */
.ce-sidebar {
  width: 150px;
  min-width: 150px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Center chart area padding */
.ce-content {
  min-width: 0;
  min-height: 0;
  padding: 10px;
  /* replaces body padding */
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* =========================================================
   CE WORKSPACE OVERRIDES (PASTE AT VERY BOTTOM OF style.css)
   Goal: chart above-the-fold + data panel below
========================================================= */

:root {
  --ce-header-h: 67.5px;
  --ce-footer-h: 100px;
  --ce-sidebar-w: 150px;
  --ce-gutter: 10px;
  --ce-side-gutter: 150px;
  /* try 24px first, 32px if you want more */
}

/* Fix header/footer sizing conflict */
.ce-header {
  height: var(--ce-header-h) !important;
  flex: 0 0 var(--ce-header-h) !important;
}

.ce-footer {
  height: var(--ce-footer-h) !important;
  flex: 0 0 var(--ce-footer-h) !important;
}

/* Ensure sidebars are exactly 150px */
.ce-sidebar {
  width: var(--ce-sidebar-w) !important;
  min-width: var(--ce-sidebar-w) !important;
}

/* Center column: create "workspace" that can split top/bottom */
.ce-content {
  padding: var(--ce-gutter) !important;
  min-height: 0;
  min-width: 0;
}

/* Two-row workspace inside the center column */
.ce-workspace {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 260px;
  /* bottom fixed for now */
  gap: var(--ce-gutter);
}

/* Top: chart + toolbar */
.ce-workspace-top {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--ce-gutter);
}

/* Remove extra spacing that pushes chart down */
.top-bar {
  margin-bottom: 0 !important;
  /* was 20px */
}

/* Chart container must be allowed to shrink/grow */
.ce-workspace-top .chart-container {
  margin-bottom: 0 !important;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* >>> This is the key: kill 70vh + min-height:480px behavior <<< */
.ce-workspace-top .main-chart-wrapper {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 1 auto;
  display: flex;
}

/* Canvas fills the available area */
#chartCanvas {
  width: 100% !important;
  height: 100% !important;
  flex: 1 1 auto;
}

/* Minimap stays a fixed height so main chart can breathe */
.ce-workspace-top .minimap-chart-wrapper {
  flex: 0 0 auto;
  height: 90px;
  /* matches your existing minimap rule */
}

/* Bottom: datapoint info panel */
.ce-data-panel {
  height: 100%;
  border: 1px solid #1a5e78;
  border-radius: var(--border-radius);
  background: var(--secondary-bg-color);
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ce-data-panel-title {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .9;
  margin-bottom: 8px;
}

.ce-data-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  font-size: 14px;
  color: var(--text-color);
  padding-right: 10px;
}

.resource-icons {
  display: flex;
  align-items: center;
  gap: 10px;
}

.resource-icons button {
  background: transparent;
  border: none;
  cursor: pointer;
}

.resource-icons button i {
  font-size: 14px;
}

/* If the old in-template footer still exists anywhere, hide it */
.app-footer {
  display: none !important;
}


/* =========================================================
   OPTION A â€” reclaim vertical space (keep proportions)
   Paste at VERY BOTTOM of style.css
========================================================= */

/* slightly tighter spacing globally in the center column */
:root {
  --ce-gutter: 8px;
  /* was ~12 */
}

/* center column padding + gaps */
.ce-content {
  padding: var(--ce-gutter) !important;
}

.ce-workspace {
  gap: var(--ce-gutter) !important;
}

.ce-workspace-top {
  gap: var(--ce-gutter) !important;
}

/* top bar: less padding + less internal gap, no bottom margin */
.top-bar {
  padding: 6px !important;
  /* was 10 */
  gap: 6px !important;
  /* was 10 */
  margin-bottom: 0 !important;
  /* was 20 in your base CSS */
}

/* search bar + toolbar rows: tighten */
.top-bar-line-1 {
  gap: 8px !important;
}

.top-bar-line-2 {
  gap: 8px !important;
}

/* chart container padding smaller */
.chart-container {
  padding: 8px !important;
  /* was 15 */
  margin-bottom: 0 !important;
}

/* chart title bar consumes less vertical space */
.chart-container .chart-title {
  margin-bottom: 6px !important;
  /* was 10 */
  font-size: 16px !important;
  /* was 18 */
}

/* minimap: smaller so main chart breathes */
.minimap-chart-wrapper {
  height: 72px !important;
  /* was 90 */
  margin-top: 8px !important;
  /* was 12 */
}

#minimapCanvasWrapper {
  height: 62px !important;
  /* was 80 */
  margin-top: 4px !important;
  /* was 6 */
}

/* IMPORTANT: ensure main chart can actually use freed space */
.ce-workspace-top .chart-container {
  min-height: 0 !important;
}

.ce-workspace-top .main-chart-wrapper {
  min-height: 0 !important;
}

/* If you are using the bottom data panel, keep it modest */
.ce-workspace {
  grid-template-rows: minmax(0, 1fr) 220px !important;
  /* was 260 */
}

.ce-main {
  column-gap: var(--ce-side-gutter);
}

/* --- Compact time strip (matches your mock) --- */
.time-strip {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  position: relative;
  /* anchor popover */
  white-space: nowrap;
}

/* Presets become light text tabs (not pills) */
.time-presets {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.time-tab {
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  line-height: 1;
}

.time-tab:hover {
  color: rgba(255, 255, 255, 1);
}

/* Active state: underline (compact and clear) */
.time-tab.is-active {
  color: rgba(255, 255, 255, 1);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

/* Date label (calendar + range) */
.time-range-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  /* keep it tight like mock */
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  cursor: pointer;
}

.time-range-label i {
  font-size: 14px;
  /* bigger icon like mock */
  opacity: 0.95;
}

/* Popover (date inputs) */
.time-range-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  background: var(--secondary-bg-color);
  border: 1px solid #1a5e78;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .35);
  z-index: 50;
}

.time-range-popover[hidden] {
  display: none;
}

/* ---------- Option C: Split omnibox dropdown (instruments + contextual groups) ---------- */
#suggestionsBox .omni-dropdown {
  display: flex;
  gap: 0;
  width: 100%;
  padding-top: 0;
  height: 260px;
}

#suggestionsBox .omni-left {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 8px;
  height: 260px;
  overflow-y: auto;
}

#suggestionsBox .omni-right {
  flex: 0 0 22%;
  min-width: 220px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  padding: 8px 10px;
}

#suggestionsBox .omni-right-title {
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
  opacity: 0.9;
  margin: 2px 0 8px;
}

#suggestionsBox .search-group-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 8px;
  cursor: pointer;
}

#suggestionsBox .search-group-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

#suggestionsBox .search-group-item .sgi-name {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
}

#suggestionsBox .search-group-item .sgi-meta {
  font-size: 11px;
  opacity: 0.85;
}

#suggestionsBox .omni-empty {
  padding: 10px 12px;
  opacity: 0.7;
  font-size: 12px;
}


#suggestionsBox .search-group-item.selected {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
}


/* Groups panel member text */
.sgi-name,
.sgi-meta {
  color: #fff;
  opacity: 0.85;
}

/* add css */
.upload {
  position: relative;
  overflow: hidden;
  display: inline-block;
  border-radius: 10px;
  width: 100%;
}

.upload:hover {
  background: rgba(255, 255, 255, 0.06);
}

.upload__input {
  /* font-size: 100px; */
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
  height: 100%;
  width: 100%;
}

.upload__btn {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: #fff;
  opacity: 0.85;
}


.title-dataset {
  text-transform: uppercase;
  display: block;
  font-size: 13px;
  margin-bottom: 10px;
}

.dataset-item {
  width: 200px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  margin-bottom: 10px;
}

.dataset-item:last-child {
  margin-bottom: 0;
  border-bottom: 0;
}

.sth-userdataset {
  padding: 10px;
  background-color: rgba(14, 48, 64, 0.5);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.datasets-group {
  font-size: 13px;
  border-radius: 10px;
  padding: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
}

.sth-setting-chart {
  display: none;
}

/*  */

.wheel-item {
  display: flex;
  gap: 5px;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
  padding-left: 15px;
  padding-right: 15px;
}

.wheel-item.set-line::before,
.wheel-item.set-border::before,
.wheel-item.set-type::before {
  content: "\f078";
  position: absolute;
  top: 2px;
  font-family: 'Font Awesome 5 Free';
  font-size: 13px;
  right: 17px;
  font-weight: 600;
  transition: all 0.2s ease-in-out;
}

.wheel-item.showop::before {
  transform: rotate(-90deg);
}

.wheel-item.set-color::before {
  display: none;
}

.wheel-item:last-child {
  margin-bottom: 0;
}

.size-number {
  width: 30px;
  padding: 2px 5px;
  margin: 0;
  text-align: center;
  border: 1px solid #fff;
  background-color: transparent;
  color: #fff;
  border-radius: 5px;
}

.setting-wheel-wrap {
  background: #0e3040;
  /* display: flex; */
  /* gap: 15px; */
  color: #fff;
  /* padding: 15px; */
  padding: 15px 0;
  border-radius: 5px;
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: max-content;
  opacity: 0;
  visibility: hidden;
  z-index: 999;
  min-width: 180px;
}

.setting-wheel-wrap.active {
  opacity: 1;
  visibility: visible;
}

.size-number::-webkit-inner-spin-button,
.size-number::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.color-picker {
  width: 18px;
  height: 18px;
  border: none;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

/* Chrome, Edge, Safari */
.color-picker::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-picker::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Firefox */
.color-picker::-moz-color-swatch {
  border: none;
  border-radius: 50%;
  border: 1px dashed;
}

/*  */
.color-border {
  width: 18px;
  height: 18px;
  border: none;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

/* Chrome, Edge, Safari */
.color-border::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-border::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Firefox */
.color-border::-moz-color-swatch {
  border: none;
  border-radius: 50%;
  border: 1px dashed;
}

/*  */
.wheel-item img {
  width: 18px;
}

.wheel-item.set-color span {
  padding: 2px 7px;
  display: inline-block;
  font-size: 13px;
}

.wheel-item select {
  background-color: #0e3040;
  color: #fff;
  border: none;
  padding: 2px 5px;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
  width: calc(100% - 23px);
  text-align: left;
  font-size: 13px;
}

.btn-app-wheel {
  border: none;
  color: #fff;
  padding: 5px 8px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.2s;
  outline: none;
  background-color: #1a5e78;
  width: 80%;
  margin: auto;
}

.wrap-adv-option ul li {
  list-style: none;
  margin-bottom: 5px;
  font-size: 13px;
}

.wrap-adv-option {
  padding: 10px;
  margin-top: 5px;
  border-top: 1px solid rgb(83 93 125 / 30%);
}

.wrap-adv-option ul li:last-child {
  margin-bottom: 0;
}

.btn-close-wheel {
  position: absolute;
  top: 5px;
  right: 5px;
  font-size: 14px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #8FB0C2;
}

.search-pill.more-btn {
  padding: 3px 10px;
}

.hidden-pills {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 99;
  background-color: #2f647b;
  padding: 10px 15px;
  border-radius: 10px;
  flex-direction: column;
  gap: 10px;
}

.sublist-settings {
  position: absolute;
  top: -10px;
  left: 100%;
  padding: 10px 15px;
  padding-left: 0;
  border-radius: 10px;
  background-color: #0e3040;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  visibility: hidden;
  opacity: 0;
}

.sublist-settings.active {
  visibility: visible;
  opacity: 1;
}

.type-chart-item {
  display: flex;
  gap: 5px;
  padding-left: 30px;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
}

.type-chart-item img {
  width: 18px;
}

.type-chart-item:last-child {
  margin-bottom: 0;
}

.type-chart-item.active::before {
  content: "\f00c";
  position: absolute;
  top: 2px;
  font-family: 'Font Awesome 5 Free';
  font-size: 14px;
  left: 8px;
  font-weight: 600;
}

.data_set_type {
  display: none;
}

.wrap-selected-type span {
  padding: 2px 9px;
  display: inline-block;
  font-size: 13px;
}

.wrap-selected-type {
  display: flex;
  gap: 5px;
  align-items: center;
}

.size_number {
  display: none;
}

.icon-border {
  width: 18px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/*  */
.icon-border>span {
  display: block;
  width: 100%;
  height: 1px;
  background-color: #ccc;
  padding: 0;
}

.icon-border span:nth-child(2) {
  height: 3px;
}

.icon-border span:nth-child(3) {
  height: 5px;
}

.setting-border {
  display: flex;
  gap: 5px;
  width: max-content;
  position: relative;
  padding-bottom: 10px;
  padding-left: 15px;
}

.setting-border:last-child {
  padding-bottom: 0;
}

.setting-border span {
  min-width: 95px;
  cursor: initial;
}

.border-transparency {
  background-color: #1a5e78;
  color: #fff;
  width: 40px;
  border: none;
  outline: none;
  padding-right: 15px;
  text-align: center;
}

.setting-border.wrap-transparency::after {
  content: "%";
  position: absolute;
  right: 4px;
  top: 0;
  pointer-events: none;
}

/* Chrome, Safari, Edge (WebKit) */
.border-transparency::-webkit-outer-spin-button,
.border-transparency::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.border-transparency {
  -moz-appearance: textfield;
}

.setting-border.wrap-width::after {
  content: "px";
  position: absolute;
  right: 4px;
  top: 0;
  pointer-events: none;
}

.border-width {
  background-color: #1a5e78;
  color: #fff;
  width: 40px;
  border: none;
  outline: none;
  padding-right: 20px;
  text-align: center;
  position: relative;
}

/* Chrome, Safari, Edge (WebKit) */
.border-width::-webkit-outer-spin-button,
.border-width::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.border-width {
  -moz-appearance: textfield;
}

.set_line {
  display: none;
}

.icon-set-line span {
  width: 100%;
  height: 3px;
  background-color: #ccc;
  display: block;
}

.wrap-selected-line {
  display: flex;
  align-items: center;
  gap: 15px;
}

.icon-set-line {
  display: flex;
  height: 3px;
  width: 18px;
  gap: 3px;
}

.set-line-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding-left: 30px;
  padding-bottom: 10px;
  position: relative;
}

.set-line-item:last-child {
  padding-bottom: 0;
}

.set-line-item.active::before {
  content: "\f00c";
  position: absolute;
  top: 2px;
  font-family: 'Font Awesome 5 Free';
  font-size: 14px;
  left: 8px;
  font-weight: 600;
}

.icon-gradient {
  width: 18px;
  height: 8px;
  background: linear-gradient(90deg, #fff, #000);
}

.wrap-gradient-type {
  display: flex;
  gap: 15px;
  align-items: center;
}

.setting-border.wrap-transparency {
  display: none;
}

.icon-pattern {
  width: 20px;
  height: 18px;
  border: 1px solid #ccc;
  background: repeating-linear-gradient(45deg,
      #ccc,
      #ccc 2px,
      transparent 2px,
      transparent 4px);
}

.wrap-pattern-type {
  display: flex;
  gap: 15px;
  align-items: center;
}

.set-gradient-item {
  display: flex;
  gap: 5px;
  padding-left: 35px;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
}

.set-gradient-item:last-child {
  margin-bottom: 0;
}

.set-gradient-item.active::before {
  content: "\f00c";
  position: absolute;
  top: 2px;
  font-family: 'Font Awesome 5 Free';
  font-size: 14px;
  left: 8px;
  font-weight: 600;
}

.setting-gradient {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 0;
  position: relative;
  padding-left: 5px;
  padding-right: 15px;
  padding-bottom: 20px;
}

.setting-gradient::before {
  content: "";
  width: 90%;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.12);
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.color-gradient {
  width: 18px;
  height: 18px;
  border: none;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

/* Chrome, Edge, Safari */
.color-gradient::-webkit-color-swatch-wrapper {
  padding: 0;
}

.color-gradient::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}

/* Firefox */
.color-gradient::-moz-color-swatch {
  border: none;
  border-radius: 50%;
  border: 1px dashed;
}

.pattern-chart-item {
  display: flex;
  gap: 5px;
  padding-left: 30px;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
}

.pattern-chart-item.active::before {
  content: "\f00c";
  position: absolute;
  top: 2px;
  font-family: 'Font Awesome 5 Free';
  font-size: 14px;
  left: 8px;
  font-weight: 600;
}

.data_set_pattern {
  display: none;
}

.gr-appearance select {
  appearance: none;
  -webkit-appearance: none;
  /* Safari */
  -moz-appearance: none;
  padding: 10px 15px;
  padding-right: 30px;
}

.gr-appearance {
  position: relative;
  padding: 0;
}

.gr-appearance .icon-appear {
  content: "";
  position: absolute;
  top: 11px;
  right: 9px;
  font-size: 13px;
}

.datatype-list {
  position: absolute;
  top: 100%;
  left: 0;
  padding: 10px 15px;
  padding-left: 0;
  border-radius: 10px;
  background-color: #0e3040;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  opacity: 0;
  visibility: hidden;
}

.datatype-list.active {
  opacity: 1;
  visibility: visible;
}

.chart-typechart-group {
  position: relative;
}

.type-chart-hd {
  display: flex;
  gap: 5px;
  padding-left: 30px;
  align-items: center;
  margin-bottom: 10px;
  position: relative;
  font-size: 14px;
}

.type-chart-hd img {
  width: 18px;
}

.sth-opacity {
  opacity: 0.3;
}

.wrap-type-selected {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.wrap-type-selected i {
  font-size: 12px;
}

.type-chart-hd.active::before {
  content: "✓";
  position: absolute;
  top: 2px;
  /* font-family: 'Font Awesome 5 Free'; */
  font-size: 14px;
  left: 8px;
  font-weight: 600;
}

#data_type_selected {
  text-transform: capitalize;
}

.wrap-type-selected span {
  font-size: 14px;
  padding: 5px 1px;
}

.legend-position-menu {
  position: absolute;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--inactive-color);
  border-radius: 6px;
  top: 3px;
  left: 40px;
  z-index: 10;
  width: 120px;
  padding: 7.5px;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
}

.legend-position-menu.hidden {

  opacity: 0;
  visibility: hidden;
}

.gr-legend {
  position: relative;
}

.icon-appear {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-position-option {
  display: flex;
  align-items: center;
  padding-left: 8px;
  height: 32px;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  box-sizing: border-box;
  background-color: transparent;
}

.legend-position-option::before {
  content: "";
  width: 16px;
  height: 16px;
  margin-right: 8px;
  display: inline-block;
}

.legend-position-option.active::before {
  content: "✓";
  color: white;
  font-size: 13px;
  margin-right: 8px;
  display: inline-block;
}

.icon-appear {
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

#legendSVGIcon.legend-icon-border:hover .legend-box,
#legendSVGIcon .legend-box {
  fill: #1a5e78;
}

.legend-position-dropdown {
  position: relative;
  display: inline-block;
  top: 5px;
  left: 15px;
}