/* Style the user account dashboard links to match the BSIL dashboard cards:
 * equal-height 3-column grid, brand-blue top accent, govuk link styling.
 */

.user-account-page-title {
  margin-bottom: 1.875rem;
}

/* Each section wrapper (one per h2 block) becomes a grid of 3 cards.
 * The view wraps the <ul> in a <span class="field-content"> which
 * is display: flex by default — override so the grid takes full width. */
.user-account-dashboard .views-field,
.user-account-dashboard .field-content {
  display: block;
  width: 100%;
}

.user-account-dashboard ul.flex-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  list-style: none;
  padding: 0;
  margin: 1.25rem 0;
  width: 100%;
}

@media (max-width: 768px) {
  .user-account-dashboard ul.flex-row {
    grid-template-columns: 1fr;
  }
}

/* Hide duplicate h2 separators (Hr inside the view is now redundant). */
.flex-row hr {
  display: none;
}

/* Each flex-grid-column-one-third becomes a card with brand-blue accent. */
.user-account-dashboard .flex-grid-column-one-third {
  display: flex;
  flex-direction: column;
  border: 1px solid #b1b4b6;
  border-top: 4px solid #1d70b8;
  background: #fff;
  padding: 1.25rem;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04);
}

.user-account-dashboard h2.govuk-heading-l {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
}

/* Link buttons inside cards — match the BSIL card style (link anchored to bottom). */
.user-account-dashboard a.link-button,
.user-account-dashboard a.cta-info {
  margin-top: auto;
  align-self: flex-start;
  display: inline-block;
  padding: 0.625rem 1rem;
  background: #1d70b8;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border-radius: 4px;
  border: 2px solid #1d70b8;
  text-align: center;
  min-width: 80%;
}

.user-account-dashboard a.link-button:hover,
.user-account-dashboard a.cta-info:hover {
  background: #003078;
  border-color: #003078;
  text-decoration: underline;
  color: #fff;
}

.user-account-dashboard a.link-button:focus,
.user-account-dashboard a.cta-info:focus {
  outline: 3px solid #ffdd00;
  outline-offset: 0;
  background: #003078;
  color: #fff;
}

.user-account-dashboard a.link-button svg,
.user-account-dashboard a.cta-info svg {
  vertical-align: middle;
  margin-right: 0.25rem;
  width: 1em;
  height: 1em;
}

/* 404 — Page not found page: GOV.UK styled heading + body styling.
 * Triggered by `is-page-not-found` body class added in
 * map_listing_preprocess_html() so we only match 404/403 pages, not
 * register pages or any other empty content area. */

body.is-page-not-found main > .govuk-grid-row .govuk-grid-column-two-thirds > div {
  background: #fff;
  border: 1px solid #b1b4b6;
  border-top: 4px solid #d4351c;
  padding: 1.5rem 1.875rem;
  margin: 2rem 0;
}

body.is-page-not-found main > .govuk-grid-row .govuk-grid-column-two-thirds > div::before {
  content: "Page not found";
  display: block;
  font-family: "GDS Transport", Arial, sans-serif;
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #0b0c0c;
}

body.is-page-not-found main > .govuk-grid-row .govuk-grid-column-two-thirds p {
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.45;
}
