html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

/* SCW brand colour  */
:root {
  --scw-primary: #005b8c;
  --scw-secondary: #003a8f;
}

/* NHS header background override */
.nhsuk-header--white {
  border-bottom: 4px solid var(--scw-primary);
}

/* Logo spacing */
.logo-image {
  height: 60px;
}

@media (max-width: 768px) {
  .logo-image {
    height: 44px;
  }
}


.nhsuk-header__search {
  display: flex;
  align-items: center;        /* vertical */
  justify-content: flex-end;  /* keep it to the right */
}

/* Default (tablet/desktop): header ~80px */
.nhsuk-tabs__panel {
  display: flex;                 /* ensure flex-direction applies */
  flex-direction: column;        /* stack map and table vertically */
  /*(height: max(300px, calc(100vh - 200px));*/
  transition: height 0.5s ease;
}

.nhsuk-inset-text{
  margin-top: 0px;
  padding: 12px;
}

.nhsuk-tabs {
    margin-bottom: 0px;
}


#meta_tags_container .nhsuk-tag {
  margin-right: 0.5rem;   /* space between tags */
  margin-bottom: 0.5rem;  /* optional: wrap nicely on new lines */
}

#map { 
  width:100%;
  height: max(300px, calc(100vh - 232px)); 
}


/* Hide only the Leaflet attribution flag */
.leaflet-control-attribution .leaflet-attribution-flag {
  display: none !important;
}

 .grayscale-invert {
        filter: grayscale(100%) invert(1);
    }

#table {
  width: 100%;
  /* Minimum useful height */
  min-height: 600px;
};

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
  width: 48px!important;
  height: 48px!important;
  line-height: 48px!important;
  text-align: center;
  font-size: 18px;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.65);
}
.leaflet-control-zoom-in:focus,
.leaflet-control-zoom-out:focus {
  background: #ffeb3b !important;
  box-shadow: 0 4px 0 #212b32!important;
  color: #212b32!important;
}
.leaflet-control-zoom-in:hover,
.leaflet-control-zoom-out:hover {
  background-color: #f0f0f0;
}

.leaflet-touch .leaflet-bar a {
	width: 48px;
	height: 48px;
	line-height: 48px;
	}

  .leaflet-control-layers-selector {
  width: 20px;
  height: 20px;
  cursor: pointer;
  margin: 0 5px 0 0;
  vertical-align: middle;
}
.leaflet-control-layers-selector + span {
  font-size: 1.1875rem;
  line-height: 1.47368;
}

.leaflet-control-layers-selector:checked {
  outline: 2px solid #ffeb3b;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

  /* Tidy label layout in the layer control */
.leaflet-control-layers label {
  display: flex;
  align-items: center;        /* vertical alignment */
  gap: .4em;                  /* space between icon and text */
  line-height: 1.25;          /* avoid crowding */
}

.leaflet-control-layers{
  overflow-y: none;
}


/* Flex row to place spinner next to the output */
.output-row {
  display: flex;
  align-items: center;     /* vertically align spinner with content */
  gap: 12px;               /* space between output and spinner */
}

/* Make the output take the available width */
.output-row .output {
  flex: 1 1 auto;
  min-width: 0;            /* prevents flex overflow issues */
}

/* Your spinner (refined for inline use) */
.nhs-spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #d8dde0;     /* NHS Grey 4 */
  border-top-color: #005eb8;     /* NHS Blue */
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: none;                 /* default hidden */
  z-index: 1;                    /* not necessary, but harmless inline */
}

/* Slightly smaller inline variant (optional) */
.nhs-spinner--inline {
  width: 32px;
  height: 32px;
  border-width: 4px;
}

/* Show/hide states */
.is-loading .nhs-spinner,
.nhs-spinner.is-visible {
  display: inline-block;
}

/* Keyframes */
@keyframes spin { to { transform: rotate(360deg); } }

  .leaflet-popup-content-wrapper {
        font-family: Arial, Helvetica, sans-serif;
        font-size: 14px;
        line-height: 21px;
        font-weight: 500;
        background-color: whitesmoke;
        opacity: 0.75;
        color: black;
        text-align: center;
        border-radius: 0;
    }
    .leaflet-popup-tip {
        background-color: whitesmoke;
        opacity: 0.75;
}

