/* Card-side feedback: the tab protrudes 12px into the page gutter. */
body .card .recommendation-feedback {
  position: absolute;
  inset: 0;
  z-index: 3;
  padding: 0;
  pointer-events: none;
}
body .card:has(.recommendation-feedback.is-open) { z-index: 4; }
.feedback-drawer-tab {
  position: absolute;
  right: -12px;
  bottom: 76px;
  width: 28px;
  min-height: 68px;
  padding: 10px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  letter-spacing: .12em;
  border: 1px solid var(--action-border);
  border-left-color: var(--line);
  border-radius: 0 8px 8px 0;
  background: var(--pale);
  color: var(--action-ink);
  font-size: 13px;
  line-height: 1.3;
  box-shadow: 3px 2px 5px #7653330b;
  pointer-events: auto;
  transition: background .18s ease, color .18s ease;
}
.feedback-drawer-tab[aria-expanded="true"] { background: var(--action-primary); color: var(--action-surface); border-color: var(--action-primary); }
.feedback-drawer-tab:disabled { cursor: wait; }
.feedback-drawer-panel {
  position: absolute;
  right: 8px;
  bottom: 16px;
  width: min(300px, calc(100% - 24px));
  padding: 14px;
  border: 1px solid var(--action-border);
  border-radius: 12px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 8px 30px #65472726;
  pointer-events: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 0;
  transform: translateX(12px) scale(.98);
  transform-origin: right bottom;
  transition: opacity .2s ease, transform .2s cubic-bezier(.2,.7,.3,1);
}
.feedback-drawer-panel.is-visible { opacity: 1; transform: translateX(0) scale(1); }
.feedback-drawer-panel[hidden], .feedback-drawer-panel [hidden] { display: none !important; }
.feedback-drawer-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.feedback-drawer-heading strong { font-size: 15px; font-weight: 600; }
.feedback-drawer-close { display: grid; place-items: center; width: 36px; height: 36px; min-height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 25px; line-height: 1; }
.feedback-drawer-panel .feedback-reactions { gap: 8px; }
.feedback-drawer-panel .feedback-chip { min-height: 40px; border-color: var(--action-border); background: var(--action-surface); color: var(--action-ink); }
.feedback-drawer-panel .feedback-chip[aria-pressed="true"] { background: var(--action-hover); border-color: var(--action-border); color: var(--action-ink); }
.feedback-drawer-panel .feedback-chip:disabled { opacity: .65; }
.feedback-drawer-panel .feedback-reasons { gap: 8px; margin-top: 12px; }
.feedback-drawer-panel .feedback-reasons label { width: 100%; }
.feedback-drawer-panel .feedback-reasons select { width: 100%; min-height: 40px; color: var(--ink); background: var(--white); border: 1px solid var(--action-border); border-radius: 7px; }
.feedback-drawer-privacy { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: var(--muted); }
.feedback-drawer-panel .feedback-mini-status { color: var(--action-ink); font-size: 13px; }
@media (hover: hover) {
  .feedback-drawer-tab:hover { background: var(--action-hover); color: var(--action-ink); }
  .feedback-drawer-close:hover { background: var(--pale); }
  .feedback-drawer-panel .feedback-chip:not(:disabled):hover { background: var(--action-hover); border-color: var(--action-border); }
}
@media (max-width: 650px) {
  .feedback-drawer-panel { right: 7px; bottom: 12px; padding: 12px; }
  .feedback-drawer-panel .feedback-reasons select { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .feedback-drawer-tab, .feedback-drawer-panel { transition: none; }
  .feedback-drawer-panel { transform: none; }
}

.feedback-drawer-tab[aria-expanded="true"],.feedback-drawer-tab[aria-expanded="true"]:hover{background:var(--action-primary);border-color:var(--action-primary);color:#fff}
