/**
 * #233 UX action layer - persistent task-shortcut band.
 *
 * Rendered site-wide from templates/system/html.html.twig, directly below the
 * header. Standalone component CSS (authored directly, not via the SCSS/gulp
 * build); attached through the ih_main/task-actions library. Colours reference
 * the brand tokens in css/base/tokens.css (loaded first), with literal
 * fallbacks.
 */
.task-actions {
  /* #285 temporary: hidden for demo, revert after. */
  display: none;
  background: var(--color-grey-96, #f2f4f4);
  border-bottom: 1px solid var(--color-grey-90, #e2e2e2);
}

.task-actions__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 16px;
}

.task-actions__heading {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-grey-35, #4c5356);
}

.task-actions__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.task-actions__link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* Fill the grid row's height (the <li> grid item already stretches to
     match its row; without this the <a> only sizes to its own content, so
     a two-line label's row makes single-line siblings look shorter). */
  height: 100%;
  min-height: 48px; /* touch target */
  box-sizing: border-box;
  padding: 10px 14px;
  border-radius: 6px;
  background: var(--color-blue-35, #00558c); /* 5.4:1 vs #fff, WCAG AA */
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.25;
  text-decoration: none;
}

.task-actions__link:hover,
.task-actions__link:focus {
  background: var(--color-blue-25, #003c66);
  color: #fff;
  text-decoration: none;
}

/* The global `a:visited` rule (custom-overrides.css) sets a thistle text
   colour that fails contrast against these dark button backgrounds
   (~1.2-1.3:1 vs the ~4.5:1 minimum). These are persistent nav "buttons",
   not inline content links, so visited state isn't meaningful here — keep
   the text white, same as the unvisited resting state. */
.task-actions__link:visited {
  color: #fff;
}

.task-actions__link:focus-visible {
  outline: 3px solid var(--color-blue-60, #0097f1);
  outline-offset: 2px;
}

/* Emergency shortcut mirrors the header Emergency care button. Keyed off an
   explicit modifier (not :first-child) so it stays red only on the emergency
   tile even when that tile is gated out by enable_find_care. */
.task-actions__link--emergency {
  background: var(--color-red-35, #97152a); /* 7.9:1 vs #fff */
}

.task-actions__link--emergency:hover,
.task-actions__link--emergency:focus {
  background: var(--color-red-25, #6e0c1c);
}
