/* Per-page feedback widget — v5 aesthetic
   Tokens (mirrored from shared/v5-tokens.css):
   ink #0E0E10 · text #3F3F46 · muted #6B7280 · hairline #D4D7DC
   surface #FFFFFF · done #16A34A · danger #DC2626 · accent #2563EB
*/

#fb-btn {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid #D4D7DC;
  color: #6B7280;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(14, 14, 16, 0.08);
  z-index: 9998;
  transition: color 120ms ease, border-color 120ms ease, transform 120ms ease;
  padding: 0;
}
#fb-btn:hover { color: #0E0E10; border-color: #9CA3AF; transform: translateY(-1px); }
#fb-btn:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
#fb-btn svg { width: 16px; height: 16px; display: block; }

#fb-pop {
  position: fixed;
  bottom: 64px;
  right: 16px;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #FFFFFF;
  border: 1px solid #D4D7DC;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(14, 14, 16, 0.12);
  font-family: Inter, system-ui, sans-serif;
  font-size: 13px;
  color: #3F3F46;
  z-index: 9999;
  overflow: hidden;
}
#fb-pop[hidden] { display: none; }

#fb-pop .fb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px 4px;
}
#fb-pop .fb-header h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #0E0E10;
  letter-spacing: 0;
}
#fb-close {
  background: none;
  border: 0;
  color: #6B7280;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
}
#fb-close:hover { color: #0E0E10; }

#fb-where {
  padding: 0 14px 8px;
  font-size: 11px;
  color: #6B7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#fb-body {
  display: block;
  width: calc(100% - 28px);
  margin: 0 14px;
  padding: 8px 10px;
  border: 1px solid #D4D7DC;
  border-radius: 4px;
  resize: vertical;
  min-height: 90px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  color: #0E0E10;
  box-sizing: border-box;
}
#fb-body::placeholder { color: #9CA3AF; }
#fb-body:focus { outline: 2px solid #2563EB; outline-offset: -1px; border-color: transparent; }

#fb-pop .fb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px 12px;
  gap: 8px;
}
.fb-status {
  font-size: 11px;
  color: #6B7280;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fb-status.success { color: #16A34A; }
.fb-status.error { color: #DC2626; }

#fb-submit {
  background: #0E0E10;
  color: #FFFFFF;
  border: 0;
  border-radius: 4px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 120ms ease;
}
#fb-submit:hover { background: #3F3F46; }
#fb-submit:disabled { background: #9CA3AF; cursor: not-allowed; }
#fb-submit:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }

@media (max-width: 480px) {
  #fb-pop { left: 16px; right: 16px; width: auto; bottom: 64px; }
}

@media print {
  #fb-btn, #fb-pop { display: none !important; }
}
