@media (prefers-color-scheme: dark) {
  .color-scheme-auto,
  [data-color-scheme='auto'] content-restrict-widget {
    color-scheme: dark;
    --halo-restrict-widget-primary-color: #1e40af;
    --halo-restrict-widget-primary-subtle-color: #3b82f6;
    --halo-restrict-widget-secondary-color: #3f3f46;
    --halo-restrict-widget-light-color: #18181b;
    --halo-restrict-widget-title-color: #e5e5e5;
    --halo-restrict-widget-title-subtle-color: #a1a1aa;
    --halo-restrict-widget-modal-bg-color: #27272a;
  }
}

.color-scheme-dark,
.dark,
[data-color-scheme='dark'] content-restrict-widget {
  color-scheme: dark;
  --halo-restrict-widget-primary-color: #1e40af;
  --halo-restrict-widget-primary-subtle-color: #3b82f6;
  --halo-restrict-widget-secondary-color: #3f3f46;
  --halo-restrict-widget-light-color: #18181b;
  --halo-restrict-widget-title-color: #e5e5e5;
  --halo-restrict-widget-title-subtle-color: #a1a1aa;
  --halo-restrict-widget-modal-bg-color: #27272a;
}

content-restrict-widget {
  display: block;
  width: 100%;
  margin: 1em 0;
}

.rr-widget {
  position: relative;
  border: 1px dashed var(--halo-restrict-widget-secondary-color, #e4e4e7);
  border-radius: 0.5rem;
  padding: 0.75rem;
  background: transparent;
}

.rr-skeleton {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rr-skeleton-line {
  height: 1rem;
  border-radius: 9999px;
  background: var(--halo-restrict-widget-secondary-color, #e4e4e7);
}

.rr-mask {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.rr-text {
  margin: 0;
  font-size: 1.125rem;
  color: var(--halo-restrict-widget-title-color, #18181b);
}

.rr-btn {
  display: inline-block;
  padding: 0.625rem 1.25rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--halo-restrict-widget-primary-color, #2563eb);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.rr-btn:hover {
  filter: brightness(1.05);
}

.rr-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.rr-btn-plain {
  background: var(--halo-restrict-widget-secondary-color, #e4e4e7);
  color: var(--halo-restrict-widget-title-color, #18181b);
}

.rr-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
}

.rr-modal {
  width: min(90vw, 22rem);
  padding: 1.25rem;
  border-radius: 0.75rem;
  background: var(--halo-restrict-widget-modal-bg-color, #fff);
  color: var(--halo-restrict-widget-title-color, #18181b);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.rr-modal h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.rr-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--halo-restrict-widget-secondary-color, #e4e4e7);
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  outline: none;
}

.rr-input:focus {
  border-color: var(--halo-restrict-widget-primary-color, #2563eb);
}

.rr-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}
