/* Sitewide feedback widget — a persistent tab + modal form for reporting
   bugs/content errors/suggestions, wired up by feedback-widget.js.
   Every color falls back to a hardcoded value so this drops into any
   page regardless of that page's own --token naming, same pattern as
   mobile-nav.css and the "Locked Premium Feature" modal component. */

/* Bottom-right corner round button (Intercom/Zendesk-style chat-bubble
   position) -- was a side tab pinned to the right edge, which read as an
   unfamiliar placement next to the rest of the site's fixed UI. Icon
   only; the label stays in markup for the aria-label but is visually
   hidden, same convention as those tools use. */
.fbw-tab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--surface-1, #1a1c1f);
  border: 1px solid var(--border-strong, rgba(216, 220, 230, 0.18));
  border-radius: 50%;
  color: var(--text, #d8dce6);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.fbw-tab:hover {
  transform: translateY(-2px);
  border-color: var(--lime, #c8f000);
  color: var(--lime, #c8f000);
  background: var(--surface-2, #202226);
}
.fbw-tab svg { width: 22px; height: 22px; flex: 0 0 auto; }
.fbw-tab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

@media (max-width: 640px) {
  .fbw-tab { right: 16px; bottom: 16px; width: 46px; height: 46px; }
  .fbw-tab svg { width: 20px; height: 20px; }
}

.fbw-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(8, 9, 10, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.fbw-overlay.open { opacity: 1; pointer-events: auto; }

.fbw-modal {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface-1, #1a1c1f);
  border: 1px solid var(--border-strong, rgba(216, 220, 230, 0.18));
  border-radius: var(--radius-card, 8px);
  padding: 32px 28px 28px;
  transform: translateY(8px) scale(0.98);
  transition: transform 0.2s ease;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}
.fbw-overlay.open .fbw-modal { transform: translateY(0) scale(1); }

.fbw-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted, #8a8f9a);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  border-radius: var(--radius-btn, 6px);
}
.fbw-close:hover { color: var(--text, #d8dce6); background: var(--surface-2, #202226); }

.fbw-title {
  font-family: var(--font-display, 'Syne', sans-serif);
  font-weight: 700;
  font-size: 20px;
  color: var(--text, #f2f4f8);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.fbw-subtitle {
  font-family: var(--font-body, 'Epilogue', sans-serif);
  font-size: 13px;
  color: var(--muted, #8a8f9a);
  line-height: 1.6;
  margin-bottom: 18px;
}
.fbw-page-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 11px;
  color: var(--lime, #c8f000);
  background: var(--accent-dim, rgba(200, 240, 0, 0.08));
  border: 1px solid rgba(200, 240, 0, 0.2);
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 18px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fbw-field { margin-bottom: 16px; }
.fbw-label {
  display: block;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted, #8a8f9a);
  margin-bottom: 6px;
}
.fbw-label .fbw-optional { text-transform: none; letter-spacing: 0; opacity: 0.7; }
.fbw-select,
.fbw-textarea,
.fbw-input {
  width: 100%;
  background: var(--surface-2, #202226);
  border: 1px solid var(--border-soft, rgba(216, 220, 230, 0.14));
  border-radius: var(--radius-btn, 6px);
  color: var(--text, #d8dce6);
  font-family: var(--font-body, 'Epilogue', sans-serif);
  font-size: 13.5px;
  padding: 10px 12px;
  resize: vertical;
}
.fbw-textarea { min-height: 72px; }
.fbw-select:focus,
.fbw-textarea:focus,
.fbw-input:focus {
  outline: none;
  border-color: var(--lime, #c8f000);
}

.fbw-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.fbw-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  font-family: var(--font-body, 'Epilogue', sans-serif);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 20px;
  border-radius: var(--radius-btn, 6px);
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.fbw-btn:hover { transform: translateY(-1px); }
.fbw-btn:disabled { opacity: 0.6; cursor: default; transform: none; }
.fbw-btn-primary { background: var(--lime, #c8f000); color: #111214; }
.fbw-btn-primary:hover:not(:disabled) { opacity: 0.9; }
.fbw-btn-secondary {
  background: transparent;
  color: var(--text, #d8dce6);
  border: 1px solid var(--border-strong, rgba(216, 220, 230, 0.18));
}

.fbw-error {
  color: var(--red, #ff6b6b);
  font-size: 12.5px;
  margin-top: -6px;
  margin-bottom: 14px;
  display: none;
}
.fbw-error.show { display: block; }

.fbw-success {
  text-align: center;
  padding: 12px 0 4px;
}
.fbw-success svg { width: 40px; height: 40px; margin-bottom: 14px; }
.fbw-success p { color: var(--text, #d8dce6); font-size: 14px; line-height: 1.6; }
