/* styles/sections/blog-index.css
 * Blog index one-offs on top of editorial-index.css: the running-line colophon, the Search
 * toggle's states and panel, and 44px targets for the Earlier links. */
@layer sections {
  /* Colophon: count, separator and RSS as flex items, so RSS is not a link inside a run of
     text; ::before gives it a 44px target. */
  .index-hero__colophon {
    display: flex;
    gap: var(--space-8);
    margin: 0;
    line-height: 1.2;
  }

  .index-hero__colophon a {
    position: relative;
  }

  .index-hero__colophon a::before,
  .index-pagination a::before {
    content: "";
    position: absolute;
    inset: -13px 0;
  }

  .index-pagination a {
    position: relative;
  }

  /* Search is a <button> drawn as the frame's ghost control. States follow the actions board:
     mint chip on hover; pressed and open share the solid fern chip with white text. The
     button is the 24px chip, centred in the row; ::after keeps a 44px target. */
  .index-filter__search {
    position: relative;
    align-self: center;
    min-height: 24px;
    padding: 0 6px;
    margin-inline-end: -6px;
    border: 0;
    border-radius: var(--radius-sm);
    background: none;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background-color var(--dur-fast), color var(--dur-fast);
  }

  .index-filter__search::after {
    content: "";
    position: absolute;
    inset: -10px 0;
  }


  .index-filter__search[hidden] {
    display: none;
  }

  .index-filter__search:hover {
    background: var(--mint);
    color: var(--ink);
  }

  .index-filter__search:active,
  .index-filter__search[aria-expanded="true"] {
    background: var(--fern);
    color: var(--white);
  }

  #blog-search-panel {
    display: grid;
    gap: var(--space-12);
    padding-block: var(--space-24) 0;
  }

  #blog-search-panel[hidden] {
    display: none;
  }

  .blog-search__status {
    margin: 0;
    font-size: 14px;
    color: var(--ink-2);
  }

  .blog-search__status:empty {
    display: none;
  }
}
