/* ==========================================================================
   Beitragsdesign (11.10.2026) - nur im neuen Layout geladen
   ==========================================================================

   Variante B: das Werk bleibt frei, die Aktionsleiste steht DANEBEN - breit
   genug als schmale Spalte, bei 320 px als Zeile darunter. Einzige
   Ueberlagerung des Mediums ist der kleine Hinweis Premium/Exclusive.

   Die Reihenfolge steht im DOM (Werk, dann Leiste). Hier wird nichts
   umsortiert - keine order-Eigenschaft.

   Farben und Masse aus aeonwall-detail.css (.awu-det: --d-v, --d-line ...).
   Keine globale Regel: jede steht unter .awu-det. Der Viewport-Metatag und
   die untere Navigation bleiben unberuehrt; die Leiste liegt im Fluss, nicht
   fixiert, und kann deshalb nichts ueberdecken.
   ========================================================================== */

.awu-det {
    --awu-bt-breite: 56px;
    --awu-bt-knopf: 44px;
    --awu-bt-oben: 88px;
}

/* ------------------------------------------------------------ Werk + Leiste */

/* Die Werkspalte ist hoechstens so breit wie das Werk; Werk und Leiste stehen
   gemeinsam in der Mitte. Sonst stuende die Leiste bei einem Hochformat am
   Kartenrand, weit weg vom Werk, zu dem sie gehoert. */
.awu-det .awu-bt-buehne {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, max-content) var(--awu-bt-breite);
    justify-content: center;
    align-items: start;
    gap: 8px;
}

/* Oben buendig mit der Leiste: aeonwall-detail.css zentriert den Rahmen in
   der Buehne (align-self: center) - im Raster hiesse das eine Luecke ueber
   einem Querformat, sobald die Leiste hoeher ist als das Werk. */
.awu-det .awu-bt-buehne > .awu-det__frame {
    align-self: start;
    justify-self: center;
    min-width: 0;
    max-width: 100%;
}

.awu-det .awu-bt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: var(--awu-bt-breite);
    padding-block: 2px;
}

.awu-det .awu-bt [hidden] { display: none !important; }

.awu-det .awu-bt__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Collect steht abgesetzt am Ende - eine Luecke, kein anderes Gewicht. */
.awu-det .awu-bt__item--end { margin-block-start: 10px; }

.awu-det .awu-bt__form { margin: 0; }

.awu-det .awu-bt__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: var(--awu-bt-knopf);
    min-height: var(--awu-bt-knopf);
    padding: 0;
    border: 1px solid var(--d-line);
    border-radius: 50%;
    background: var(--d-glass-solid);
    color: var(--d-ink-2);
    font-size: 19px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.awu-det .awu-bt__btn:hover {
    background: var(--d-v-a10);
    border-color: var(--d-v-a35);
    color: var(--d-v-600);
}

.awu-det .awu-bt__btn:focus-visible,
.awu-det .awu-bt__count--btn:focus-visible,
.awu-det .awu-qr__btn:focus-visible,
.awu-det .awu-bt-zeile__btn:focus-visible {
    outline: 3px solid var(--d-v-600);
    outline-offset: 2px;
}

/*
 * Aktiv: Fuellung UND doppelter Rand UND (bei Love/Collect) ein gefuelltes
 * Symbol - nie allein die Farbe.
 */
.awu-det .awu-bt__btn[aria-pressed="true"] {
    background: var(--d-v-a16);
    border-color: var(--d-v-600);
    box-shadow: inset 0 0 0 1px var(--d-v-600);
    color: var(--d-v-600);
}

/* Nicht bedienbar: blass, gestrichelt, ohne Hover. */
.awu-det .awu-bt__btn:disabled,
.awu-det .awu-bt__btn[aria-disabled="true"] {
    border-style: dashed;
    background: transparent;
    color: var(--d-faint);
    cursor: not-allowed;
}

.awu-det .awu-bt__btn[aria-busy="true"] { cursor: progress; opacity: 0.7; }

/* Der Name steht fuer Screenreader im Knopf; sichtbar sind Symbol und Zahl. */
.awu-det .awu-bt__label {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.awu-det .awu-bt__count {
    display: block;
    min-height: 18px;
    color: var(--d-ink-2);
    font-size: 12px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    line-height: 18px;
    text-align: center;
}

/* Die Zahl der Loves oeffnet die Liste - ein eigener Knopf mit voller Flaeche. */
.awu-det .awu-bt__count--btn {
    min-width: var(--awu-bt-knopf);
    min-height: var(--awu-bt-knopf);
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.awu-det .awu-bt__count--btn:hover { color: var(--d-v-600); }

/* ------------------------------------------------- Kennzeichnung auf dem Werk */

.awu-det .awu-bt-kennung {
    position: absolute;
    z-index: 3;
    top: 10px;
    inset-inline-start: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: calc(100% - 20px);
    padding: 4px 10px;
    border: 1px solid hsl(0 0% 100% / 0.35);
    border-radius: 999px;
    background: hsl(240 18% 8% / 0.86);
    color: #fff;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.3;
    pointer-events: none;
}

/* ------------------------------------------- Teilen und Bearbeiten (engage) */

.awu-det .awu-bt-zeile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.awu-det .awu-bt-zeile__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid var(--d-line);
    border-radius: 999px;
    background: var(--d-glass-solid);
    color: var(--d-ink-2);
    font-weight: 600;
    cursor: pointer;
}

.awu-det .awu-bt-zeile__btn:hover { background: var(--d-v-a10); color: var(--d-v-600); }

/* ------------------------------------------------------- Schnellreaktionen */

.awu-det .awu-qr { margin: 2px 0 12px; }

.awu-det .awu-qr [hidden] { display: none !important; }

.awu-det .awu-qr__title {
    margin: 0 0 6px;
    color: var(--d-muted);
    font-size: 13px;
    font-weight: 600;
}

.awu-det .awu-qr__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.awu-det .awu-qr__form { margin: 0; }

.awu-det .awu-qr__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid var(--d-line);
    border-radius: 999px;
    background: var(--d-inset);
    color: var(--d-ink);
    cursor: pointer;
    transition: background-color 0.12s ease, border-color 0.12s ease;
}

.awu-det .awu-qr__btn:hover { background: var(--d-v-a10); border-color: var(--d-v-a35); }

.awu-det .awu-qr__btn[aria-pressed="true"] {
    border-color: var(--d-v-600);
    box-shadow: inset 0 0 0 1px var(--d-v-600);
    background: var(--d-v-a16);
}

.awu-det .awu-qr__btn[aria-pressed="true"] .awu-qr__count { font-weight: 800; }

.awu-det .awu-qr__btn[aria-busy="true"] { cursor: progress; }

.awu-det .awu-qr__glyph { font-size: 20px; line-height: 1; }

.awu-det .awu-qr__count {
    font-size: 12.5px;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------- Kommentare ohne Skript */

.awu-det .awu-bt-ohneskript > li { padding: 8px 0; border-top: 1px solid var(--d-line-soft); }
.awu-det .awu-bt-ohneskript__wer { margin: 0 0 2px; font-weight: 650; }
.awu-det .awu-bt-ohneskript__was { margin: 0; overflow-wrap: anywhere; white-space: pre-line; }

/* ------------------------------------------------------------ Breiten */

/* 320 px: die Leiste wird eine Zeile unter dem Werk - dieselben Knoepfe. */
@media (max-width: 359.98px) {
    .awu-det .awu-bt-buehne { grid-template-columns: minmax(0, 1fr); }

    .awu-det .awu-bt {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        width: auto;
        padding-block: 4px 0;
    }

    .awu-det .awu-bt__item--end { margin-block-start: 0; }
}

/* Tablet und breiter: etwas mehr Flaeche, und die Leiste begleitet ein hohes
   Werk beim Scrollen - innerhalb der Buehne, unter der klebenden Kopfzeile. */
@media (min-width: 768px) {
    .awu-det {
        --awu-bt-breite: 64px;
        --awu-bt-knopf: 48px;
    }

    .awu-det .awu-bt {
        position: sticky;
        top: var(--awu-bt-oben);
    }
}

/* Querformat am Handy: wenig Hoehe - nicht kleben, damit nichts verdeckt wird. */
@media (max-height: 480px) and (orientation: landscape) {
    .awu-det .awu-bt { position: static; }
}

@media (prefers-reduced-motion: reduce) {
    .awu-det .awu-bt__btn,
    .awu-det .awu-qr__btn { transition: none; }
}
