/* Compact early-access / waitlist widget, pinned to the bottom-right corner.
   Deliberately small so it stays out of the way of the page content and the
   floating back-to-top button. */
.qw-waitlist {
  position: fixed;
  right: 28px;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: min(300px, calc(100vw - 40px));
  font: 14px/1.4 Qute, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #19182b;
}

.qw-waitlist-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-left: auto;
  padding: 10px 16px;
  border: 1px solid #d1cfde;
  border-radius: 999px;
  background: #ffffff;
  color: #19182b;
  font: inherit;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(25, 24, 43, 0.12);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.qw-waitlist-toggle:hover {
  color: #5754ff;
  border-color: #5754ff;
  transform: translateY(-2px);
}

.qw-waitlist-toggle:focus-visible,
.qw-waitlist-input:focus-visible,
.qw-waitlist-submit:focus-visible,
.qw-waitlist-close:focus-visible {
  outline: 3px solid #5754ff;
  outline-offset: 3px;
}

.qw-waitlist-panel {
  position: relative;
  width: 100%;
  margin-top: 10px;
  padding: 18px 18px 16px;
  border: 1px solid #e5e4ef;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(25, 24, 43, 0.18);
}

.qw-waitlist-panel[hidden] {
  display: none;
}

.qw-waitlist-close {
  position: absolute;
  top: 3px;
  right: 5px;
  width: 34px;
  height: 34px;
  border: 0;
  background: none;
  color: #8b8a9e;
  font: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.qw-waitlist-close:hover {
  color: #19182b;
}

.qw-waitlist-title {
  margin: 0 0 12px;
  padding-right: 26px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
}

.qw-waitlist-row {
  display: flex;
  gap: 8px;
}

.qw-waitlist-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #e5e4ef;
  border-radius: 999px;
  background: #fafaff;
  color: #19182b;
  font: inherit;
}

.qw-waitlist-input::placeholder {
  color: #8b8a9e;
}

.qw-waitlist-submit {
  flex: none;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: #5754ff;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.qw-waitlist-submit:hover {
  background: #4643db;
}

.qw-waitlist-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.qw-waitlist-status {
  margin: 10px 0 0;
  color: #54586a;
  font-size: 12px;
  line-height: 1.5;
}

.qw-waitlist-status:empty {
  margin: 0;
}

.qw-waitlist-status.is-error {
  color: #c0392b;
}

.qw-waitlist-status.is-success {
  color: #1e8e5a;
}

@media (max-width: 700px) {
  .qw-waitlist {
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
    width: min(300px, calc(100vw - 32px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .qw-waitlist-toggle,
  .qw-waitlist-submit {
    transition: none;
  }
  .qw-waitlist-toggle:hover {
    transform: none;
  }
}
