/* HIV dashboard */
.hccf-results {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  }
  
  .hccf-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  }
  
  /* Pie chart overrides: light green filled (#D3E8D0), dark green rest (#5f8339) */
  .hccf-pie {
  display: inline-block;
  --w: clamp(120px, 20vw, 160px);
  margin-bottom: 0.5rem;
  }
  
  .diagnosed-pie{
    --c: #ff5a5a;
    color: #ff5a5a;
    
  }
  
  .treatment-pie{
    
    --c: #d5272d;
    color: #d5272d;
  }
  
  .viral-pie{
    --c: #ae2227;
    color: #ae2227;
  }
  
  .hccf-pie::before {
  background:
  radial-gradient(farthest-side, var(--c) 98%, #0000) top/var(--b) var(--b) no-repeat,
  conic-gradient(var(--c) calc(var(--p) * 1%), #b37e8061 0);
  background-size: 0 0, auto;
  }
  
  .hccf-result-text {
    display: inline-block;
    margin: 0;
    text-wrap: balance;
  }
  
  /* Responsive: stack on small screens */
  @media (max-width: 768px) {
    .hccf-results {
      grid-template-columns: 1fr;
      gap: 1.5rem;
    }
  }
  
  @media (max-width: 480px) {
    .hccf-pie {
      --b: 24px;
    }
  }
  
  @media (min-width: 992px) {
  html[lang="fr"] #red-ribbon {
    margin-top: 20px; /* Adjust as needed */
  }
  }
  
  .optionDropdown {
    text-overflow: ellipsis
  }
  
  /*slider*/
  .hiv-year-slider {
    margin: 0px 15px 35px;
  }
  .noUi-connect {
    background: #ae2227;
  }
  
  .noUi-touch-area{
    border: 1px solid darkgray;
    border-radius: 2px;
    background: lightgray;
  }
  .noUi-handle-lower::before, .noUi-handle-lower::after, .noUi-handle-upper::before, .noUi-handle-upper::after{
    background: darkgray;
  }
  
  .noUi-pips {
    color: #000;
  }
  
  .noUi-marker {
    background: #000;
  }
  
  .noUi-value-large {
    font-size: 15px;
    text-align: center;
  }
  
  .noUi-tooltip {
    display: none;
  }
  .noUi-handle:hover, .noUi-handle:focus{
    outline: auto;
    .noUi-tooltip {
        display: block;
    }
  }
  
  /*figures*/
  .legend-title tspan {
    font-weight: 600;
    font-size: 20px;
    text-anchor: middle;
  }
  
  .legend .legend-group text {
    font-size: 20px;
  }
  
  /* Dense year axes (fig 2 / 5 / 7): show every 7th tick label */
  /*#fig2-container .c .tick text,*/
  /*#fig5-container .c .tick text,*/
  /*#fig7-container .c .tick text {*/
  /*  visibility: hidden;*/
  /*}*/
  /*#fig2-container .c .tick:nth-of-type(7n-6) text,*/
  /*#fig5-container .c .tick:nth-of-type(7n-6) text,*/
  /*#fig7-container .c .tick:nth-of-type(7n-6) text {*/
  /*  visibility: visible;*/
  /*  transform: translate(0px, 5px);*/
  /*}*/
  
  /* Side legends (line/bar charts) — stack on desktop, wrap on tablet */
  .hiv-side-legend {
    margin-top: 10vh;
  }
  .hiv-side-legend li {
    display: block !important;
  }
  .hiv-side-legend .legend-text {
    line-height: 1.1em;
    margin: 8px 0;
  }
  
  .hiv-pie-legend {
    margin-bottom: 10px;
    li {
      display: inline-block !important;
    }
  }
  
  .hiv-pie-legend abbr[title] {
    position: relative;
    text-decoration: underline dotted;
    cursor: help;
    text-underline-offset: 0.1em;
  }

  .center-text {
    text-align: center;
  }
  
  #fig3-container, #fig3b-container, #fig6-container, #fig6b-container {
    text {
      font-size: 17px;
    }
  }
  
  /* #fig3b-legend {
    display: inline-block !important;
  } */
  #fig7-legend {
    font-size: 16px;
    /* margin-top: 8vh; */
  }
  
  #fig8-legend {
    margin-top: 10vh;
    font-size: 16px;
  }
  #fig8-container .tick text {
    font-size: 13px;
  }
  
  #fig8-container .tick text:lang(fr) {
    font-size: 12px;
  }
  #fig8-container .bar-group:first-of-type .bar-label {
    font-size: 11px;
  }
  #fig8-container .bar-label, #fig8b-container .bar-label {
    /*fill: white;*/
    font-weight: bold;
    transform: translate(0, 1px);
  }
  
  #fig9-legend {
    margin-top: 0;
    font-size: 16px;
  }
  
  @media all and (max-width: 991px) {
    .hiv-side-legend {
      margin-top: 0 !important;
    }
    .hiv-side-legend li {
      display: inline-block !important;
    }
    
  }
  
  /* Dual pies: primary legend on the right; fallback under left pie on small screens */
  .hiv-pie-legend-fallback-title,
  .hiv-pie-legend-fallback {
    display: none;
  }
  @media (max-width: 768px) {
    .hiv-pie-legend-fallback-title,
    .hiv-pie-legend-fallback {
      display: block;
    }
  }
  
  .tooltip {
    max-width: 100% !important;
    /*.tooltip-value {*/
    /*  white-space: nowrap;*/
    /*}*/
    white-space: nowrap;
  }
  
  .nowrap {
    white-space: nowrap;
  }

/* Tables — red scheme (override GC blue / Bootstrap bg-primary) */
table.dataTable thead th,
.wb-table thead tr.bg-primary > th,
.wb-table thead tr.bg-primary > td,
table.table thead tr.bg-primary > th,
table.table thead tr.bg-primary > td {
  background-color: #ae2227 !important;
  border-color: #8f1c20 !important;
  color: #fff;
}
table.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fdf2f2;
}
table.table-hover > tbody > tr:hover {
  background-color: #f8dede;
}
table.dataTable thead .sorting_asc {
  background-image: url(/src/img/sorting-icons/sort_asc.png)!important;
  padding-right: 15px;
}
table.dataTable thead .sorting_desc {
  background-image: url(/src/img/sorting-icons/sort_desc.png)!important;
  padding-right: 15px;
}
table.dataTable thead .sorting {
  background-image: url(/src/img/sorting-icons/sorting_both.png)!important;
  padding-right: 15px;
}
table.dataTable thead .sorting,
table.dataTable thead .sorting_asc,
table.dataTable thead .sorting_desc,
table.dataTable thead .sorting_asc_disabled,
table.dataTable thead .sorting_desc_disabled {
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center right;
}
.dataTables_wrapper .dataTables_info:after {
  content: none !important;
}
caption {
  text-align: left;
}
.table-responsive {
  padding-right: 2px;
}


#fig1-textDescContainer, #fig3-textDescContainer, #fig4-textDescContainer, #fig6-textDescContainer {
  thead tr  > :not(:first-child){
    text-align: right;
  }
  tbody tr  > :not(:first-child){
    text-align: right;
  }
}

#fig2-textDescContainer, #fig5-textDescContainer, #fig7-textDescContainer, #fig8-textDescContainer, #table-1, #fig9-textDescContainer {
  thead tr  > :nth-child(n+3){
    text-align: right;
  }
  tbody tr  > :nth-child(n+3){
    text-align: right;
  }
}
