/* /inc/block/interactive-graphs/interactive-graphs.css */

/* External tooltip */

.alg-ig__exttip {
  position: fixed;
  z-index: 9999;
  max-width: 360px;
  background: #EAF2FF;  /* light blue like your mock */
  color: #0A2240;       /* navy */
  border: 1px solid #D6E5FF;
  border-radius: 10px;
  box-shadow: 0 8px 16px rgba(10,34,64,0.15);
  padding: 10px 12px;
}
.alg-ig__exttip-inner { font-size: 14px; line-height: 1.25; }
.alg-ig__exttip-q     { opacity: 0.85; margin-bottom: 4px; }
.alg-ig__exttip-val   { font-size: 17px; font-weight: 700; }

/* pointer (bubble above cursor) */
.alg-ig__exttip::after {
  content: "";
  position: absolute;
  left: 14px;
  bottom: -8px;
  width: 0; height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 8px solid #EAF2FF;
  filter: drop-shadow(0 -1px 0 #D6E5FF);
}
/* pointer flips when clamped below */
.alg-ig__exttip.is-below::after {
  bottom: auto;
  top: -8px;
  border-top: none;
  border-bottom: 8px solid #EAF2FF;
  filter: drop-shadow(0 1px 0 #D6E5FF);
}

/* Optional: slightly larger value for rank bubbles (#1: ...) */
.alg-ig__exttip.is-rank .alg-ig__exttip-val {
  font-size: 16px;
  line-height: 1.25;
}
/* ---- bubble css end --*/
.alg-ig {
  --bg: #F6F8FB;
  --card: #FFFFFF;
  --text: #1F2937;
  --muted: #64748B;
  --border: #E7EAF0;
  --blue: #1557FF;
  --navy: #0A2240;
  color: var(--text);
}

.alg-ig__header { padding: 0 16px 8px 16px; }
.alg-ig__title  { margin: 0 0 4px 0; font-size: 20px; font-weight: 600; }
.alg-ig__subtitle { margin: 0; color: var(--muted); }



.alg-ig__filter-toggle .chev {   transform: rotate(180deg); }
.alg-ig__filter-toggle[aria-expanded="false"] .chev { transform: rotate(0); }


.alg-ig__hq { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alg-ig__mini-title { margin: 0 0 8px 0; font-size: 14px; font-weight: 700; }

.alg-ig__top3 { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 8px 0; }
.alg-ig__top3-item {
  display: inline-flex; align-items: center; gap: 8px;
  background: #F1F5FF; border: 1px solid #E1E8FF; color: var(--navy);
  border-radius: 8px; padding: 6px 8px; width: fit-content;
}
.alg-ig__pill {
  background: var(--navy); color: white; display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 24px; font-size: 12px; font-weight: 700;
}
.alg-ig__top3-txt { font-size: 13px; }


.alg-ig canvas { width: 100%; height: auto; display: block; }
.alg-ig .alg-ig__canvas-wrap.audits{position: relative; height: 320px; }
.alg-ig .alg-ig__canvas-wrap.challenges{position: relative; height: 530px; }
.alg-ig .alg-ig__canvas-wrap.time{ position: relative; height: 200px;}
.alg-ig .alg-ig__canvas-wrap.compliance{ position: relative; height: 180px; }
.alg-ig .alg-ig__canvas-wrap.auditor{position: relative; height: 180px; } 

/* .alg-ig .alg-ig__canvas-wrap { position: relative; height: 320px; } */

/* Canvas fills its box — let Chart.js size it once from the container */
.alg-ig .alg-ig__canvas-wrap canvas { width: 100%; height: 100% !important; display: block; }
/* Pie section layout (canvas left, legend right) */
.alg-ig__time-flex {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

/* Keep the pie roughly square and responsive */
.alg-ig__time-flex .alg-ig__canvas-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;   /* adjust if needed */
  aspect-ratio: 1/1;  /* keep it square */
}

/* Right-hand legend */
.alg-ig__legend {
  display: grid;
  gap: 10px;
  min-width: 160px;
}
.alg-ig__legend-item {
  display: grid;
  grid-template-columns: 18px auto;
  align-items: center;
  gap: 10px;
  color: #0A2240; /* navy */
  font-size: 14px;
}
.alg-ig__legend-swatch {
  width: 18px;
  height: 18px;
  border-radius: 2px;
  background: #E7EAF0;
}

/* Make sure labels above bars aren’t clipped */
.alg-ig__canvas-wrap { overflow: visible; }

/* Ensure our overlay sits above canvas and isn't clipped by wrapper */
.alg-ig__chart { position: relative; overflow: visible; }
.alg-ig__labels { pointer-events: none; }

/* HQ lists */
.alg-ig__ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
.alg-ig__li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: stretch;
  gap: 12px;
  margin: 10px 0 16px;
}
.alg-ig__rank {
  color: #092249;
  font: 600 18px/1 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}
.alg-ig__bar {
    border-radius: 0;
    overflow: hidden;
    padding: 0 14px;
    min-height: 45px;
    display: flex;
    align-items: center;
}
.alg-ig__bar--variant-1 { background: #0A2240; } /* darkest */
.alg-ig__bar--variant-2 { background: #0F3B98; } /* medium */
.alg-ig__bar--variant-3 { background: #1652D6; } /* brighter */
.alg-ig__txt {
  color: #EAF1FF;
  font: 400 16px/1.25 "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.alg-ig__canvas-wrap.challenges {
  overflow: visible !important;
}

.alg-ig__canvas-wrap.challenges canvas {
  overflow: visible !important;
}
.alg-ig__filter-group[data-filter="industry"] .alg-ig__filter-body .alg-ig__check:first-child {
    display: none;
}
@media (max-width: 960px) {
  .alg-ig__wrap { grid-template-columns: 1fr; }
  .alg-ig__filters { position: static; }
}


@media (max-width: 768px) {

.alg-ig .alg-ig__canvas-wrap.audits{ height: 720px; }
  /* Your selects inserted by JS */
  .alg-ig__select {
    width: 100%;
    display: block;
    margin: 8px 0 12px;
    padding: 10px 12px;
    border: 1px solid #E7EAF0;
    border-radius: 6px;
    background: #fff;
    color: #0A2240;
    font-size: 14px;
  }

  /* Hide original checkbox bodies on mobile */
  .alg-ig__filter-body {
    display: none !important;
  }
  .alg-ig__hq {
    grid-template-columns: 1fr;
}
}
@media (max-width: 667px) {
  .alg-ig__time-flex {
    gap : 12px;
  }
  .alg-ig__exttip-inner {
    font-size: 13px;
    line-height: 18px;
}
.alg-ig__exttip-val {
    font-size: 13px;
    font-weight: 700;
}
.alg-ig__exttip {
    padding: 8px 10px;
}
}
@media (max-width: 400px) {
.alg-ig__legend-item span:nth-child(2) {
    width: 70%;
    line-height: 18px;
}
}
/* Desktop: hide the selects if JS left them behind during resize */
@media (min-width: 769px) {
  .alg-ig__select {
    display: none !important;
  }
}

