/* eClaim Pilot Help - Compact Designer navy/teal, matching
   documentation/mockups/claude_help-topic-mockup.html.
   Colours from eclaimpilot-billing-ui theme.css: navy #08326f (--color-bg-button-navy),
   teal #0aa8aa (--color-bg-button-teal), dark teal #0f766e (--color-bg-icon-teal).

   Material sets its colour variables per colour scheme ([data-md-color-scheme=default]),
   which beats a plain :root rule - so they are set on ":root > *", as Material's own
   docs do for a custom palette. */
:root > * {
  --md-primary-fg-color:        #08326f;
  --md-primary-fg-color--light: #0b3f8a;
  --md-primary-fg-color--dark:  #062654;
  --md-accent-fg-color:         #0aa8aa;
  --md-accent-fg-color--transparent: rgba(10, 168, 170, 0.1);
  --md-typeset-a-color:         #0f766e;
  --md-text-font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --md-code-font-family: Consolas, "SFMono-Regular", Menlo, monospace;

  /* Footer: light, as in the mockup - Material draws every footer colour from these. */
  --md-footer-bg-color:          #f4f6f9;
  --md-footer-bg-color--dark:    #eef1f5;
  --md-footer-fg-color:          #2a3f54;
  --md-footer-fg-color--light:   #5b6472;
  --md-footer-fg-color--lighter: #5b6472;
}

/* ---------- Header and section tabs ---------- */
.md-tabs {
  background-color: #0b3f8a;
}

.md-tabs__link {
  opacity: 0.85;
}

/* Active tab: white, bold, teal underline - as in the mockup. */
.md-tabs__item--active .md-tabs__link {
  opacity: 1;
  font-weight: 600;
}

.md-tabs__item--active {
  box-shadow: inset 0 -2px 0 #0aa8aa;
}

.md-header__button.md-logo img {
  height: 1.3rem;
}

/* Search: light, translucent box on the navy header. */
.md-search__form {
  background-color: rgba(255, 255, 255, 0.14);
  border-radius: 6px;
}

.md-search__form:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* ---------- Left menu ---------- */
/* Section name at the top (BILLING): small grey capitals. */
.md-sidebar--primary .md-nav--primary > .md-nav__title,
.md-sidebar--primary .md-nav__item--section > .md-nav__link,
.md-sidebar--primary .md-nav--lifted > .md-nav__list > .md-nav__item--active > .md-nav__link {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6472;
  font-weight: 700;
}

/* Group names (Claims): bold, dark. */
.md-sidebar--primary .md-nav__item--nested > .md-nav__link,
.md-sidebar--primary .md-nav__item--section .md-nav__item--section > .md-nav__link {
  color: #2a3f54;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.68rem;
}

.md-sidebar .md-nav__link {
  color: #4b5563;
}

/* The open page: teal, with a teal marker. */
.md-nav__link--active,
.md-nav__item .md-nav__link--active,
.md-sidebar .md-nav__link--active {
  color: #0f766e;
  font-weight: 600;
}

.md-sidebar--primary .md-nav__link--active {
  box-shadow: inset 2px 0 0 #0aa8aa;
  padding-left: 0.5rem;
}

.md-nav__link:hover,
.md-nav__link:focus {
  color: #0aa8aa;
}

/* Right column title: ON THIS PAGE, not Material's "Table of contents". */
.md-nav--secondary > .md-nav__title {
  font-size: 0;
}

.md-nav--secondary > .md-nav__title::before {
  content: "On this page";
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6472;
  font-weight: 700;
}

/* ---------- Page text: the mockup's sizes (14px body, 28px title, 19px headings) ---------- */
.md-typeset {
  font-size: 0.7rem;
  line-height: 1.65;
}

.md-typeset h1 {
  color: #2a3f54;
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 0.6em;
}

.md-typeset h2 {
  color: #2a3f54;
  font-size: 0.95rem;
  font-weight: 700;
  border-top: 1px solid #e3e8ef;
  padding-top: 0.9em;
  margin-top: 1.4em;
}

.md-typeset h3 {
  color: #2a3f54;
  font-size: 0.8rem;
}

/* Breadcrumb (Billing > Claims) */
.md-path {
  font-size: 0.6rem;
}

.md-path__link {
  color: #5b6472;
}

/* ---------- Note / warning boxes: teal and amber, left bar only ---------- */
.md-typeset .admonition,
.md-typeset details {
  border: 0;
  border-left: 4px solid #0aa8aa;
  border-radius: 4px;
  background: #e6fbfb;
  box-shadow: none;
  font-size: 0.72rem;
}

.md-typeset .admonition > .admonition-title,
.md-typeset details > summary {
  background: transparent;
  color: #0f766e;
}

.md-typeset .admonition > .admonition-title::before,
.md-typeset details > summary::before {
  background-color: #0f766e;
}

.md-typeset .admonition.note,
.md-typeset details.note {
  border-left-color: #0aa8aa;
}

.md-typeset .admonition.warning,
.md-typeset details.warning {
  border-left-color: #e0a100;
  background: #fff7e6;
}

.md-typeset .warning > .admonition-title,
.md-typeset .warning > summary {
  color: #9a5b00;
}

.md-typeset .warning > .admonition-title::before,
.md-typeset .warning > summary::before {
  background-color: #9a5b00;
}

/* ---------- Tables (Common problems) ---------- */
.md-typeset table:not([class]) {
  border: 1px solid #e3e8ef;
  box-shadow: none;
  font-size: 0.7rem;
}

.md-typeset table:not([class]) th {
  background: #f3f6f9;
  color: #2a3f54;
}

/* ---------- Topic page building blocks (used from Phase 3) ----------
   A button or field name as it appears on screen:   **Put On Hold**{.ui}
   The main action button (teal):                   **Put On Hold**{.ui .primary}  */
.md-typeset .ui {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1.5;
  border: 1px solid #c7d0db;
  border-radius: 6px;
  padding: 0 0.5rem;
  color: #2a3f54;
  background: #ffffff;
  white-space: nowrap;
}

.md-typeset .ui.primary {
  background: #0aa8aa;
  border-color: #0aa8aa;
  color: #ffffff;
}

/* Numbered steps: navy numbered circles joined by a line, as in the mockup.
   Every numbered list in a topic is a list of steps. */
.md-typeset ol {
  list-style: none;
  counter-reset: step;
  margin-left: 0;
  padding-left: 0;
}

.md-typeset ol > li {
  counter-increment: step;
  position: relative;
  margin-left: 0;
  padding: 0.1rem 0 0.7rem 2.2rem;
}

.md-typeset ol > li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.05rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  background: #08326f;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.md-typeset ol > li::after {
  content: "";
  position: absolute;
  left: 0.65rem;
  top: 1.6rem;
  bottom: 0.1rem;
  width: 2px;
  background: #e3e8ef;
}

.md-typeset ol > li:last-child::after {
  display: none;
}

/* ---------- Footer ---------- */
.md-footer {
  border-top: 1px solid #e3e8ef;
}

/* ---------- Topic page pieces from the mockup ---------- */
/* Line under the title: "Video coming soon  ·  4 steps" */
.md-typeset .topic-meta {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  font-size: 0.6rem;
  color: #5b6472;
  margin: -0.6em 0 1em;
}

.md-typeset .topic-meta .chip {
  background: #e6fbfb;
  color: #0f766e;
  border-radius: 10px;
  padding: 0 0.4rem;
  font-weight: 600;
}

/* Drawing of an app dialog (e.g. Put On Hold), copied from the real screen. */
.md-typeset .ui-dialog {
  width: 17rem;
  max-width: 100%;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.12);
  margin: 0.5rem 0;
  background: #ffffff;
  font-size: 0.6rem;
}

.md-typeset .ui-dialog .hd {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0.7rem;
  font-weight: 700;
  color: #2a3f54;
  font-size: 0.65rem;
  border-bottom: 1px solid #e3e8ef;
}

.md-typeset .ui-dialog .hd .x {
  color: #5b6472;
}

.md-typeset .ui-dialog .bd {
  padding: 0.5rem 0.7rem;
}

.md-typeset .ui-dialog label {
  display: block;
  font-weight: 600;
  color: #2c5a87;
  margin: 0.3rem 0 0.15rem;
}

.md-typeset .ui-dialog label::after {
  content: " *";
  color: #c62828;
}

.md-typeset .ui-dialog .tb {
  border: 1px solid #cfd6df;
  border-radius: 5px;
  padding: 0.25rem 0.4rem;
  color: #374151;
  background: #fffef2;
}

.md-typeset .ui-dialog .tb.ml {
  min-height: 2.3rem;
}

.md-typeset .ui-dialog .ft {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  padding: 0.5rem 0.7rem;
  border-top: 1px solid #e3e8ef;
}

/* Drawing of the red on-hold banner. */
.md-typeset .ui-banner {
  border: 1px solid #f3c1c1;
  background: #fdecec;
  border-radius: 8px;
  padding: 0.5rem 0.6rem;
  margin: 0.5rem 0;
  font-size: 0.62rem;
}

.md-typeset .ui-banner .row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.md-typeset .ui-banner .ttl {
  font-weight: 700;
  color: #c62828;
  flex: 1;
}

.md-typeset .ui-banner .n {
  color: #4b5563;
  margin-top: 0.2rem;
}

.md-typeset .ui-banner .w {
  color: #c62828;
  margin-top: 0.2rem;
  font-weight: 600;
}

/* Video block, last on every topic. Until the ScreenPal MP4 is recorded it shows the
   poster with "Video coming soon"; then a <video> tag replaces the inner poster. */
.md-typeset .topic-video {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 38rem;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #0b2d5c 0%, #08326f 55%, #0a5a6e 100%);
  margin-top: 0.5rem;
}

.md-typeset .topic-video .poster {
  position: absolute;
  inset: 0;
  padding: 0.9rem 1.1rem;
}

.md-typeset .topic-video .p1 {
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #8fd9da;
}

.md-typeset .topic-video .p2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  margin-top: 0.2rem;
}

.md-typeset .topic-video .play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 3.3rem;
  height: 3.3rem;
  border-radius: 50%;
  background: #0aa8aa;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
}

.md-typeset .topic-video .play::after {
  content: "";
  position: absolute;
  left: 1.3rem;
  top: 0.95rem;
  border-left: 1rem solid #ffffff;
  border-top: 0.7rem solid transparent;
  border-bottom: 0.7rem solid transparent;
}

.md-typeset .topic-video .soon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.8rem;
  text-align: center;
  color: #dbe6f5;
  font-size: 0.65rem;
}

/* ---------- Full-width layout, as in the mockup ----------
   Material centres everything in a 61rem column, which leaves wide empty bands either side
   of the header and page. The mockup runs edge to edge: logo, tabs and menu at the left,
   "On this page" at the right. */
.md-grid {
  max-width: none;
}

.md-header__inner,
.md-tabs__list {
  padding-left: 0.6rem;
  padding-right: 0.6rem;
}

/* Logo tight against the title. */
.md-header__button.md-logo {
  margin-right: 0;
}

.md-header__title {
  margin-left: 0.3rem;
}

/* A wide search box, as in the mockup. */
@media screen and (min-width: 60em) {
  .md-search__inner {
    width: 21rem;
  }
}

/* Thin line before "On this page". */
.md-sidebar--secondary .md-sidebar__scrollwrap {
  border-left: 1px solid #e3e8ef;
}

/* ---------- Flow chart (HTML, no images, no outside scripts) ----------
   Used on Enter or edit a claim for the two ways of working. Boxes stack top to bottom;
   .fc-lanes puts two paths side by side and stacks them on a phone. */
.md-typeset .flowchart {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1rem 0 1.4rem;
  font-size: 0.62rem;
}

.md-typeset .fc-pill {
  background: #08326f;
  color: #ffffff;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.35rem 1.1rem;
  text-align: center;
}

.md-typeset .fc-note {
  color: #5b6472;
  max-width: 26rem;
  text-align: center;
  margin-top: 0.35rem;
}

.md-typeset .fc-down {
  width: 2px;
  height: 1.1rem;
  background: #9aa3af;
  position: relative;
  margin: 0.15rem 0 0.35rem;
}

.md-typeset .fc-down::after {
  content: "";
  position: absolute;
  left: -4px;
  bottom: -6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid #9aa3af;
}

.md-typeset .fc-lanes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  width: 100%;
}

.md-typeset .fc-lane {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px dashed #c7d0db;
  border-radius: 10px;
  padding: 0.7rem 0.6rem 0.8rem;
  background: #fafbfc;
}

.md-typeset .fc-lane-title {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5b6472;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.md-typeset .fc-box {
  background: #ffffff;
  border: 1.5px solid #0aa8aa;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  text-align: center;
  width: 100%;
  max-width: 17rem;
  box-sizing: border-box;
}

.md-typeset .fc-box strong {
  display: block;
  color: #2a3f54;
}

.md-typeset .fc-box span {
  display: block;
  color: #5b6472;
  margin-top: 0.1rem;
  line-height: 1.45;
}

.md-typeset .fc-box.fc-merge {
  border-color: #08326f;
  background: #e6fbfb;
}

/* Decision: an amber diamond. */
.md-typeset .fc-decision {
  width: 4.6rem;
  height: 4.6rem;
  background: #fff7e6;
  border: 1.5px solid #e0a100;
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  /* a rotated square overhangs its box by about a fifth on each side */
  margin: 1.1rem 0 1.3rem;
}

.md-typeset .fc-decision span {
  transform: rotate(-45deg);
  font-weight: 700;
  color: #9a5b00;
}

.md-typeset .fc-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  text-align: center;
}

.md-typeset .fc-no {
  color: #c62828;
  background: #fdecec;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  max-width: 17rem;
}

.md-typeset .fc-yes {
  color: #1a7f56;
}

@media screen and (max-width: 44.9375em) {
  .md-typeset .fc-lanes {
    grid-template-columns: 1fr;
  }
}
