/*
 * Nanny agency page: its problem drawings' own parts (classes p01-).
 * Linked only on pages with those classes (peanut_scoped_css()).
 */

@layer blocks {
  .diagram .p01-tap {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-dasharray: 3 3;
    opacity: 0.6;
  }

  .diagram .p01-tap--on {
    fill: var(--color-white);
    stroke-dasharray: none;
    opacity: 1;
  }

  .diagram .p01-check,
  .diagram .p01-trail,
  .diagram .p01-road {
    fill: none;
    stroke: var(--color-ink);
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .diagram .p01-trail {
    stroke-dasharray: 4 5;
    opacity: 0.6;
  }

  .diagram .p01-road {
    opacity: 0.2;
  }

  .diagram .p01-fade-out {
    fill: none;
    stroke: var(--color-white);
    stroke-width: 10;
  }

  .diagram .p01-pin {
    fill: var(--color-white);
    stroke: var(--color-ink);
    stroke-width: 1.5;
  }

  .diagram .p01-grey {
    opacity: 0.35;
  }

  /* ---------- Sample agency page (visuals/p01-agency-page.php): the nanny
     agency mockup beside the numbered list of the checklist block, its
     markers in a gutter to the left of the page, each level with the top of
     its part, so none covers what it points to. ---------- */

  .p01-agency {
    --p01-gutter: 2.5rem;
    padding-inline-start: var(--p01-gutter);
  }

  .p01-agency .mock {
    overflow: visible;
    font-size: 0.75rem;
  }

  .p01-agency .mock__body {
    --p01-inset: var(--space-3);
    gap: var(--space-2);
  }

  .p01-agency .p01-agency__part {
    position: relative;
  }

  /* the address bar keeps its own look and the frame's top corners */
  .p01-agency .mock__bar.p01-agency__part {
    padding: 0.5rem var(--space-2);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  }

  .p01-agency .mock__badges {
    padding: 0;
  }

  /* narrow: the menu and the address wrap inside the page instead of
     widening it */
  .p01-agency .mock__nav {
    flex-wrap: wrap;
    gap: var(--space-1) var(--space-2);
  }

  .p01-agency .mock__menu {
    flex-wrap: wrap;
  }

  .p01-agency .mock__url {
    overflow-wrap: anywhere;
  }

  .p01-agency .mock__mark {
    position: absolute;
    inset-block-start: 0.375rem;
    inset-inline-start: calc(-1 * (var(--p01-inset, 0rem) + var(--p01-gutter) - 0.25rem));
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-white);
    border: var(--border);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    transition: background-color 200ms var(--ease-out), color 200ms var(--ease-out);
  }

  .p01-agency .p01-agency__part.is-now > .mock__mark {
    background: var(--color-ink);
    color: var(--color-white);
  }

  /* the city list opens while its item is pointed at or focused */
  .p01-agency .p01-agency__part.is-now .mock__list {
    visibility: visible;
    opacity: 1;
  }

  @media (min-width: 48rem) {
    .p01-agency .mock {
      font-size: 0.8125rem;
    }

    .p01-agency .mock__body {
      --p01-inset: var(--space-4);
      gap: var(--space-3);
      padding: var(--space-3) var(--space-4) var(--space-4);
    }

    .p01-agency .mock__hero {
      padding: var(--space-4) var(--space-3);
    }

    .p01-agency .mock__list {
      width: 11rem;
    }
  }

  /* wide: the page fills the height of the list beside it, its parts spread
     evenly down it (the checklist stretches the two columns to one height) */
  @media (min-width: 60rem) {
    .p01-agency {
      display: flex;
      flex-direction: column;
      height: 100%;
    }

    .p01-agency .mock {
      display: flex;
      flex: 1;
      flex-direction: column;
      font-size: 0.875rem;
    }

    .p01-agency .mock__body {
      flex: 1;
      align-content: space-between;
    }

    .p01-agency .mock__hero {
      padding: var(--space-5) var(--space-4);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .p01-agency .mock__mark {
      transition: none;
    }
  }
}
