.rx-fb {
  --rx-fb-accent: var(--blue, var(--primary, #074ad6));
  --rx-fb-ink: var(--ink, #0a1b4a);
  --rx-fb-mute: var(--mute, var(--muted, #5c6478));
  --rx-fb-line: var(--line, #e9ddc0);
  --rx-fb-paper: var(--foam, var(--surface, #fff));
  font-family: inherit;
  color: var(--rx-fb-ink);
}

.rx-fb *,
.rx-fb *::before,
.rx-fb *::after {
  box-sizing: border-box;
}

.rx-fb-fab {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 42;
  border: 0;
  background: var(--rx-fb-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(10, 27, 74, 0.28);
}

.rx-fb-fab:hover {
  filter: brightness(1.06);
}

.rx-fb-panel {
  background: var(--rx-fb-paper);
  border: 1px solid var(--rx-fb-line);
  border-radius: 16px;
  padding: 1.15rem 1.2rem 1.25rem;
}

/* Centered modal: the overlay dims and blurs the page behind the panel.
   With interactive-widget=resizes-content (traveler) it also stays centered
   above the on-screen keyboard. */
.rx-fb-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 27, 74, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

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

body.rx-fb-open {
  overflow: hidden;
}

.rx-fb-panel--float {
  width: min(420px, 100%);
  max-height: min(82vh, 82dvh, 560px);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 24px 60px rgba(10, 27, 74, 0.3);
  animation: rxFbPop 180ms ease-out;
}

@keyframes rxFbPop {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }
}

@media (prefers-reduced-motion: reduce) {
  .rx-fb-panel--float {
    animation: none;
  }
}

.rx-fb-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.rx-fb-close {
  flex: none;
  width: 2rem;
  height: 2rem;
  margin: -0.2rem -0.35rem 0 0;
  border: 0;
  background: transparent;
  color: var(--rx-fb-mute);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}

.rx-fb-close:hover {
  color: var(--rx-fb-ink);
  background: color-mix(in srgb, var(--rx-fb-ink) 6%, transparent);
}

.rx-fb-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rx-fb-accent);
}

.rx-fb-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.rx-fb-lede {
  margin: 0 0 1rem;
  color: var(--rx-fb-mute);
  font-size: 0.9rem;
  line-height: 1.45;
}

.rx-fb-form {
  display: grid;
  gap: 0.65rem;
}

.rx-fb-field {
  display: grid;
  gap: 0.3rem;
}

.rx-fb-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rx-fb-mute);
}

.rx-fb-field input,
.rx-fb-field textarea {
  width: 100%;
  font: inherit;
  color: var(--rx-fb-ink);
  background: #fff;
  border: 1px solid var(--rx-fb-line);
  border-radius: 10px;
  padding: 0.65rem 0.75rem;
}

.rx-fb-field textarea {
  min-height: 8rem;
  resize: vertical;
}

.rx-fb-field input:focus,
.rx-fb-field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--rx-fb-accent) 45%, transparent);
  outline-offset: 1px;
}

.rx-fb-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.rx-fb-submit {
  border: 0;
  background: var(--rx-fb-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  cursor: pointer;
}

.rx-fb-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.rx-fb-status {
  margin: 0;
  font-size: 0.82rem;
  color: var(--rx-fb-mute);
}

.rx-fb-status.is-error {
  color: #b42318;
}

.rx-fb-status.is-ok {
  color: #067647;
}

@media (max-width: 900px) {
  /* Traveler mobile: the FAB still stacks above the trip FAB and the pinned
     composer (--composer-h / --shell-bottom come from traveler/styles.css).
     The panel itself is a centered modal now, so no offset needed. */
  .rx-fb--traveler .rx-fb-fab {
    bottom: calc(
      var(--composer-h, 9rem) + var(--shell-bottom, 0.75rem) + 4.1rem
    );
  }

  /* Keep Submit reachable while the on-screen keyboard is open. */
  .rx-fb-field textarea {
    min-height: 6rem;
  }
}
