/*
 * 11-nav-mobile.css - lane S10. The mobile drawer gets the desktop's grouping.
 *
 * The owner's report, 10 Sep: "There's no division of disciplines, and it's
 * just one long string of menu options without any kind of organization."
 * On desktop the four disciplines live under a Classes dropdown; in the drawer
 * they had been promoted to top level, so Pottery read as a peer of Gallery.
 *
 * parts/header.html now nests them in the panel exactly as it does in the bar.
 * The group is shown open rather than behind a disclosure: a drawer has the
 * vertical room a header bar does not, and hiding Pottery behind a second tap
 * on the page the owner was standing on would answer the wrong complaint.
 *
 * The second half of this file is the "you are here" marker. It used to be a
 * 3px rust bar plus a 12px indent, and phase1.css's bare-element rule
 * `nav a[aria-current]{border-bottom-color:var(--clay)}` painted a clay rule
 * across the whole row on top of that - which is why the current page read as a
 * selected item waiting to be tapped. It is now one rust bead in the gutter.
 *
 * Loads after 10-shell.css by filename order (functions.php globs the folder).
 */

/* ---------------------------------------------------------------------
   1. The Classes group.
   --------------------------------------------------------------------- */
.rh-shell-panel-group {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rh-shell-panel-group-label {
  margin: 0;
  padding: 20px 2px 8px;
  max-width: none; /* phase1.css constrains bare <p> */
  font-family: var(--b);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clay);
}

/* A hairline rail down the left of the four disciplines: at a glance the group
   is one block, and Events below it plainly is not part of it. */
.rh-shell-panel-nav .rh-shell-panel-sub {
  display: block;
  list-style: none;
  margin: 0 0 4px 3px;
  padding: 0 0 0 14px;
  border-inline-start: 1px solid rgba(237, 230, 216, 0.26);
}

.rh-shell-panel-nav .rh-shell-panel-sub > li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rh-shell-panel-nav .rh-shell-panel-sub > li > a {
  display: block;
  position: relative;
  padding: 12px 2px;
  border-block-end: 1px solid rgba(237, 230, 216, 0.1);
  font-family: var(--d);
  font-size: 19px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--on-ink);
  text-decoration: none;
}

/* The last discipline closes the group; the next top-level row draws its own. */
.rh-shell-panel-nav .rh-shell-panel-sub > li:last-child > a {
  border-block-end: 0;
}

/* Breathing room so the group is a block, not four more rows in the run. */
.rh-shell-panel-group + li > a {
  border-block-start: 1px solid rgba(237, 230, 216, 0.1);
  padding-block-start: 16px;
}

/* ---------------------------------------------------------------------
   2. "You are here", not "this is selected".
   --------------------------------------------------------------------- */
.rh-shell-panel-nav a {
  position: relative;
}

/* Undo the old selected-row treatment (10-shell.css) ... */
.rh-shell-panel-nav .is-current > a {
  box-shadow: none;
  padding-inline-start: 2px;
  color: var(--on-ink);
}

/* ... and phase1.css's bare-element rule, which painted a clay rule right
   across the current row. Specificity has to beat `nav a[aria-current]`. */
.rh-shell-panel-nav a[aria-current="page"],
.rh-shell-panel-nav .is-current > a[aria-current] {
  border-block-end-color: rgba(237, 230, 216, 0.1);
}

.rh-shell-panel-nav .rh-shell-panel-sub > li:last-child > a[aria-current="page"] {
  border-block-end: 0;
}

/* One rust bead in the gutter. Inside the group it sits on the rail, so it
   reads as a pin on the list rather than a highlighted button. */
.rh-shell-panel-nav .is-current > a::before {
  content: "";
  position: absolute;
  inset-block-start: calc(50% - 4px);
  inset-inline-start: -13px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rust);
}

.rh-shell-panel-nav > ul > .is-current > a::before {
  inset-inline-start: -12px;
}

/* Being on a discipline page also brightens the group label. Progressive:
   browsers without :has() simply do not draw this. */
.rh-shell-panel-group:has(.is-current) .rh-shell-panel-group-label {
  color: var(--on-ink);
}

/* ---------------------------------------------------------------------
   3. Focus, and nothing that widens the drawer.
   --------------------------------------------------------------------- */
.rh-shell-panel-nav .rh-shell-panel-sub > li > a:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
}

.rh-shell-panel-nav .rh-shell-panel-sub > li > a {
  overflow-wrap: normal;
  word-break: normal;
}

/* Very short phones: the drawer already scrolls (10-shell.css sets
   overflow-y:auto on .rh-shell-panel); tighten the rhythm so the whole list
   still fits without one. */
@media (max-height: 700px) {
  .rh-shell-panel-nav a {
    padding-block: 12px;
  }

  .rh-shell-panel-nav .rh-shell-panel-sub > li > a {
    padding-block: 10px;
  }

  .rh-shell-panel-group-label {
    padding-block-start: 14px;
  }
}
