/* Feedback entry. Tokens come from glass.tokens.css. Copy is in feedback-entry.js. */
button.fb-link {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 0;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
  position: relative;
}
button.fb-link:hover { color: var(--text); background: var(--hover); }
button.fb-link:focus-visible,
.fb-fab:focus-visible,
.fb-pop textarea:focus-visible,
.fb-pop input:focus-visible,
.fb-pop .fb-send:focus-visible,
.fb-pop a.fb-ideas:focus-visible {
  outline: 2px solid rgba(232, 33, 39, .6);
  outline-offset: 2px;
}
button.fb-link .fb-ico { font-weight: 400; }

/* Spec: FAB 900, popover 901, under the sticky nav and modals (>= 1000). */
nav,
header.nav { z-index: 1000; }

.fb-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px 0 14px;
  border-radius: 999px;
  box-sizing: border-box;
  background: var(--glass-strong);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  color: var(--text);
  font: 600 14px/1 inherit;
  font-family: inherit;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .45);
  cursor: pointer;
}
.fb-fab .d {
  width: 8px;
  height: 8px;
  border-radius: 4px;
  background: var(--red);
  flex: 0 0 auto;
}
.fb-fab:hover {
  background: rgba(32, 32, 42, .85);
  border-color: rgba(255, 255, 255, .18);
}
html[data-theme="light"] .fb-fab:hover {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(0, 0, 0, .16);
}
.fb-fab:active { transform: scale(.97); opacity: .9; }

.fb-pop {
  position: fixed;
  right: 24px;
  bottom: 80px;
  z-index: 901;
  width: 340px;
  max-height: calc(100vh - 96px);
  overflow: auto;
  box-sizing: border-box;
  padding: 18px;
  border-radius: 18px;
  background: var(--glass-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  font-family: inherit;
  color: var(--text);
}
.fb-pop[hidden] { display: none !important; }
.fb-pop h4 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}
.fb-pop .fb-intro {
  margin: 0 0 12px;
  color: var(--text3);
  font-size: 13px;
  line-height: 1.45;
}
.fb-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 12px; }
.fb-lbl { font-size: 13px; font-weight: 600; color: var(--text2); }
.fb-help { font-size: 12px; line-height: 1.4; color: var(--text4); }
.fb-pop textarea,
.fb-pop input {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  border-radius: 12px;
  background: var(--glass);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  font: 14px/1.4 inherit;
  font-family: inherit;
}
.fb-pop textarea { height: 84px; resize: none; }
.fb-pop input { height: 40px; }
.fb-pop textarea.is-invalid { border-color: var(--red, #E82127); }
.fb-pop textarea::placeholder,
.fb-pop input::placeholder { color: var(--text4); }
.fb-status { margin: 0 0 4px; font-size: 12px; line-height: 1.4; }
.fb-status:empty { display: none; }
.fb-status.is-error { color: var(--red, #E82127); }
.fb-status a { color: var(--red, #E82127); font-size: 12px; text-decoration: underline; }
.fb-pop .row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.fb-pop a.fb-ideas {
  flex: 1 1 140px;
  min-width: 0;
  color: var(--text3);
  font-size: 13px;
  line-height: 1.35;
  text-decoration: none;
}
.fb-pop a.fb-ideas:hover { color: var(--text); }
.fb-pop .fb-send {
  flex: 0 0 auto;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 12px;
  height: 40px;
  padding: 0 18px;
  font: 700 14px/1 inherit;
  font-family: inherit;
  cursor: pointer;
}
.fb-pop .fb-send:hover { background: var(--red-dark, #B81A1F); }
.fb-pop .fb-send:disabled { opacity: .7; cursor: default; }
.fb-done[hidden],
.fb-pop form[hidden] { display: none !important; }
.fb-success { margin: 0 0 12px; color: var(--text2); font-size: 14px; line-height: 1.45; }

/* Legal pages have a brand + back row, not the marketing nav. */
.top > .nav-right { display: flex; align-items: center; gap: 8px; }

html.fb-blocked .fb-link,
html.fb-blocked .fb-fab,
html.fb-blocked .fb-pop { display: none !important; }

/* Full label needs room beside the theme switch and the nav CTAs.
   Below 960px keep the header control, but icon-only, so the 64px bar
   does not wrap. Spec still hides it below 640px. */
@media (max-width: 960px) {
  button.fb-link .t {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}
@media (max-width: 640px) {
  .fb-link { display: none !important; }
  .fb-fab {
    right: 16px;
    bottom: 16px;
    height: 44px;
    width: 44px;
    padding: 0;
    justify-content: center;
    gap: 0;
  }
  .fb-fab span.t,
  .fb-fab .d { display: none; }
  .fb-fab::before { content: "✎"; font-size: 18px; color: var(--text); }
  .fb-pop { left: 12px; right: 12px; width: auto; bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-fab:active { transform: none; }
}
