/* =============================================================
   GLOBAL FONT & HEADER LOGO
   ============================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body, button, input, select, textarea {
  font-family: 'Poppins', sans-serif !important;
}

/* Override GOV.UK headings and navigation */
h1, h2, h3, h4, h5, h6,
.govuk-heading-xl,
.govuk-heading-l,
.govuk-heading-m,
.govuk-heading-s,
.govuk-header,
.govuk-button,
.govuk-link,
.govuk-body,
.govuk-list,
.govuk-tabs__tab,
.govuk-footer {
  font-family: 'Poppins', sans-serif !important;
}


.container-fluid {
  padding: 0 !important;
}



.govuk-header__logotype-crown-fallback-image {
  width: 300px !important;
  height: 60px !important;
  margin-right: 150px;
}

header.govuk-header {
  background-color: #fff !important;
}

.govuk-width-container {
  max-width: 100% !important;
  margin-left: 0px !important;
  margin-right: 0px !important;
}

@media (min-width: 48.0625em) {
.govuk-width-container {
  margin-left: 0px !important;
  margin-right: 0px !important;
}
}


  @media (min-width: 768px) {
.govuk-width-container {
  margin-left: 0px !important;
  margin-right: 0px !important;
}
}



h1 {
  font-size: 38px !important;
  color: #31686B !important;
  font-family: 'Poppins' !important;
}

h1.govuk-heading-xl {
  margin-bottom: 20px;
}

h1.govuk-heading-s {
  font-size: 26px !important;
}


h3 {
  font-size: 24px !important;
  color: #31686B !important;
  font-family: 'Poppins' !important;
}

h4.govuk-heading-s {
    font-size: 20px !important;
  color: #31686B !important;
  font-family: 'Poppins' !important;
}

ul.govuk-list,
.govuk-body {
  color: #000 !important;
  font-family: 'Poppins' !important;
}

#fbs-shiny {
  margin-bottom: 50px !important;

}

#fbs-shiny * {
    font-family: 'Poppins' !important;
line-height: 1.3;
}

#fbs-shiny a,
#fbs-shiny li a{
  color: blue !important;
}

#fbs-shiny li {
  padding-bottom: 5px;
}

#fbs-shiny button.fbs-button,
.nav-tabs > li.active > a,
.nav-tabs > li.active,
.nav-pills > li.active > a,
.nav-pills > li.active {
background-color: #B7D6D9 !important;
  border-radius: 25px;
}

#fbs-shiny button.fbs-button,
.nav > li > a:hover {
    border-radius: 25px;
}

#fbs-shiny button.fbs-button {
padding: 10px 15px;
border: none;
margin-top: 10px;
}

#fbs-shiny button.fbs-button a {
  text-decoration: none;
  color: #2F4454 !important;
}

#custom-logo img {
  height: 40px !important;
  width: auto;
}

#banner {
  display: none;
}

#sidebar {
  margin-top: 10px;
  border: 2px solid #ccc;
  border-radius: 25px;
  padding: 10px;
}

#sidebar li.navbar-brand {
  display: none;
}

.nav-tabs {
  border: 2px solid #ccc;
  border-radius: 25px;
  padding: 10px;
  margin-top: 10px;
}

.nav-tabs li:first-of-type {
  display: none;
}

p, li a {
  color: #2F4454 !important;
}


.row {
  max-width: 1360px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
  box-sizing: border-box;
}

.govuk-grid-row {
  margin-left: 0px !important;
  margin-right: 0px !important;
}

.col-lg-1, .col-lg-10, .col-lg-11, .col-lg-12, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-md-1, .col-md-10, .col-md-11, .col-md-12, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-sm-1, .col-sm-10, .col-sm-11, .col-sm-12, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-xs-1, .col-xs-10, .col-xs-11, .col-xs-12, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9 {
padding-left: 0px !important;
padding-right: 0px !important;
}


/*.row .col-sm-2,*/
.row .col-sm-10 {
  width: 100% !important;
}

.col-sm-11 {
  width: 100%;
}

.nav > li {
  float: left;
}

@media (min-width: 48.0625em) {
  .govuk-header__link--homepage {
    display: block !important;
  }
}


footer .govuk-width-container {
  padding-left: 40px;
  padding-right: 40px;
}

.govuk-footer__meta {
  display: flex;
  flex-direction: column; /* stack items */
  align-items: center;    /* centre horizontally */
  text-align: center;     /* centre the text */
}

.govuk-footer__meta-item {
  margin: 5px 0;          /* small spacing between lines */
}

.govuk-footer__meta {
  display: flex;
  flex-direction: column-reverse; /* reverse the order of items */
  align-items: center;
  text-align: center;
}

.govuk-footer__meta-item {
  margin: 5px 0;
}

@media (max-width: 40.0525em) {
  .govuk-footer__meta-item--grow {
    flex-basis: auto !important;
  }
}

.promar-credit p {
  position: relative;
  bottom: 0px;
  right: 10px;
font-size: 50px !important;
}

/* =============================================================
   FORM CONTROL PANELS (SELECTS + RADIOS)
   ============================================================= */

.govuk-radios__input {
  height: 0px !important;
}

/* GRID LAYOUT ONLY APPLIES TO SELECT GROUPS */
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) {
  background-color: #B7D6D9;
  border: 1px solid #b1b4b6;
  border-radius: 25px;
  padding: 20px;
  margin-bottom: 20px;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px 20px;
  align-items: end;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: 0px;
  margin-right: 0px;
}




/* RADIOS: retain visual styling only (not grid layout) */
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-radios) {
  background-color: #B7D6D9;
  border-radius: 25px;
  padding: 20px;
  margin-bottom: 20px;
    margin-left: 0px;
  margin-right: 0px;
}

@media (min-width: 768px) {
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select),
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-radios){
  margin-left: 0px;
  margin-right: 0px;
}
}

@media (min-width: 48.0625em) {
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select),
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-radios){
  margin-left: 0px;
  margin-right: 0px;
}
}


.govuk-main-wrapper .govuk-form-group .govuk-select,
.govuk-main-wrapper .govuk-form-group .govuk-radios__input {
  background-color: #ffffff;
  border: 1px solid #b1b4b6;
  border-radius: 6px;
}

.govuk-main-wrapper .govuk-form-group .govuk-label {
  font-weight: 600;
  font-size: 1rem;
  color: #0b0c0c;
  margin-bottom: 4px !important;
  line-height: 1.2;
  display: block;
}


/* =============================================================
   SELECTS: RESPONSIVE GRID LAYOUT
   ============================================================= */

@media (max-width: 1200px) {
  .govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
  }
}
@media (max-width: 900px) {
  .govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 560px) {
  .govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) {
    grid-template-columns: 1fr;
  }
}

.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) [class*="col-"] {
  width: auto !important;
  float: none !important;
  padding: 0 !important;
}

.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) .govuk-form-group {
  margin: 0;
}

.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) .govuk-select,
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* =============================================================
   RADIOS: FULL-WIDTH GROUPS, INLINE BUTTONS, POLISHED
   ============================================================= */

/* Ensure the radio group fills full width */
.govuk-main-wrapper .govuk-grid-row > *:has(.govuk-radios) {
  grid-column: 1 / -1 !important;
  margin-top: 8px;
  margin-bottom: 12px;
}

/* Layout the radio items inline with wrapping */
.govuk-main-wrapper .govuk-grid-row .govuk-radios {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin: 0;
  padding: 0;
  align-items: center;
}

/* Style the radio option wrapper */
.govuk-main-wrapper .govuk-radios__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

/* ========================================
   RADIO BUTTONS: Custom Size & Clean Layout
   ======================================== */

/* Outer circle (unselected and selected state) */
.govuk-radios__input + .govuk-label.govuk-radios__label::before {
  width: 40px;
  height: 40px;
  border: 2px solid #000;
  background-color: #fff !important;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

/* Inner black dot (only when checked) */
.govuk-radios__input:checked + .govuk-label.govuk-radios__label::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 20px; /* align with ::before */
  width: 20px;
  height: 20px;
  background-color: #000;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Ensure label can host pseudo elements */
.govuk-label.govuk-radios__label {
  position: relative;
  padding-left: 50px; /* give space for larger custom radio */
  display: inline-flex;
  align-items: center;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.2;
  white-space: nowrap;
}

/* Optional: slight margin between radio groups */
.govuk-form-group + .govuk-form-group {
  margin-top: 12px;
}

.govuk-form-group > .govuk-label {
  margin-bottom: 4px !important;
  font-weight: 600;
}

.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-radios) {
  background-color: #B7D6D9;
  border-radius: 25px;
  padding: 20px;
  margin-bottom: 20px;
}

/* Input vertical alignment */
.govuk-main-wrapper .govuk-grid-row .govuk-radios__input {
  transform: translateY(1px);
}

/* Hint text position */
.govuk-main-wrapper .govuk-grid-row .govuk-hint {
  flex-basis: 100%;
  margin-top: 4px;
}

/* Mobile behaviour */
@media (max-width: 560px) {
  .govuk-main-wrapper .govuk-grid-row .govuk-radios {
    gap: 8px 12px;
  }
}

/* ===============================
   FORCE RADIO GROUPS ON OWN LINE
   =============================== */
.govuk-main-wrapper .govuk-grid-row > [class*="col-"]:has(.govuk-radios) {
  grid-column: 1 / -1 !important; /* Make each radio group span full width */
}

/* ===============================
   INLINE RADIO BUTTONS IN GROUPS
   =============================== */
.govuk-main-wrapper .govuk-radios {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* Ensure radio blocks inside a grid-row span full width of grid */
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select)
  .govuk-form-group:has(.govuk-radios) {
  grid-column: 1 / -1;
}

/* FIX FOR INLINE RADIO BUTTONS WHEN INSIDE GRID LAYOUT */
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) .govuk-radios {
  display: flex !important;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  margin: 0;
  padding: 0;
}

/* Ensure each .govuk-form-group containing radios is NOT a full-width block unless specified */
.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select) .govuk-form-group:has(.govuk-radios) {
  display: block; /* Treat like normal grid item */
  margin: 0;
  grid-column: auto !important;
}

/* =============================================================
   SPECIAL CASE: GRID ROWS WITH BOTH SELECTS AND RADIOS
   ============================================================= */

.govuk-main-wrapper .govuk-grid-row:has(.govuk-form-group .govuk-select):has(.govuk-form-group .govuk-radios) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 16px 20px;
  align-items: end;
  background-color: #B7D6D9;
  border: 1px solid #b1b4b6;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 20px;
  padding-left: 20px;
  padding-right: 20px;
}

/* Force radio options inline within group */
.govuk-main-wrapper .govuk-grid-row .govuk-radios {
  display: flex !important;
  flex-wrap: nowrap !important;   /* Prevent wrapping */
  gap: 20px;
}

/* Allow the whole radio group to stack below other blocks on mobile */
@media (max-width: 560px) {
  .govuk-main-wrapper .govuk-grid-row .govuk-radios {
    flex-wrap: wrap !important;   /* Allow wrap on mobile */
  }
}

/* Prevent radio labels breaking across lines (except on small screens) */
.govuk-label.govuk-radios__label {
  white-space: nowrap;
}

label span.govuk-label.govuk-radios__label {
  margin-top: -15px;
  font-weight: 200px !important;
}


@media (max-width: 560px) {
  .govuk-label.govuk-radios__label {
    white-space: normal;
  }
}

@media (min-width: 40.0625em) {
  .govuk-grid-column-one-quarter {
   width: 33% !important;
  }
}

@media (min-width: 40.0625em) {
  @media (min-width: 768px) {
    .col-sm-3 {
      width: auto !important;
    }
  }
}

  @media (min-width: 768px) {
  .col-sm-3 {
    width: auto !important;
  }
}

@media (min-width: 40.0625em) {
  @media (min-width: 768px) {
    .col-sm-2 {
      width: auto !important;
    }
  }
}

  @media (min-width: 768px) {
  .col-sm-2 {
    width: auto !important;
  }
}


@media (min-width: 40.0625em) {
  .govuk-grid-column-one-quarter {
    width: auto !important;
  }
}

/* =============================================================
   VISUALISATIONS
   ============================================================= */


.infolayer {
  margin-bottom: 50px;
}


/* 1) Make sure the plot area leaves room so the modebar never overlaps */
.plot-container.plotly .svg-container {
  /* space for a one-row modebar; bump to ~72px if your modebar wraps */
  padding-top: 56px;
}

/* 2) Park the modebar at the top-left and stop it stretching full width */
.plot-container.plotly .modebar-container {
  position: absolute !important;
  top: -22px !important;
  left: auto !important;
  right: 8px !important;
  bottom: auto !important;
  width: auto !important;   /* override Plotly’s inline width:100% */
  min-width: 250px !important;
  height: auto !important;
  z-index: 1000;            /* stay above the SVG */
  pointer-events: none;     /* so it doesn’t block plot interactions */
}

/* 3) Style the inner bar as a white pill with a thin black border */
.plot-container.plotly .modebar {
  pointer-events: auto;     /* re-enable clicks on the buttons */
  background: #fff;
  border-radius: 25px;
  padding: 4px 8px;         /* some breathing room around the icons */
}

g text.nums {
  font-family: "Poppins", sans-serif !important;
}


.js-plotly-plot .plotly,
.js-plotly-plot .plotly div,
g.traces > text {
font-family: 'Poppins', sans-serif !important;
font-size: 13px !important;
margin-top: 0px !important;
padding-bottom: 10px !important;
}

/* Tick labels */
.js-plotly-plot .xaxislayer-above .xtick text,
.js-plotly-plot .yaxislayer-above .ytick text {
  font-family: 'Poppins', sans-serif !important;
  font-size: 13px !important;
}

/* Axis titles (if present) */
.js-plotly-plot .annotation-text,
.js-plotly-plot .g-xtitle text,
.js-plotly-plot .g-ytitle text {
  font-family: 'Poppins', sans-serif !important;
    font-size: 13px !important;
}


/* =============================================================
   COLOUR PALETTE REFERENCE (comment only)
   =============================================================
#31686B Dark
#B7D6D9 Light
#16163F Text (off Black)
#46644B Text (green)
#31686B Text (green)
#1B2B19 Deep green
#AA2E3B Promar Red
*/
