.nyxid-auth-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.45rem;
  min-width: min(28rem, 58vw);
  padding: 0.42rem 0.5rem;
  border: 1px solid #c8d2cc;
  border-radius: 0.65rem;
  background: #f6f9f7;
}

.nyxid-auth-copy {
  display: grid;
  min-width: 0;
  gap: 0.08rem;
}

.nyxid-auth-copy span,
.nyxid-auth-copy strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nyxid-auth-copy span {
  color: #607068;
  font-size: 0.68rem;
}

.nyxid-auth-copy strong {
  color: #1f3c32;
  font-size: 0.76rem;
}

.nyxid-auth-control button {
  min-height: 2rem;
  padding: 0.38rem 0.68rem;
  border: 1px solid #7f968b;
  border-radius: 999px;
  background: #fff;
  color: #21493b;
  font: 700 0.68rem/1.1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
}

.nyxid-auth-control button:hover:not(:disabled),
.nyxid-auth-control button:focus-visible:not(:disabled) {
  border-color: #2f705b;
  background: #e7f1ec;
  outline: 2px solid rgba(47, 112, 91, 0.18);
  outline-offset: 2px;
}

.nyxid-auth-control button:disabled {
  opacity: 0.5;
  cursor: default;
}

.nyxid-auth-control[data-state="authenticated"] {
  border-color: #8ab3a2;
  background: #eef7f2;
}

.nyxid-auth-control[data-state="error"] {
  border-color: #c9958d;
  background: #fff4f2;
}

#nyxid-auth-disconnect {
  color: #69443d;
}

.research-auth-gate {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.research-auth-gate:disabled {
  opacity: 0.58;
}

.research-auth-gate:disabled textarea,
.research-auth-gate:disabled select,
.research-auth-gate:disabled button {
  cursor: not-allowed;
}

.nyxid-callback-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  margin: 0;
  padding: 1.5rem;
  background: #f1f5f2;
}

.nyxid-callback-card {
  width: min(34rem, 100%);
  padding: 2rem;
  border: 1px solid #c7d2cb;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1.2rem 3rem rgba(29, 55, 46, 0.12);
}

.nyxid-callback-card h1 {
  margin-block: 0.35rem 0.75rem;
}

.nyxid-callback-card a {
  display: inline-block;
  margin-top: 1rem;
  color: #285d4b;
  font-weight: 700;
}

.nyxid-callback-page[data-tone="error"] .nyxid-callback-card {
  border-color: #c9958d;
}

@media (max-width: 58rem) {
  .research-console-header {
    align-items: flex-start;
  }

  .research-header-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nyxid-auth-control {
    grid-template-columns: 1fr auto;
    min-width: min(26rem, 78vw);
  }

  .nyxid-auth-copy {
    grid-column: 1 / -1;
  }
}

@media (max-width: 38rem) {
  .nyxid-auth-control {
    width: 100%;
    min-width: 0;
  }

  .nyxid-auth-control button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nyxid-auth-control button {
    transition: none;
  }
}
