/* The in-app feedback modal (includes/feedbackWidget.php) and the floating
   button that is one of its entry points. Rebuilt 2026-09-16 alongside the
   widget itself; the old file styled a single untyped textarea. */

.fb-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 900;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--mk-ink, #14181b);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16), 0 10px 28px -14px rgba(0, 0, 0, 0.5);
  transition: transform 0.14s, background 0.14s;
}

.fb-fab:hover {
  background: var(--mk-accent, #1b5e20);
  transform: translateY(-1px);
}

/* ------------------------------------------------------------------ modal */

.fb-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(12, 18, 14, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
}

.fb-modal[hidden] {
  display: none !important;
}

.fb-card {
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

.fb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--mk-line, #e2e8e3);
}

.fb-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--mk-ink, #14181b);
}

.fb-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  color: var(--mk-ink-3, #7d888e);
  cursor: pointer;
  padding: 0 4px;
}

.fb-close:hover {
  color: var(--mk-ink, #14181b);
}

.fb-body,
.fb-done {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* SETTING display DEFEATS THE hidden ATTRIBUTE, and this bit us: the rules
   above give .fb-done display:flex, so `doneEl.hidden = true` did nothing and
   the "thanks, that reached us" panel rendered underneath the form from the
   moment the modal opened. The same would have happened to the form itself
   after a successful send, and to the context box when there was none.
   One rule, scoped to the card, so anything toggled with .hidden inside it
   actually hides. */
.fb-card [hidden] {
  display: none !important;
}

/* ------------------------------------------------------------- type picker */

.fb-types {
  border: none;
  margin: 0;
  padding: 0;
}

.fb-types legend {
  font-size: 12px;
  font-weight: 660;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mk-ink-3, #7d888e);
  padding: 0;
  margin-bottom: 9px;
}

.fb-type-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

@media (max-width: 520px) {
  .fb-type-grid {
    grid-template-columns: 1fr;
  }
}

.fb-type {
  display: block;
  border: 1px solid var(--mk-line-strong, #cfd8d1);
  border-radius: 9px;
  padding: 9px 11px;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
  min-width: 0;
}

.fb-type:hover {
  border-color: var(--mk-accent, #1b5e20);
}

.fb-type input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.fb-type:has(input:checked) {
  border-color: var(--mk-accent, #1b5e20);
  background: var(--mk-accent-soft, #eef4ec);
  box-shadow: inset 0 0 0 1px var(--mk-accent, #1b5e20);
}

.fb-type:has(input:focus-visible) {
  outline: 2px solid var(--mk-accent, #1b5e20);
  outline-offset: 2px;
}

.fb-type-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mk-ink, #14181b);
}

.fb-type-hint {
  display: block;
  font-size: 11.5px;
  line-height: 1.4;
  color: var(--mk-ink-3, #7d888e);
  margin-top: 2px;
}

/* ----------------------------------------------------------- what is sent */

.fb-context {
  border: 1px dashed var(--mk-accent-border, #cfe0cd);
  background: var(--mk-accent-soft, #eef4ec);
  border-radius: 9px;
  padding: 10px 13px;
}

.fb-context-head {
  margin: 0 0 5px;
  font-size: 11px;
  font-weight: 660;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--mk-accent, #1b5e20);
}

.fb-context ul {
  margin: 0;
  padding-left: 16px;
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--mk-ink-2, #4b555b);
}

/* ------------------------------------------------------------- the message */

.fb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fb-field label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--mk-ink, #14181b);
}

.fb-field textarea {
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  color: var(--mk-ink, #14181b);
  background: #fff;
  border: 1px solid var(--mk-line-strong, #cfd8d1);
  border-radius: 9px;
  padding: 10px 12px;
  resize: vertical;
  min-height: 110px;
  width: 100%;
}

.fb-field textarea:focus {
  outline: none;
  border-color: var(--mk-accent, #1b5e20);
  box-shadow: 0 0 0 3px var(--mk-accent-soft, #eef4ec);
}

.fb-status {
  margin: 0;
  font-size: 13px;
  color: var(--mk-danger, #a12b2b);
  min-height: 1.2em;
}

.fb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.fb-btn {
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  padding: 9px 17px;
  cursor: pointer;
  border: 1px solid transparent;
}

.fb-btn-primary {
  background: var(--mk-accent, #1b5e20);
  color: #fff;
  border-color: var(--mk-accent, #1b5e20);
}

.fb-btn-primary:hover {
  background: var(--mk-accent-hover, #2e7d32);
}

.fb-btn-primary:disabled {
  opacity: 0.55;
  cursor: default;
}

.fb-btn-ghost {
  background: transparent;
  color: var(--mk-ink-2, #4b555b);
  border-color: var(--mk-line-strong, #cfd8d1);
}

.fb-btn-ghost:hover {
  color: var(--mk-ink, #14181b);
  border-color: var(--mk-ink-3, #7d888e);
}

/* ------------------------------------------------------------ after sending */

.fb-done h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--mk-accent, #1b5e20);
}

.fb-done p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--mk-ink-2, #4b555b);
}

/* -------------------------------------- the map credit strip's own entry point */

.map-sources-report {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px 10px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  color: var(--mk-accent, #1b5e20);
  background: var(--mk-accent-soft, #eef4ec);
  border: 1px solid var(--mk-accent-border, #cfe0cd);
  border-radius: 7px;
  cursor: pointer;
}

.map-sources-report:hover {
  background: #fff;
  border-color: var(--mk-accent, #1b5e20);
}
