/* "Try it out" of the AsyncAPI page, see `try.js`. The button is at the
   bottom left, because the menu button of the page is at the bottom right. */
.fdv-try-open {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 60;
  padding: 0.6rem 1rem;
  border: 0;
  border-radius: 9999px;
  background: #1f2937;
  color: #fff;
  font: 600 0.9rem/1 sans-serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgb(0 0 0 / 30%);
}

.fdv-try-dialog {
  width: min(48rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font: 0.9rem/1.4 sans-serif;
  color: #111827;
  background: #fff;
}

.fdv-try-dialog::backdrop {
  background: rgb(0 0 0 / 40%);
}

.fdv-try-dialog header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.fdv-try-dialog h2 {
  margin: 0;
  font-size: 1.2rem;
}

.fdv-try-close {
  border: 0;
  background: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.fdv-try-help {
  color: #4b5563;
}

.fdv-try-help a {
  color: #2563eb;
}

.fdv-try-form label {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
  align-items: center;
  margin: 0.4rem 0;
}

.fdv-try-form label > span {
  min-width: 7rem;
  font-family: monospace;
}

.fdv-try-form input,
.fdv-try-form select {
  flex: 1 1 16rem;
  min-width: 0;
  padding: 0.3rem 0.4rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  font: 0.85rem monospace;
}

.fdv-try-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}

.fdv-try-buttons button {
  padding: 0.35rem 0.8rem;
  border: 1px solid #9ca3af;
  border-radius: 0.25rem;
  background: #f3f4f6;
  cursor: pointer;
}

.fdv-try-buttons button[type="submit"] {
  border-color: #1f2937;
  background: #1f2937;
  color: #fff;
}

.fdv-try-status {
  margin-left: auto;
  font-family: monospace;
  color: #4b5563;
}

.fdv-try-log {
  max-height: 50vh;
  margin: 0.8rem 0 0;
  padding: 0;
  overflow: auto;
  list-style: none;
  border-top: 1px solid #e5e7eb;
}

.fdv-try-log li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #e5e7eb;
  overflow-wrap: anywhere;
}

.fdv-try-log time {
  margin-right: 0.5rem;
  font: 0.75rem monospace;
  color: #6b7280;
}

.fdv-try-log pre {
  margin: 0.3rem 0 0;
  padding: 0.4rem;
  overflow-x: auto;
  background: #f9fafb;
  font-size: 0.8rem;
}

.fdv-try-error span {
  color: #b91c1c;
}

.fdv-try-state span {
  color: #4b5563;
}
