/* ============================================================
   Mahuset shared component styles.
   These were previously duplicated inside <style> blocks on every
   page (index, about-mahuset, components, patterns). Lifted here
   once so a change in one place updates the whole site.

   Load AFTER nhsuk.css, BEFORE style.css.
   ============================================================ */

/* ---------- Page chrome ---------- */
html { scroll-behavior: smooth; }

body {
  font-family: var(--mh-font-sans);
  color: var(--mh-ink);
}

/* ---------- Promo grid card (was duplicated as .custom-promo on every page) ---------- */
.custom-promo {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--mh-space-5);
}
.custom-promo__icon .material-symbols-outlined {
  font-size: 40px;
  color: var(--mh-burgundy-500);
  margin-right: var(--mh-space-4);
  line-height: 1;
}
.custom-promo__content {
  /* prevent uneven row heights when adjacent cards have different copy lengths */
  min-height: 132px;
}
.custom-promo__content .nhsuk-heading-xs {
  margin-bottom: var(--mh-space-1);
}
.custom-promo__content .nhsuk-heading-xs a {
  color: var(--mh-burgundy-500);
  text-decoration: none;
}
.custom-promo__content .nhsuk-heading-xs a:hover {
  text-decoration: underline;
}
.custom-promo__content .nhsuk-body-s {
  margin-bottom: 0;
}

/* Responsive quarter columns (was duplicated on each page) */
.nhsuk-grid-column-one-quarter { width: 100%; }
@media (min-width: 48.0625em) {
  .nhsuk-grid-column-one-quarter { width: 50%; }
}
@media (min-width: 64.0625em) {
  .nhsuk-grid-column-one-quarter { width: 25%; }
  .popular-services-card-wrapper { float: right; }
  .nhsuk-grid-column-one-quarter:not(.popular-services-card-wrapper) {
    margin-top: var(--mh-space-5);
  }
}

/* ---------- Showcase tray (was .component-showcase, components.html) ---------- */
.component-showcase {
  border: 1px solid var(--mh-line-soft);
  border-radius: var(--mh-radius-s);
  margin-bottom: var(--mh-space-5);
  padding: var(--mh-space-5);
  background-color: var(--mh-surface);
}
.component-preview {
  border: 1px solid var(--mh-surface-2);
  background-color: var(--mh-surface-3);
  padding: var(--mh-space-4) var(--mh-space-5);
  margin-bottom: var(--mh-space-4);
  border-radius: var(--mh-radius-s);
}
.component-code {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: var(--mh-space-4);
  border-radius: var(--mh-radius-s);
  font-family: var(--mh-font-mono);
  font-size: var(--mh-text-s);
  overflow-x: auto;
}

/* ---------- Footer (was 200+ lines of inline <style> on every page) ---------- */
.nhsuk-footer { background-color: var(--mh-night-2); color: var(--mh-surface); }
.nhsuk-footer a { color: var(--mh-surface); text-decoration: underline; }
.nhsuk-footer a:hover { text-decoration: none; }

.nhsuk-footer__top-bar {
  background-color: var(--mh-burgundy-500);
  padding: var(--mh-space-6) 0;
}
.nhsuk-footer__top-bar .nhsuk-width-container {
  display: flex;
  align-items: center;
  gap: var(--mh-space-1);
}
.nhsuk-footer__top-bar-text { color: #fff; }
.nhsuk-footer__top-bar-text .nhsuk-heading-m {
  font-weight: bold;
  margin-bottom: 0;
  font-size: 1.2rem;
  color: #fff;
}
.nhsuk-footer__top-bar-text .nhsuk-body-s {
  color: #fff;
  margin-top: var(--mh-space-1);
  margin-bottom: 0;
}

.nhsuk-footer--extended {
  padding: 40px 0;
  background-color: var(--mh-night);
  color: #fff;
}
.nhsuk-footer--extended a {
  color: #fff;
  text-decoration: underline;
  display: flex;
  align-items: center;
  gap: var(--mh-space-2);
}
.nhsuk-footer--extended a:hover { text-decoration: none; }
.nhsuk-footer--extended h2 {
  color: #fff;
  font-size: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.2);
  padding-bottom: var(--mh-space-2);
  margin-bottom: var(--mh-space-4);
}
.nhsuk-footer__list--extended { list-style: none; padding-left: 0; }
.nhsuk-footer__list-item--extended { margin-bottom: var(--mh-space-2); }

.nhsuk-footer__bottom-bar {
  background-color: var(--mh-night);
  padding: var(--mh-space-4) 0;
  color: #fff;
}
.nhsuk-footer__bottom-bar .nhsuk-width-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: var(--mh-space-4);
}
@media (min-width: 48.0625em) {
  .nhsuk-footer__bottom-bar .nhsuk-width-container {
    flex-direction: row;
    align-items: flex-end;
  }
}
.nhsuk-footer__bottom-bar__links-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--mh-space-4) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--mh-space-4);
  justify-content: center;
}
@media (min-width: 48.0625em) {
  .nhsuk-footer__bottom-bar__links-list { justify-content: flex-start; }
}
.nhsuk-footer__bottom-bar__links-list a {
  color: #fff;
  text-decoration: underline;
  font-weight: normal;
}
.nhsuk-footer__bottom-bar__links-list a:hover { text-decoration: none; }
.nhsuk-footer__bottom-bar a {
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  transition: text-decoration var(--mh-duration-m) var(--mh-ease);
  margin-bottom: var(--mh-space-2);
}
@media (min-width: 48.0625em) {
  .nhsuk-footer__bottom-bar a { margin-bottom: 0; }
}
.nhsuk-footer__bottom-bar a:hover { text-decoration: underline; }

.nhsuk-footer__copyright {
  color: rgba(255,255,255,.8);
  margin-bottom: var(--mh-space-2);
  text-align: center;
}
@media (min-width: 48.0625em) {
  .nhsuk-footer__copyright { margin-bottom: 0; }
}

.vertical-divider {
  border-left: 1px solid rgba(255,255,255,.2);
  height: 80px;
  margin: 0 var(--mh-space-4);
}
.nhsuk-logo-image { height: 100px; width: auto; }

/* GOV.UK-style bottom bar (only loaded on index/about; kept for parity) */
.nhsuk-footer__gov-bar {
  background-color: var(--mh-night);
  padding: var(--mh-space-6) 0;
  color: rgba(255,255,255,.8);
}
.nhsuk-footer__gov-bar .nhsuk-width-container {
  border-top: 1px solid rgba(255,255,255,.2);
  padding-top: var(--mh-space-6);
  display: flex;
  flex-direction: column;
}
.nhsuk-footer__gov-bar__links-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--mh-space-4) 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--mh-space-4);
}
.nhsuk-footer__gov-bar__links-list a { color: #fff; text-decoration: underline; }
.nhsuk-footer__gov-bar__links-list a:hover { text-decoration: none; }
.nhsuk-footer__gov-bar__row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--mh-space-4);
}
@media (min-width: 48.0625em) {
  .nhsuk-footer__gov-bar__row {
    flex-direction: row;
    justify-content: space-between;
  }
}
.nhsuk-footer__gov-bar__logo { height: 60px; width: auto; }
.nhsuk-footer__licence, .nhsuk-footer__copyright-text {
  display: flex;
  align-items: center;
  margin: 0;
  gap: var(--mh-space-2);
}
.nhsuk-footer__licence a {
  color: #fff;
  text-decoration: underline;
  display: inline-flex;
  align-items: center;
  gap: var(--mh-space-1);
}
.nhsuk-footer__licence a:hover { text-decoration: none; }
.nhsuk-footer__licence .material-icons,
.nhsuk-footer__copyright-text .material-icons { font-size: 1.5rem; }
.nhsuk-footer__copyright-licence-block {
  background-color: var(--mh-night);
  padding: 0;
  border-radius: var(--mh-radius-m);
  color: #fff;
}
.nhsuk-footer__copyright-licence-block a,
.nhsuk-footer__copyright-licence-block .material-icons { color: #fff; }

/* ---------- Status box (was in inline <style>) ---------- */
.beta-banner { padding: var(--mh-space-4) 0; background-color: var(--mh-surface); }
.status-box {
  padding: 3px 5px;
  background-color: var(--mh-success);
  color: #fff;
  text-transform: uppercase;
  font-size: 20px;
  line-height: 1.45455;
  font-weight: bold;
}
.status-box.status-box-blue { background-color: var(--mh-burgundy-500); }
