/*
 * Custom CSS for MBRRACE SOTN report
 *
 */

.mortality-rate-category-suppressed {
  fill: #eeeeee;
}
.mortality-rate-category-more-than-15-percent-lower {
  fill: #4caf50;
}
.mortality-rate-category-between-5-and-15-percent-lower {
  fill: #ffeb3b;
}
.mortality-rate-category-within-5-percent {
  fill: #ff9800;
}
.mortality-rate-category-more-than-5-percent-higher {
  fill: #f44336;
}

.mortality-rate-category-suppressed,
.mortality-rate-category-more-than-15-percent-lower,
.mortality-rate-category-between-5-and-15-percent-lower,
.mortality-rate-category-within-5-percent,
.mortality-rate-category-more-than-5-percent-higher {
  fill-opacity: 0.5;
}

.navbar-brand img {
  max-height: 80px;
}

.logo-strip img {
  max-height: 75px;
}

.text-bg-mbrrace-purple {
  color: #ffffff !important;
  background-color: #6a3b77 !important;
}

.text-bg-mbrrace-gray {
  color: #323132 !important;
  background-color: #eaeaea !important;
}

section {
  margin-bottom: 3rem;
}

.rounded-box {
  padding-left: 1rem;
  padding-top: 1rem;
  padding-right: 1rem;
  /* padding-bottom: 0.25rem; */
  border-width: 2px;
  border-style: solid;
  border-color: #6a3b77;
  border-radius: 0.2rem;
  margin-bottom: 1rem;
  /* margin-top: -8px; */
}

/* Override Bootstrap styles */

/* .alert-info {
  background-color: #deeaf6; */
/* color: #deeaf6; */
/* border: 1px solid #deeaf6;
} */

/* Adjust rounded corners from the accordion */
.accordion-button {
  border-radius: 0.2rem !important;
}

.accordion-item {
  border-radius: 0.2rem !important;
}

.accordion-header {
  border-radius: 0.2rem !important;
}

/* Remove rounded corners from alerts */
.alert {
  border-radius: 0.2rem !important;
}

.chart-container {
  margin-top: 10px; /* Adjust the value as needed for the desired padding */
  margin-bottom: 10px;
}

.chart-container-legend {
  margin-top: 0px; /* Adjust the value as needed for the desired padding */
  margin-bottom: 0px;
  margin-left: auto;
  margin-right: auto;
}

/* Reduce the space between the legend and the charts */
#ethnicity-congenital-legend-chart {
  margin-top: 0px; /* Reduce space between the chart and legend */
  margin-bottom: 0px; /* Reduce bottom margin to bring it closer to the data sources */
}

.figure {
  width: 100%;
}

.figure-caption {
  fill: #333333;
  font-size: 1em;
  font-weight: bold;
}

.figure-sub-caption {
  fill: #333333;
  font-size: 1em;
  font-weight: bold;
  text-align: center;
  /* padding-top: 10px; */
  padding-bottom: 0px;
  margin-bottom: 0px;
}

table {
  border-collapse: collapse;
  width: 100%;
}

table th,
td {
  vertical-align: top;
  text-align: left;
  border: 1px solid #d3d3d3;
  padding: 8px;
}

/* Highcharts styles */

.highcharts-data-labels {
  z-index: 0 !important;
  pointer-events: none; /* Optional: prevents blocking mouse events */
}

.highcharts-figure {
  width: 100%;
  height: 400px;
  margin: 1em auto;
}

.highcharts-figure-small-multiple {
  display: inline-block;
  padding: 0;
  height: 250px;
}

.highcharts-plot-line.mortality-rate-group-average {
  stroke: #701b75;
  stroke-width: 2px;
}

.highcharts-tooltip {
  z-index: 1000 !important;
  pointer-events: none;
}

#ethnicity-congenital-SB-chart.chart-container
  .highcharts-yaxis-grid
  .highcharts-grid-line {
  stroke: #ff4992 !important; /* Pink gridlines */
  stroke-dasharray: 2, 2 !important; /* Dotted style */
  stroke-width: 1px !important;
}

#ethnicity-deprivation-SB-chart.chart-container
  .highcharts-yaxis-grid
  .highcharts-grid-line {
  stroke: #ff4992 !important; /* Pink gridlines */
  stroke-dasharray: 2, 2 !important; /* Dotted style */
  stroke-width: 1px !important;
}

/* Custom dot color and size */
#ethnicity-congenital-SB-chart .highcharts-series .highcharts-point {
  stroke: transparent !important; /* No border on dots */
  r: 5 !important; /* Dot size */
}

/* Custom line between dots */
#ethnicity-congenital-SB-chart .highcharts-series .highcharts-graph {
  stroke: gray !important; /* Line color between dots */
  stroke-width: 1px !important; /* Line thickness */
  stroke-linecap: round !important; /* Smooth line ends */
}

#ethnicity-congenital-NND-chart .highcharts-yaxis-grid .highcharts-grid-line {
  stroke: #3dd9d4 !important; /* Teal gridlines */
  stroke-dasharray: 2, 2 !important; /* Dotted style */
  stroke-width: 1px !important;
}

#ethnicity-deprivation-NND-chart .highcharts-yaxis-grid .highcharts-grid-line {
  stroke: #3dd9d4 !important; /* Teal gridlines */
  stroke-dasharray: 2, 2 !important; /* Dotted style */
  stroke-width: 1px !important;
}

/* Custom dot color and size */
#ethnicity-congenital-NND-chart .highcharts-series .highcharts-point {
  stroke: transparent !important; /* No border on dots */
  r: 5 !important; /* Dot size */
}

/* Custom line between dots */
#ethnicity-congenital-NND-chart .highcharts-series .highcharts-graph {
  stroke: gray !important; /* Line color between dots */
  stroke-width: 1px !important; /* Line thickness */
  stroke-linecap: round !important; /* Smooth line ends */
}

/* Make the title with the custom class transparent */
.transparent-axis-title tspan {
  fill: transparent !important;
}

.mbrrace-stillbirth,
.mbrrace-stillbirth .highcharts-point,
.mbrrace-stillbirth .highcharts-point-hover,
.mbrrace-stillbirth .highcharts-point-select {
  fill: #ff0066;
  stroke: #ff0066;
}

.mbrrace-stillbirth-lighter,
.mbrrace-stillbirth-lighter .highcharts-point,
.mbrrace-stillbirth-lighter .highcharts-point-hover,
.mbrrace-stillbirth-lighter .highcharts-point-select {
  fill: #ff4992;
  stroke: #ff4992;
}

.mbrrace-stillbirth-darker,
.mbrrace-stillbirth-darker .highcharts-point,
.mbrrace-stillbirth-darker .highcharts-point-hover,
.mbrrace-stillbirth-darker .highcharts-point-select {
  fill: #840035;
  stroke: #840035;
}

.mbrrace-antepartum,
.mbrrace-antepartum .highcharts-point,
.mbrrace-antepartum .highcharts-point-hover,
.mbrrace-antepartum .highcharts-point-select {
  fill: #ff0066;
  stroke: #ff0066;
  stroke-dasharray: 1, 8; /* Set the dash type using stroke-dasharray */
}

.mbrrace-intrapartum,
.mbrrace-intrapartum .highcharts-point,
.mbrrace-intrapartum .highcharts-point-hover,
.mbrrace-intrapartum .highcharts-point-select {
  fill: #ff0066;
  stroke: #ff0066;
  stroke-dasharray: 1, 8; /* Set the dash type using stroke-dasharray */
}

.mbrrace-neonatal,
.mbrrace-neonatal .highcharts-point,
.mbrrace-neonatal .highcharts-point-hover,
.mbrrace-neonatal .highcharts-point-select {
  fill: #0f807c;
  stroke: #0f807c;
}

.mbrrace-neonatal-early-national,
.mbrrace-neonatal-early-national .highcharts-point,
.mbrrace-neonatal-early-national .highcharts-point-hover,
.mbrrace-neonatal-early-national .highcharts-point-select {
  fill: #0f807c;
  stroke: #0f807c;
  stroke-dasharray: 1, 8; /* Set the dash type using stroke-dasharray */
}

.mbrrace-neonatal-late-national,
.mbrrace-neonatal-late-national .highcharts-point,
.mbrrace-neonatal-late-national .highcharts-point-hover,
.mbrrace-neonatal-late-national .highcharts-point-select {
  fill: #0f807c;
  stroke: #0f807c;
  stroke-dasharray: 1, 8; /* Set the dash type using stroke-dasharray */
}

.mbrrace-neonatal-lighter,
.mbrrace-neonatal-lighter .highcharts-point,
.mbrrace-neonatal-lighter .highcharts-point-hover,
.mbrrace-neonatal-lighter .highcharts-point-select {
  fill: #3dd9d4;
  stroke: #3dd9d4;
}

.mbrrace-neonatal-darker,
.mbrrace-neonatal-darker .highcharts-point,
.mbrrace-neonatal-darker .highcharts-point-hover,
.mbrrace-neonatal-darker .highcharts-point-select {
  fill: #074442;
  stroke: #074442;
}

.mbrrace-neonatal-late,
.mbrrace-neonatal-late .highcharts-point,
.mbrrace-neonatal-late .highcharts-point-hover,
.mbrrace-neonatal-late .highcharts-point-select {
  fill: #333333;
  stroke: #333333;
  stroke-dasharray: 4, 4; /* Set the dash type using stroke-dasharray */
}

.mbrrace-neonatal-early,
.mbrrace-neonatal-early .highcharts-point,
.mbrrace-neonatal-early .highcharts-point-hover,
.mbrrace-neonatal-early .highcharts-point-select {
  fill: #333333;
  stroke: #333333;
  stroke-dasharray: 2, 4; /* Set the dash type using stroke-dasharray */
}

.mbrrace-neonatal-bubble,
.mbrrace-neonatal-bubble .highcharts-point,
.mbrrace-neonatal-bubble .highcharts-point-hover,
.mbrrace-neonatal-bubble .highcharts-point-select {
  fill: #3dd9d4;
  stroke: #3dd9d4;
}

.mbrrace-perinatal,
.mbrrace-perinatal .highcharts-point,
.mbrrace-perinatal .highcharts-point-hover,
.mbrrace-perinatal .highcharts-point-select {
  fill: #000000;
  stroke: #000000;
}

.mbrrace-dotted,
.mbrace-dotted .highcharts-point,
.mbrace-dotted .highcharts-point-hover,
.mbrace-dotted .highcharts-point-select {
  fill: grey;
  stroke: grey;
  stroke-dasharray: 2, 4; /* Set the dash type using stroke-dasharray */
}

.mbrrace-low,
.mbrrace-low .highcharts-point,
.mbrrace-low .highcharts-point-hover,
.mbrrace-low .highcharts-point-select {
  fill: #ff8000;
  stroke: #ff8000;
}
/* Override Highcharts series default colours */

.highcharts-root {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-size: 14px;
}

.highcharts-title {
  font-size: 1em;
  font-weight: bold;
  fill: #333333;
}

.highcharts-tooltip .highcharts-header,
.highcharts-axis-labels {
  font-size: 1em;
}

/* Decorative utilities from Bootstrap examples */

.icon-link:hover > .bi {
  transform: translate(0.25rem);
}
.icon-link > .bi {
  margin-top: 0.125rem;
  margin-left: 0.125rem;
  fill: currentcolor;
  transition: transform 0.25s ease-in-out;
}
