/* =========================================================================
   QUADRONET Layout - Rueckweg: Brotkrumenpfad und Zurueck-Link (27.10.2026)
   -------------------------------------------------------------------------
   Markup: Partials/Page/Pfad.html (Section "Oben" unter dem Kopf, Section
   "Unten" als erste Zeile im Fuss).

   Desktop: ganzer Pfad in der Schrift der Navi-Beschriftung (Versalien,
   gesperrt), getrennt durch einen orangen Strich auf der 8-Grad-Achse.
   Telefon (bis 640 px): nur die Elternseite als Knopf "<- Hilfe" - der
   vollstaendige Pfad waere dort zwei, drei Zeilen hoch. Die Elternseite ist
   immer das vorletzte <li> (bei einer Detailansicht die Seite des Plugins).

   Trefferflaechen >= 24 px (WCAG 2.5.8), am Telefon 44 px.
   Rueckweg: Zeile lqPfad unter page.includeCSS entfernen (pfad.typoscript).
   ========================================================================= */

@layer qn.theme {

  /* ----- Pfad oben ----------------------------------------------------- */
  .lq-pfad {
    background: var(--carbon);
    border-bottom: 1px solid var(--qn-linie-fein);
  }
  .lq-pfad__liste {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .15rem .9rem;
    margin-block: 0;
    padding-block: .55rem;
    list-style: none;
    font-size: .73rem;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: .07em;
    text-transform: uppercase;
  }
  .lq-pfad__punkt {
    display: inline-flex;
    align-items: center;
    gap: .9rem;
    min-width: 0;
    margin: 0;
  }
  /* Trenner: kurzer oranger Strich, gekippt wie die Keile - kein Zeichen,
     also stumm fuer Vorlesesoftware. */
  .lq-pfad__punkt + .lq-pfad__punkt::before {
    content: "";
    flex: none;
    width: 2px;
    height: .95em;
    background: var(--orange);
    transform: skewX(calc(-1 * var(--winkel) * 2.5));
  }
  .lq-pfad__link,
  .lq-pfad__hier {
    display: inline-block;
    padding-block: .3rem;
    overflow-wrap: anywhere;
  }
  .lq-pfad__link {
    color: var(--hell-2);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color .15s, border-color .15s;
  }
  .lq-pfad__link:hover {
    color: var(--orange);
    border-bottom-color: currentColor;
  }
  .lq-pfad__link:focus-visible {
    outline: 2px solid var(--qn-fokus);
    outline-offset: 3px;
    border-radius: 2px;
  }
  .lq-pfad__hier { color: var(--hell); }

  /* ----- Telefon: nur "<- Elternseite" ---------------------------------- */
  @media (max-width: 640px) {
    .lq-pfad__liste { padding-block: .35rem; }
    .lq-pfad__punkt { display: none; }
    .lq-pfad__punkt:nth-last-child(2) { display: inline-flex; }
    .lq-pfad__punkt:nth-last-child(2)::before { content: none; }
    .lq-pfad__punkt:nth-last-child(2) .lq-pfad__link {
      display: inline-flex;
      align-items: center;
      gap: .55rem;
      min-height: 44px;
      color: var(--hell);
      border-bottom: 0;
    }
    .lq-pfad__punkt:nth-last-child(2) .lq-pfad__link::before {
      content: "";
      width: .5em;
      height: .5em;
      border-left: 2px solid var(--orange);
      border-bottom: 2px solid var(--orange);
      transform: rotate(45deg);
    }
  }

  /* ----- Zurueck-Link unten (erste Zeile im Fuss) ----------------------- */
  .lq-zurueck {
    margin-bottom: clamp(1.4rem, 2.4vw, 2.2rem);
  }
  .lq-zurueck__link {
    display: inline-flex;
    align-items: center;
    gap: .7rem;
    min-height: 44px;
    padding: .55rem 1.1rem .55rem .9rem;
    border: 1px solid var(--qn-linie);
    border-radius: 2px;
    color: var(--hell);
    font-size: .8rem;
    font-weight: 500;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-decoration: none;
    background: rgba(255, 255, 255, .03);
    transition: border-color .15s, color .15s, background-color .15s;
  }
  .lq-zurueck__link:hover {
    border-color: var(--orange);
    color: var(--orange);
    background: rgba(255, 136, 0, .06);
  }
  .lq-zurueck__link:focus-visible {
    outline: 2px solid var(--qn-fokus);
    outline-offset: 3px;
  }
  .lq-zurueck__pfeil {
    flex: none;
    width: .55em;
    height: .55em;
    border-left: 2px solid var(--orange);
    border-bottom: 2px solid var(--orange);
    transform: rotate(45deg);
    transition: translate .15s;
  }
  .lq-zurueck__link:hover .lq-zurueck__pfeil { translate: -3px 0; }

  @media (prefers-reduced-motion: reduce) {
    .lq-pfad__link, .lq-zurueck__link, .lq-zurueck__pfeil { transition: none; }
  }

  /* Klartext-Lexikon: Die Begriffsseite hat oben ihren eigenen kleinen
     Rueckweg ("Alle Begriffe · Bereich"). Neben dem Pfad waere er doppelt;
     den Sprung zum Eintrag uebernimmt der Zurueck-Link im Fuss. */
  .lq-pfad ~ main .qnlx-seite__zurueck { display: none; }
}

@media print {
  .lq-pfad, .lq-zurueck { display: none; }
}
