:root {
    --AppColor: #5b9aba;
    --RedColor: #ba5b5b;
    --GreenColor: #5bba7c;
    --YellowColor: #baa85b;
    --BorderColor: #ccc;
    --Darker: rgb(50, 50, 50);
    --BorderRadius: 5px;
    /* Raw channels of the colors above, for rgba(var(--…Rgb), alpha) — keep in sync. */
    --AppColorRgb: 91, 154, 186;
    --RedColorRgb: 186, 91, 91;
    --GreenColorRgb: 91, 186, 124;
    /* Radius scale — use these instead of ad-hoc px values. */
    --RadiusS: 4px;
    --RadiusM: 8px;
    --RadiusL: 12px;
    --RadiusPill: 999px;
    /* Width of the icon rail on the left — anything anchored to the viewport
       (e.g. the playlist tab) has to offset by it. */
    --RailWidth: 56px;
    /* Shared top edge of the three columns below the top bar: rail, playlist and
       page content all start here, so their first element lines up. */
    --LayoutPadTop: 16px;
}


@font-face {
    font-family: Roboto;
    src: url(/fonts/Roboto-Regular.ttf);
}

/* TinyMCE frame — shared by every editor instance (see wwwroot/js/tinymceConfig.js,
   which pins all of them to the dark skin). Individual editors only add their height. */
.tox.tox-tinymce {
    border-radius: var(--BorderRadius);
    border-width: 1px;
    border-color: rgba(255, 255, 255, 0.12);
    height: 100% !important;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}


html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Roboto, sans-serif;
    color: white;
}



h1:focus {
    outline: none;
}

/* Base focus style for everything that does not bring its own. Without it the app
   cannot be operated by keyboard in any traceable way. */
:focus-visible {
    outline: 2px solid var(--AppColor);
    outline-offset: 2px;
}

/* The fade-in/stagger animations are decoration — anyone who opted out gets the
   content immediately and without motion. */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blaz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TkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Es ist ein Fehler aufgetreten."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* =========================================================================
   Reconnect indicator (#components-reconnect-modal, markup in App.razor)
   A screen in a service must not be covered by an overlay because the
   connection hiccuped for a moment: the indicator stays completely invisible
   for the first 2 s, then fades in as a small red dot with a caption at the
   top centre, and only grows after 10 s — by then the outage is real and the
   operator should notice it from the back row.
   The timing is pure CSS (animation-delay on the state class), so it restarts
   by itself every time Blazor re-adds the class. The global
   prefers-reduced-motion rule above only collapses durations, not delays:
   with reduced motion the pill appears at 2 s and jumps to its larger size
   at 10 s, just without the movement.
   ========================================================================= */

#components-reconnect-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    justify-content: center;
    z-index: 20000;
    /* Never swallow clicks — only the reload button re-enables them. */
    pointer-events: none;
    font-size: 14px;
}

/* Reconnecting (and the paused circuit of .NET 10): quiet for 2 s, then fade in. */
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-retrying,
#components-reconnect-modal.components-reconnect-paused {
    display: flex;
    animation: reconnect-fade-in 0.6s ease-out 2s both;
}

/* Retries exhausted or circuit gone: nothing reconnects on its own any more,
   so show up immediately and offer the reload. */
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected,
#components-reconnect-modal.components-reconnect-resume-failed {
    display: flex;
}

.reconnect-pill {
    display: flex;
    align-items: center;
    gap: 0.55em;
    margin-top: 0.6em;
    padding: 0.35em 0.85em;
    border-radius: var(--RadiusPill);
    border: 1px solid rgba(var(--RedColorRgb), 0.5);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    color: #fff;
    line-height: 1.2;
    white-space: nowrap;
    /* Grows downwards out of the top edge instead of pushing sideways. */
    transform-origin: top center;
}

/* The second step: after 10 s of outage the same pill, just bigger. */
#components-reconnect-modal.components-reconnect-show .reconnect-pill,
#components-reconnect-modal.components-reconnect-retrying .reconnect-pill,
#components-reconnect-modal.components-reconnect-paused .reconnect-pill {
    animation: reconnect-grow 0.8s ease-out 10s both;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-pill,
#components-reconnect-modal.components-reconnect-rejected .reconnect-pill,
#components-reconnect-modal.components-reconnect-resume-failed .reconnect-pill {
    transform: scale(1.4);
    pointer-events: auto;
}

.reconnect-dot {
    flex: none;
    width: 0.65em;
    height: 0.65em;
    border-radius: 50%;
    background: var(--RedColor);
    animation: reconnect-pulse 2s ease-in-out infinite;
}

.reconnect-text {
    font-weight: 500;
}

.reconnect-reload {
    display: none;
    padding: 0.15em 0.6em;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: var(--RadiusPill);
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

    .reconnect-reload:hover {
        background: rgba(255, 255, 255, 0.15);
    }

#components-reconnect-modal.components-reconnect-failed .reconnect-reload,
#components-reconnect-modal.components-reconnect-rejected .reconnect-reload,
#components-reconnect-modal.components-reconnect-resume-failed .reconnect-reload {
    display: inline-block;
}

@keyframes reconnect-fade-in {
    from {
        opacity: 0;
        transform: translateY(-0.5em);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes reconnect-grow {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.4);
    }
}

/* Ends where it starts, so the reduced-motion rule above leaves the dot at rest. */
@keyframes reconnect-pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}