/* ==========================================================================
   mazpl.net — shared feedback widget styles (all pages)
   Own, self-contained classes (fb-*) so site styles never clash.
   ========================================================================== */

/* Doubled classes beat the sites' `body > *:not(.fx-grid)` lift rule, which
   forces position:relative + z-index:1 on direct body children (the widget
   pill, backdrop and toast are direct body children too). */
.fb-pill.fb-pill {
  position: fixed;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(12px, env(safe-area-inset-bottom, 0px));
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 600 0.78rem/1 system-ui, "Inter", sans-serif;
  letter-spacing: 0.02em;
  color: rgba(235, 240, 248, 0.82);
  background: rgba(16, 20, 28, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 9px 15px 9px 12px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
.fb-pill.fb-pill:hover,
.fb-pill.fb-pill:focus-visible {
  color: rgb(var(--fb-acc, 0, 163, 166));
  border-color: rgba(var(--fb-acc, 0, 163, 166), 0.65);
  transform: translateY(-1px);
}
.fb-pill.fb-pill svg { flex: 0 0 auto; opacity: 0.9; }

/* ---- modal ---- */
.fb-backdrop.fb-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(5, 7, 11, 0.62);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.fb-backdrop.fb-backdrop[hidden] { display: none; }

.fb-modal {
  position: relative;
  width: min(460px, 100%);
  max-height: min(92svh, 640px);
  overflow-y: auto;
  background: #10141d;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 16px;
  padding: 22px 22px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
  font: 15px/1.5 system-ui, "Inter", sans-serif;
  color: #e6e9ef;
  animation: fb-pop 0.22s ease;
}
@keyframes fb-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .fb-modal { animation: none; } }

.fb-x {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b93a5;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
}
.fb-x:hover, .fb-x:focus-visible { color: #fff; background: rgba(255, 255, 255, 0.08); }

.fb-modal h3 { margin: 0 26px 2px 0; font-size: 1.05rem; font-weight: 700; }
.fb-sub { margin: 0 0 14px; color: #8b93a5; font-size: 0.85rem; }

.fb-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.fb-kind {
  font: 600 0.8rem/1 system-ui, "Inter", sans-serif;
  color: #aab2c0;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 8px 13px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.fb-kind:hover, .fb-kind:focus-visible { color: #fff; border-color: rgba(255, 255, 255, 0.3); }
.fb-kind.active {
  color: rgb(var(--fb-acc, 0, 163, 166));
  border-color: rgba(var(--fb-acc, 0, 163, 166), 0.75);
  background: rgba(var(--fb-acc, 0, 163, 166), 0.10);
}

#fb-msg, #fb-contact {
  width: 100%;
  box-sizing: border-box;
  background: #0b0f17;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #e6e9ef;
  font: inherit;
  font-size: 0.9rem;
  padding: 10px 12px;
  resize: vertical;
}
#fb-msg { min-height: 104px; }
#fb-msg:focus, #fb-contact:focus {
  outline: none;
  border-color: rgba(var(--fb-acc, 0, 163, 166), 0.8);
}
#fb-contact { margin-top: 8px; }
#fb-msg::placeholder, #fb-contact::placeholder { color: #5d6575; }

.fb-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.fb-hint { flex: 1; font-size: 0.8rem; color: #8b93a5; min-height: 1em; }
.fb-hint.err { color: #fca5a5; }
.fb-send {
  font: 700 0.85rem/1 system-ui, "Inter", sans-serif;
  color: #06110d;
  background: rgb(var(--fb-acc, 0, 163, 166));
  border: 0;
  border-radius: 10px;
  padding: 10px 22px;
  cursor: pointer;
  transition: filter 0.15s ease, transform 0.15s ease;
}
.fb-send:hover, .fb-send:focus-visible { filter: brightness(1.12); }
.fb-send:active { transform: scale(0.97); }
.fb-send:disabled { opacity: 0.55; cursor: wait; }

/* ---- toast ---- */
.fb-toast.fb-toast {
  position: fixed;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%) translateY(8px);
  z-index: 10050;
  background: #10141d;
  color: #e6e9ef;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 18px;
  font: 600 0.85rem/1 system-ui, "Inter", sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
  max-width: calc(100vw - 40px);
  text-align: center;
}
.fb-toast.fb-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
