
.facetheory-rcp-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.facetheory-rcp-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  color: var(--facetheory-rcp-spinner-color, currentColor);
}

.facetheory-rcp-spinner__glyph {
  display: block;
  animation: facetheory-rcp-spin 700ms linear infinite;
}

.facetheory-rcp-spinner--xs { inline-size: 0.75rem; block-size: 0.75rem; }
.facetheory-rcp-spinner--sm { inline-size: 1rem; block-size: 1rem; }
.facetheory-rcp-spinner--md { inline-size: 1.5rem; block-size: 1.5rem; }
.facetheory-rcp-spinner--lg { inline-size: 2rem; block-size: 2rem; }
.facetheory-rcp-spinner--xl { inline-size: 3rem; block-size: 3rem; }
.facetheory-rcp-spinner--primary { --facetheory-rcp-spinner-color: var(--stitch-color-primary, #2f55d4); }
.facetheory-rcp-spinner--current { --facetheory-rcp-spinner-color: currentColor; }
.facetheory-rcp-spinner--inverse { --facetheory-rcp-spinner-color: var(--stitch-color-on-primary, #ffffff); }
.facetheory-rcp-spinner--neutral { --facetheory-rcp-spinner-color: var(--stitch-color-on-surface-variant, #464553); }

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

.facetheory-rcp-skeleton {
  display: block;
  overflow: hidden;
  position: relative;
  background: var(--facetheory-rcp-skeleton-surface, var(--stitch-color-surface-container-high, #e2e7ff));
  color: transparent;
}

.facetheory-rcp-skeleton--text { border-radius: 999px; block-size: 1em; }
.facetheory-rcp-skeleton--circle { border-radius: 999px; aspect-ratio: 1 / 1; }
.facetheory-rcp-skeleton--rectangle { border-radius: var(--stitch-radius-sm, 6px); }
.facetheory-rcp-skeleton--rounded { border-radius: var(--stitch-radius-lg, 12px); }
.facetheory-rcp-skeleton--width-auto { inline-size: auto; }
.facetheory-rcp-skeleton--width-content { inline-size: 12ch; }
.facetheory-rcp-skeleton--width-full { inline-size: 100%; }
.facetheory-rcp-skeleton--width-three-quarters { inline-size: 75%; }
.facetheory-rcp-skeleton--width-two-thirds { inline-size: 66.666%; }
.facetheory-rcp-skeleton--width-half { inline-size: 50%; }
.facetheory-rcp-skeleton--width-third { inline-size: 33.333%; }
.facetheory-rcp-skeleton--width-quarter { inline-size: 25%; }
.facetheory-rcp-skeleton--height-xs { block-size: 0.5rem; }
.facetheory-rcp-skeleton--height-sm { block-size: 0.75rem; }
.facetheory-rcp-skeleton--height-md { block-size: 1rem; }
.facetheory-rcp-skeleton--height-lg { block-size: 1.5rem; }
.facetheory-rcp-skeleton--height-xl { block-size: 2rem; }
.facetheory-rcp-skeleton--height-2xl { block-size: 3rem; }
.facetheory-rcp-skeleton--pulse { animation: facetheory-rcp-skeleton-pulse 1.2s ease-in-out infinite; }
.facetheory-rcp-skeleton--wave::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline: -150% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  animation: facetheory-rcp-skeleton-wave 1.4s linear infinite;
}

@keyframes facetheory-rcp-skeleton-pulse {
  50% { opacity: 0.56; }
}

@keyframes facetheory-rcp-skeleton-wave {
  to { transform: translateX(150%); }
}

.facetheory-rcp-loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--stitch-space-md, 1rem);
}

.facetheory-rcp-loading-state--fullscreen {
  position: fixed;
  inset: 0;
  z-index: var(--facetheory-rcp-overlay-z-index, 1000);
  background: var(--facetheory-rcp-overlay-background, rgba(0, 0, 0, 0.45));
  backdrop-filter: blur(2px);
}

.facetheory-rcp-loading-state__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--stitch-space-sm, 0.75rem);
}

.facetheory-rcp-loading-state--fullscreen .facetheory-rcp-loading-state__content {
  padding: var(--stitch-space-lg, 1.5rem);
  border-radius: var(--stitch-radius-lg, 12px);
  background: var(--stitch-color-surface, #ffffff);
  color: var(--stitch-color-on-surface, #131b2e);
}

.facetheory-rcp-loading-state__message {
  margin: 0;
  color: var(--stitch-color-on-surface-variant, #464553);
  font: inherit;
  text-align: center;
}

.facetheory-rcp-async-boundary[data-state='idle'],
.facetheory-rcp-async-boundary[data-state='empty'],
.facetheory-rcp-async-boundary[data-state='error'] {
  display: block;
}

.facetheory-rcp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--stitch-radius-md, 10px);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.facetheory-rcp-button--sm { min-block-size: 2rem; padding: 0 0.75rem; }
.facetheory-rcp-button--md { min-block-size: 2.5rem; padding: 0 1rem; }
.facetheory-rcp-button--lg { min-block-size: 3rem; padding: 0 1.25rem; }
.facetheory-rcp-button--primary { background: var(--stitch-color-primary, #2f55d4); color: var(--stitch-color-on-primary, #ffffff); }
.facetheory-rcp-button--secondary { background: var(--stitch-color-secondary-container, #ffecc0); color: var(--stitch-color-on-secondary-container, #3f2e00); }
.facetheory-rcp-button--ghost { background: transparent; color: var(--stitch-color-primary, #2f55d4); }
.facetheory-rcp-button--danger { background: var(--stitch-color-error, #ba1a1a); color: var(--stitch-color-on-error, #ffffff); }
.facetheory-rcp-button[disabled],
.facetheory-rcp-button[aria-disabled='true'] {
  cursor: not-allowed;
  opacity: 0.62;
}

.facetheory-rcp-button__content,
.facetheory-rcp-button__prefix,
.facetheory-rcp-button__suffix,
.facetheory-rcp-button__spinner {
  display: inline-flex;
  align-items: center;
}

.facetheory-rcp-link {
  color: var(--stitch-color-primary, #2f55d4);
}

@media (prefers-reduced-motion: reduce) {
  .facetheory-rcp-spinner__glyph,
  .facetheory-rcp-skeleton--pulse,
  .facetheory-rcp-skeleton--wave::after {
    animation: none;
  }

  .facetheory-rcp-loading-state--fullscreen {
    backdrop-filter: none;
  }
}

.facetheory-control-plane-section {
  display: block;
  margin-block: var(--stitch-space-md, 1rem);
  padding: var(--stitch-space-md, 1rem);
  border: 1px solid var(--stitch-color-outline-variant, #c6c5d0);
  border-radius: var(--stitch-radius-lg, 12px);
  background: var(--stitch-color-surface, #ffffff);
  color: var(--stitch-color-on-surface, #131b2e);
}

.facetheory-control-plane-section__title {
  margin: 0 0 var(--stitch-space-sm, 0.75rem);
  font: inherit;
  font-weight: 700;
}

.facetheory-control-plane-section__body {
  min-block-size: 2rem;
}

.facetheory-control-plane-section__error {
  color: var(--stitch-color-error, #ba1a1a);
}

.facetheory-navigation-pending-pill {
  position: fixed;
  inset-block-start: var(--stitch-space-md, 1rem);
  inset-inline-end: var(--stitch-space-md, 1rem);
  z-index: var(--facetheory-navigation-pending-z-index, 2147483647);
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  background: var(--stitch-color-primary, #2f55d4);
  color: var(--stitch-color-on-primary, #ffffff);
  box-shadow: 0 0.5rem 1.5rem rgba(19, 27, 46, 0.18);
  font: inherit;
  font-weight: 700;
}

.facetheory-navigation-pending-control[aria-busy='true'] {
  cursor: progress;
}

@media (prefers-reduced-motion: reduce) {
  .facetheory-navigation-pending-pill {
    transition: none;
  }
}
