/* Bewertung und Teilen: auf allen bewertbaren Inhaltsseiten. */
#page-tools.has-feedback {
  justify-content: flex-start;
  gap: 12px;
}
.feedback-votes { display: inline-flex; align-items: center; background: #f2f2f2; border-radius: 25px; }
:is(#page-tools, #header-feedback) .feedback-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  position: relative; min-height: 30px; padding: 0 10px; border: 0; border-radius: 25px;
  background: transparent; color: #292929; font: 14px/1 Nunito, sans-serif; cursor: pointer;
}
:is(#page-tools, #header-feedback) .feedback-vote { min-width: 60px; font-variant-numeric: tabular-nums; }
.feedback-divider { width: 1px; height: 18px; background: #d0d0d0; }
/* Hinweise oberhalb der Fußleiste, wie im BLP-Projekt. */
:is(#page-tools, #header-feedback) .feedback-vote::before {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 110;
  padding: 6px 8px;
  border-radius: 4px;
  background: #333;
  box-shadow: 0 2px 6px #0003;
  color: #fff;
  font: 12px/1.3 Nunito, sans-serif;
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;
}
@media (hover: hover) {
  :is(#page-tools, #header-feedback) .feedback-vote:hover::before { visibility: visible; }
}
:is(#page-tools, #header-feedback) .feedback-vote:focus-visible::before { visibility: visible; }
.feedback-count-short { display: none; }
.feedback-icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; flex: 0 0 auto; }
.feedback-icon .cuff { fill: none; }
.feedback-icon--down { transform: rotate(180deg); }
.feedback-hand, .feedback-icon .cuff { transition: fill 150ms ease, stroke 150ms ease; }
.feedback-vote[aria-pressed="true"] .feedback-hand,
.feedback-vote[aria-pressed="true"] .cuff { fill: #f5c957; stroke: #936709; }
:is(#page-tools, #header-feedback) .feedback-vote[aria-pressed="true"] { color: #805700; }
:is(#page-tools, #header-feedback) .feedback-button:disabled { cursor: wait; }
:is(#page-tools, #header-feedback) .feedback-button:disabled > * { opacity: .6; }
:is(#page-tools, #header-feedback) .feedback-button:not(:disabled):hover { background: #e9e9e9; }
:is(#page-tools, #header-feedback) .feedback-share { color: #ad1717; background: #fff0ed; }
:is(#page-tools, #header-feedback) .feedback-share:hover { background: #ffe0db; }
:is(#page-tools, #header-feedback) .feedback-top { margin-left: auto; gap: 8px; white-space: nowrap; }
.feedback-message {
  position: absolute; bottom: calc(100% + 8px); left: 12px; margin: 0; padding: 10px 14px;
  max-width: min(440px, calc(100vw - 40px)); border: 1px solid #ddd; border-radius: 6px;
  background: #fff; color: #444; box-shadow: 0 3px 12px #0002; font: 14px/1.5 Nunito, sans-serif;
}
.feedback-message button { font: inherit; color: #c10000; background: none; border: 0; padding: 4px 0; cursor: pointer; text-decoration: underline; }
.feedback-share-dialog { box-sizing: border-box; width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 24px; border: 0; border-radius: 12px; background: #fff; color: #444; font: 16px/1.5 Nunito, sans-serif; box-shadow: 0 8px 40px #0004; }
.feedback-share-dialog::backdrop { background: #0008; }
.feedback-share-dialog label { display: block; margin-bottom: 10px; font-weight: 700; }
.feedback-share-dialog input { box-sizing: border-box; width: 100%; padding: 10px; border: 1px solid #bbb; border-radius: 5px; font: 16px Nunito, sans-serif; }
.feedback-share-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.feedback-share-dialog button { min-height: 44px; border: 0; padding: 8px 14px; border-radius: 22px; background: #f2f2f2; color: #333; font: inherit; cursor: pointer; }
.feedback-share-dialog .feedback-copy { color: #ad1717; background: #fff0ed; }
.feedback-share-status { font-size: 14px; margin: 12px 0 0; }
@media screen and (max-width: 480px) {
  #page-tools.has-feedback { gap: 8px; padding-inline: 10px; }
  :is(#page-tools, #header-feedback) .feedback-button { padding-inline: 8px; }
  :is(#page-tools, #header-feedback) .feedback-vote { min-width: 54px; }
  :is(#page-tools, #header-feedback) .feedback-top { justify-content: center; min-width: 40px; }
  .feedback-top-label { display: none; }
  .feedback-count-full { display: none; }
  .feedback-count-short { display: inline; }
}
@media print { .feedback-share-dialog { display: none; } }
@media screen and (max-width: 360px) {
  :is(#page-tools, #header-feedback) .feedback-share { min-width: 44px; }
  .feedback-share > span { display: none; }
}

/* Die sichtbaren Pillen bleiben kompakt, die Touch-Fläche ist 44 Pixel hoch. */
@media (pointer: coarse) {
  :is(#page-tools, #header-feedback) .feedback-button::after { content: ""; position: absolute; inset: -7px 0; }
}

/* Zweite, synchronisierte Bedienleiste im Desktop-Seitenkopf. */
#header-feedback {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 110;
  margin-left: auto;
  padding-inline: 12px;
}
#header-feedback .feedback-vote::before {
  top: calc(100% + 12px);
  bottom: auto;
}
#header-feedback .feedback-message {
  top: calc(100% + 8px);
  bottom: auto;
  left: auto;
  right: 12px;
  width: max-content;
}
@media screen and (max-width: 989px) {
  #header-feedback { display: none; }
}
@media print {
  #header-feedback { display: none; }
}
