:root {
  --rn-alert-bg: #fff;
  --rn-alert-fg: #1f2937;
  --rn-alert-muted: #6b7280;
  --rn-alert-surface: #f8fafc;
  --rn-alert-border: #e5e7eb;
  --rn-alert-elev: 0 10px 30px #0000001a, 0 2px 8px #0000000f;
  --rn-alert-accent: #2563eb;
  --rn-alert-accent-hover: #1d4ed8;
  --rn-alert-accent-light: #dbeafe;
  --rn-alert-danger: #dc2626;
  --rn-alert-danger-hover: #b91c1c;
  --rn-alert-danger-light: #fecaca;
  --rn-alert-radius: 12px;
  --rn-alert-radius-sm: 8px;
  --rn-alert-spacing: 20px;
  --rn-alert-spacing-sm: 12px;
  --rn-alert-btn-min: 40px;
  --rn-alert-outline: 3px solid color-mix(in srgb, var(--rn-alert-accent) 40%, transparent);
  --rn-alert-outline-weak: 2px solid color-mix(in srgb, var(--rn-alert-accent) 25%, transparent);
  --rn-alert-font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --rn-alert-font-size: 14px;
  --rn-alert-title-size: 18px;
}

:root[data-theme="dark"], .rn-alert-theme--dark {
  --rn-alert-bg: #0b1220;
  --rn-alert-fg: #e5e7eb;
  --rn-alert-muted: #a1a1aa;
  --rn-alert-surface: #0f172a;
  --rn-alert-border: #334155;
  --rn-alert-elev: 0 10px 30px #00000080, 0 2px 8px #00000059;
  --rn-alert-accent: #60a5fa;
  --rn-alert-accent-hover: #3b82f6;
  --rn-alert-accent-light: #1e3a8a;
  --rn-alert-danger: #f87171;
  --rn-alert-danger-hover: #ef4444;
  --rn-alert-danger-light: #7f1d1d;
  --rn-alert-outline: 3px solid color-mix(in srgb, var(--rn-alert-accent) 50%, transparent);
  --rn-alert-outline-weak: 2px solid color-mix(in srgb, var(--rn-alert-accent) 35%, transparent);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --rn-alert-bg: #0b1220;
    --rn-alert-fg: #e5e7eb;
    --rn-alert-muted: #a1a1aa;
    --rn-alert-surface: #0f172a;
    --rn-alert-border: #334155;
    --rn-alert-elev: 0 10px 30px #00000080, 0 2px 8px #00000059;
    --rn-alert-accent: #60a5fa;
    --rn-alert-accent-hover: #3b82f6;
    --rn-alert-accent-light: #1e3a8a;
    --rn-alert-danger: #f87171;
    --rn-alert-danger-hover: #ef4444;
    --rn-alert-danger-light: #7f1d1d;
    --rn-alert-outline: 3px solid color-mix(in srgb, var(--rn-alert-accent) 50%, transparent);
    --rn-alert-outline-weak: 2px solid color-mix(in srgb, var(--rn-alert-accent) 35%, transparent);
  }
}

.rn-alert__dialog {
  --lightningcss-light: initial;
  --lightningcss-dark: ;
  color-scheme: light dark;
  border-radius: var(--rn-alert-radius);
  background: var(--rn-alert-bg);
  max-block-size: 80dvb;
  inline-size: min(400px, 92dvi);
  color: var(--rn-alert-fg);
  box-shadow: var(--rn-alert-elev);
  font: 400 var(--rn-alert-font-size)/1.45 var(--rn-alert-font);
  border: none;
  margin: auto;
  padding: 0;
  animation: .12s ease-out rn-alert__fade-in;
  overflow: hidden;
}

@media (prefers-color-scheme: dark) {
  .rn-alert__dialog {
    --lightningcss-light: ;
    --lightningcss-dark: initial;
  }
}

.rn-alert__dialog::backdrop {
  backdrop-filter: blur(2px);
  background: #0009;
  animation: .12s ease-out rn-alert__backdrop-fade-in;
}

.rn-alert__container {
  flex-direction: column;
  min-block-size: 100px;
  display: flex;
}

.rn-alert__content {
  padding: var(--rn-alert-spacing);
  background: var(--rn-alert-bg);
}

.rn-alert__title {
  font-size: var(--rn-alert-title-size);
  color: inherit;
  margin: 0 0 8px;
  font-weight: 600;
  line-height: 1.25;
}

.rn-alert__body {
  margin: 0;
}

.rn-alert__message {
  color: var(--rn-alert-muted);
  margin: 0 0 16px;
  font-size: 14px;
  line-height: 1.6;
}

.rn-alert__input-container {
  margin-block-start: 8px;
}

.rn-alert__input-field {
  border: 1px solid var(--rn-alert-border);
  border-radius: var(--rn-alert-radius-sm);
  inline-size: 100%;
  font: inherit;
  box-sizing: border-box;
  background: var(--rn-alert-surface);
  color: var(--rn-alert-fg);
  outline: none;
  padding: 10px 12px;
  transition: border-color .15s, box-shadow .15s;
}

.rn-alert__input-field::placeholder {
  color: color-mix(in srgb, var(--rn-alert-muted) 80%, transparent);
}

.rn-alert__input-field:focus-visible {
  border-color: var(--rn-alert-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rn-alert-accent) 20%, transparent);
}

.rn-alert__actions {
  padding: 16px var(--rn-alert-spacing) var(--rn-alert-spacing) var(--rn-alert-spacing);
  border-block-start: 1px solid var(--rn-alert-border);
  background: color-mix(in srgb, var(--rn-alert-surface) 94%, transparent);
  justify-content: flex-end;
  gap: 8px;
  display: flex;
}

.rn-alert__button {
  appearance: none;
  min-inline-size: 72px;
  min-block-size: var(--rn-alert-btn-min);
  border-radius: var(--rn-alert-radius-sm);
  font: 500 14px/1 var(--rn-alert-font);
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  background: var(--rn-alert-surface);
  color: var(--rn-alert-fg);
  border: 1px solid #0000;
  padding: 10px 16px;
  transition: transform 60ms, box-shadow .15s, background-color .15s, border-color .15s;
}

.rn-alert__button:active {
  transform: translateY(1px);
}

.rn-alert__button:focus {
  outline: none;
}

.rn-alert__button:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--rn-alert-accent) 25%, transparent);
}

.rn-alert__button--primary {
  background: var(--rn-alert-accent);
  color: #fff;
  border-color: color-mix(in srgb, #000 10%, var(--rn-alert-accent));
  box-shadow: 0 1px 2px #0000001a;
}

.rn-alert__button--primary:hover {
  background: var(--rn-alert-accent-hover);
}

.rn-alert__button--secondary {
  background: var(--rn-alert-bg);
  color: var(--rn-alert-fg);
  border-color: var(--rn-alert-border);
}

.rn-alert__button--secondary:hover {
  background: color-mix(in srgb, var(--rn-alert-surface) 85%, transparent);
  border-color: color-mix(in srgb, var(--rn-alert-border) 70%, #000 10%);
}

.rn-alert__button--destructive {
  background: var(--rn-alert-danger);
  color: #fff;
  border-color: color-mix(in srgb, #000 10%, var(--rn-alert-danger));
}

.rn-alert__button--destructive:hover {
  background: var(--rn-alert-danger-hover);
}

.rn-alert__dialog--confirm .rn-alert__actions {
  justify-content: space-between;
}

@keyframes rn-alert__fade-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes rn-alert__backdrop-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rn-alert__dialog, .rn-alert__dialog::backdrop {
    animation: none;
  }

  .rn-alert__button, .rn-alert__input-field {
    transition: none;
  }
}

@media (forced-colors: active) {
  .rn-alert__dialog {
    color: canvastext;
    box-shadow: none;
    background: canvas;
    border: 1px solid canvastext;
  }

  .rn-alert__dialog::backdrop {
    background: #0009;
  }

  .rn-alert__input-field {
    forced-color-adjust: none;
    color: canvastext;
    background: canvas;
    border-color: buttontext;
  }

  .rn-alert__button {
    forced-color-adjust: none;
    color: buttontext;
    background: buttonface;
    border-color: buttontext;
  }

  .rn-alert__button--primary, .rn-alert__button--destructive {
    color: highlighttext;
    background: highlight;
    border-color: highlight;
  }
}

@supports not (backdrop-filter: blur(2px)) {
  .rn-alert__dialog::backdrop {
    background: #0009;
  }
}

@media (width <= 480px) {
  .rn-alert__dialog {
    border-radius: var(--rn-alert-radius-sm);
    inline-size: 95%;
  }

  .rn-alert__content {
    padding: 16px;
  }

  .rn-alert__actions {
    flex-direction: column;
    gap: 8px;
    padding: 12px 16px 16px;
  }

  .rn-alert__button {
    min-inline-size: unset;
    inline-size: 100%;
  }
}

@media (width <= 320px) {
  .rn-alert__content {
    padding: var(--rn-alert-spacing-sm);
  }

  .rn-alert__title {
    font-size: 16px;
  }

  .rn-alert__message {
    font-size: 13px;
  }
}

@media print {
  .rn-alert__dialog {
    display: none !important;
  }
}
