/* "Оставить отзыв": a small pill centred above the bottom toolbar. It steps aside while the
   search bar, a toast or (on a phone) a note sheet takes that place. */
.fb-btn {
  position: fixed; left: var(--mid); bottom: 74px; z-index: 15; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px 6px 11px; border-radius: 30px;
  background: var(--glass); backdrop-filter: blur(20px) saturate(1.4);
  border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  transition: left .45s var(--ease), opacity .2s, color .15s, background-color .15s, transform .25s var(--spring);
}
.fb-btn[hidden] { display: none; }
.fb-btn svg.i { width: 15px; height: 15px; flex: none; color: var(--accent); }
.fb-btn:hover { color: var(--text); background: var(--surface); }
.fb-btn:active { transform: translateX(-50%) scale(.95); }
body:has(#searchBar.show) .fb-btn, body:has(#toasts > .toast) .fb-btn {
  opacity: 0; pointer-events: none;
}
body.resizing .fb-btn { transition: none; }

/* In-app feedback card (feedback.js): floats in the bottom-right corner, over the map. */
.fb-card {
  position: fixed; right: 18px; bottom: 72px; z-index: 70; /* above the bottom toolbar, like the toasts */
  width: 330px; max-width: calc(100vw - 24px);
  padding: 18px 18px 16px; border-radius: var(--radius);
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(16px) scale(.97);
  transition: opacity .22s, transform .45s var(--spring);
}
.fb-card.show { opacity: 1; transform: none; }
.fb-card.hide { opacity: 0; transform: translateY(8px) scale(.97); transition-duration: .18s; }
.fb-card [hidden] { display: none !important; }
.fb-close { position: absolute; top: 10px; right: 10px; color: var(--text-3); }
.fb-card h3 { margin: 0 28px 4px 0; font-size: 16px; font-weight: 700; }
.fb-sub { margin: 0 0 12px; font-size: 13px; color: var(--text-2); line-height: 1.4; }
.fb-faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.fb-face {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 10px 4px 8px; border-radius: 16px; border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  transition: background-color .15s, border-color .15s, color .15s, transform .25s var(--spring);
}
.fb-face:hover { background: var(--hover); color: var(--text); }
.fb-face:active { transform: scale(.94); }
.fb-face.on { border-color: var(--accent); color: var(--text); background: var(--active); }
.fb-emoji { font-size: 24px; line-height: 1; }
.fb-more { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.fb-q { font-size: 13px; font-weight: 600; }
.fb-more textarea {
  width: 100%; box-sizing: border-box; resize: vertical; min-height: 70px; max-height: 40vh;
  padding: 9px 11px; border-radius: 14px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: inherit; font-size: 13px; line-height: 1.45;
}
.fb-more textarea:focus { outline: none; border-color: var(--accent); }
.fb-mail { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.fb-mail span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
.fb-long { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-3); text-decoration: none; }
.fb-long:hover { color: var(--text); }
.fb-long svg.i { width: 12px; height: 12px; }
.fb-send { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.fb-send svg.i { width: 15px; height: 15px; flex: none; }
.fb-err { margin: 0; font-size: 12px; color: var(--danger); line-height: 1.4; }
.fb-err a { color: inherit; }
.fb-thanks { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0 4px; font-size: 13px; color: var(--text-2); }
.fb-thanks b { font-size: 16px; color: var(--text); }

@media (max-width: 640px) {
  .fb-card { left: 12px; right: 12px; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); } /* above the toolbar */
  .fb-btn { bottom: calc(70px + env(safe-area-inset-bottom)); }
  body.panel-open .fb-btn { opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
  .fb-card, .fb-card.hide { transition: opacity .15s; transform: none; }
}
