/* Emailed-code sign-in page: the main button, the link buttons and their busy states. */

/* ---------- buttons ---------- */

.btn-primary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  height: 3rem;
  margin-top: 0.4rem;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 0.625rem;
  background: var(--brand);
  color: #fff;
  font: 600 1rem/1 var(--font);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2), 0 0.55rem 1rem -0.55rem rgba(45, 108, 223, 0.75);
  transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--brand-hover);
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2), 0 0.8rem 1.2rem -0.55rem rgba(36, 91, 192, 0.8);
}

.btn-primary:active:not(:disabled) {
  background: var(--brand-press);
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.btn-primary:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}

.btn-primary:disabled {
  cursor: default;
}

.btn-primary:disabled:not(.is-loading) {
  background: #e6ebf3;
  color: #4a5a70;
  box-shadow: inset 0 0 0 1px #cfd8e5;
}

.btn-primary.is-loading {
  color: #fff;
  cursor: progress;
}

.btn-primary.compact {
  margin-top: 0.25rem;
}

.btn-primary[hidden] {
  display: none;
}

.btn-arrow {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s var(--ease-out);
}

.btn-primary:hover:not(:disabled) .btn-arrow {
  transform: translateX(3px);
}

.btn-primary.is-loading .btn-arrow,
.btn-primary.is-wait .btn-arrow {
  display: none;
}

.spinner {
  display: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.btn-primary.is-loading .spinner {
  display: block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.link-btn {
  min-height: 2.5rem;
  padding: 0.4rem 0.6rem;
  border: 0;
  border-radius: 0.5rem;
  background: none;
  color: var(--brand-link);
  font: 600 0.9rem/1.2 var(--font);
  text-decoration: underline;
  text-underline-offset: 0.2rem;
  text-decoration-thickness: 1px;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.link-btn:hover:not(:disabled) {
  color: var(--brand-press);
  background: var(--brand-tint);
}

.link-btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

.link-btn:disabled {
  color: var(--muted);
  text-decoration: none;
  cursor: default;
}
