/* Feedback button + modal (task 040). */

.fb-fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 40;
  min-height: 40px;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-12);
  border: 1px solid var(--color-line);
  background: var(--color-bg);
  color: var(--color-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-menu);
  cursor: pointer;
}
.fb-fab:hover {
  border-color: var(--color-ink-soft, #64748b);
}
.fb-fab:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* Mobile: live in the hamburger / overflow menu, not as a FAB. */
@media (max-width: 767.98px) {
  .fb-fab {
    display: none !important;
  }
}

/* Editor: never cover canvas controls — hide FAB; use menus instead. */
body.editor-page .fb-fab {
  display: none !important;
}

.fb-mobile-link {
  display: none;
}
@media (max-width: 767.98px) {
  .fb-mobile-link {
    display: block;
  }
}

.fb-modal[hidden] {
  display: none !important;
}
.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}
@media (min-width: 640px) {
  .fb-modal {
    align-items: center;
    padding: 1.5rem;
  }
}
.fb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}
.fb-card {
  position: relative;
  z-index: 1;
  width: min(100%, 440px);
  max-height: min(92vh, 720px);
  overflow: auto;
  background: var(--color-bg);
  color: var(--color-ink);
  border-radius: 16px 16px 0 0;
  box-shadow: var(--shadow-menu);
  padding: 1.15rem 1.15rem 1.35rem;
}
@media (min-width: 640px) {
  .fb-card {
    border-radius: 16px;
  }
}
.fb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.fb-head h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.fb-close {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--color-ink);
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 8px;
}
.fb-close:hover {
  background: var(--color-surface, #f1f5f9);
}
.fb-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}
.fb-field label {
  font-size: 13px;
  font-weight: 600;
}
.fb-field select,
.fb-field input[type="email"],
.fb-field textarea {
  min-height: 44px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-10);
  font: inherit;
  background: var(--color-bg);
  color: var(--color-ink);
}
.fb-field textarea {
  min-height: 120px;
  resize: vertical;
}
.fb-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 13px;
  margin-bottom: 0.85rem;
}
.fb-check input {
  margin-top: 0.2rem;
}
.fb-shot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.fb-preview {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}
.fb-preview[hidden] {
  display: none !important;
}
.fb-preview img {
  display: block;
  max-width: 100%;
  max-height: 160px;
  border-radius: 8px;
  border: 1px solid var(--color-line);
}
.fb-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  min-height: 32px;
  padding: 0.25rem 0.55rem;
  font-size: 12px;
}
.fb-privacy {
  font-size: 12px;
  color: var(--color-ink-soft, #64748b);
  margin: 0 0 0.85rem;
}
.fb-privacy a {
  color: inherit;
  text-decoration: underline;
}
.fb-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}
.fb-error {
  color: var(--color-fail, #b91c1c);
  font-size: 13px;
  margin: 0 0 0.75rem;
}
.fb-error[hidden] {
  display: none !important;
}
.fb-thanks {
  text-align: center;
  padding: 1.5rem 0.5rem;
}
.fb-thanks p {
  margin: 0 0 1rem;
  font-size: 1.05rem;
}
/* Honeypot — visually hidden, not display:none (some bots skip display:none). */
.fb-hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.fb-report-link {
  display: inline-block;
  margin-top: 0.65rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
}
.ed-loading .fb-report-link,
#aiMsg .fb-report-link {
  color: var(--color-accent);
}
