.bg-noise {
  background-image: url('../img/noise.png');
  background-repeat: repeat;
}

html {
  scroll-behavior: smooth;
}

::selection {
  background: rgba(59, 130, 246, 0.4);
  color: #ffffff;
}

.flash-toast {
  animation: flash-in 0.35s ease-out, flash-out 0.5s ease-in 4s forwards;
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flash-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    visibility: hidden;
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-toast {
    animation: flash-out 0.01s linear 6s forwards;
  }
}

html {
  color-scheme: dark;
}

.select-styled {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  background-size: 1rem;
}

input:focus,
textarea:focus,
select:focus,
[contenteditable]:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.7);
  box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.35), 0 0 18px rgba(59, 130, 246, 0.15);
}

.rich-feld:empty::before {
  content: attr(data-placeholder);
  color: #52525b;
  pointer-events: none;
}

.rich-feld b, .rich-feld strong { color: #ffffff; }

.inline-bild,
[data-rich] img {
  display: block;
  max-width: 100%;
  margin: 0.75rem 0;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
}

.ref-inhalt {
  color: #a1a1aa;
  line-height: 1.65;
  margin-top: 0.75rem;
}

.ref-inhalt b,
.ref-inhalt strong {
  color: #ffffff;
}

.ref-inhalt h4 {
  color: #ffffff;
  font-size: 1.125rem;
  font-weight: 600;
  margin: 1.25rem 0 0.35rem;
}

.ref-inhalt ul,
.ref-inhalt ol {
  margin: 0.5rem 0 0.5rem 1.35rem;
}

.ref-inhalt ul {
  list-style: disc;
}

.ref-inhalt ol {
  list-style: decimal;
}

.ref-inhalt li {
  margin: 0.3rem 0;
}

.ref-inhalt li::marker {
  color: #3b82f6;
}

.ref-inhalt img {
  display: block;
  max-width: 100%;
  margin: 0.85rem 0;
  border: 1px solid #27272a;
  border-radius: 0.5rem;
}

.ref-inhalt img.bild-25 { width: 25%; }
.ref-inhalt img.bild-50 { width: 50%; }
.ref-inhalt img.bild-75 { width: 75%; }

.rich-editor {
  margin-top: 0;
}

.rich-editor:empty::before {
  content: attr(data-placeholder);
  color: #52525b;
  pointer-events: none;
}

.rich-editor img {
  cursor: pointer;
}

.rich-editor img.bild-aktiv {
  outline: 2px solid rgba(96, 165, 250, 0.8);
  outline-offset: 2px;
}

.ref-inhalt {
  display: flow-root;
}

.ref-inhalt img.bild-links {
  float: left;
  margin: 0.35rem 1.1rem 0.6rem 0;
}

.ref-inhalt img.bild-rechts {
  float: right;
  margin: 0.35rem 0 0.6rem 1.1rem;
}
