#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #292929;
    color: #fff;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    padding: 1rem;
    text-align: center;
    border-top: 4px solid #ff4400;
}

#blazor-error-ui .error-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 1rem;
}

#blazor-error-ui h3 {
    margin-bottom: 1rem;
    color: #ff4400;
}

#blazor-error-ui .retry-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 1rem 0;
}

#blazor-error-ui .spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #444;
    border-top: 3px solid #ff4400;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#blazor-error-ui .reload {
    background: #ff4400;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

#blazor-error-ui .reload:hover {
    background: darkred;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 1rem;
    top: 1rem;
    cursor: pointer;
    color: #666;
    font-size: 1.2rem;
}

.blazor-error-boundary {
    background: #292929;
    padding: 1rem;
    color: white;
    border-left: 4px solid #ff4400;
}

.blazor-error-boundary::after {
    content: "Ein Fehler ist aufgetreten.";
}

#components-reconnect-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: none;
    overflow: hidden;
    background-color: rgba(41, 41, 41, 0.9);
    color: white;
    font-weight: bold;
    transition: visibility linear 500ms;
}

#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#components-reconnect-modal .modal-content {
    background: #292929;
    padding: 25px 40px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid #ff4400;
    max-width: 90%;
    width: auto;
    text-align: center;
}

#components-reconnect-modal h5 {
    margin: 0 0 20px 0;
    color: #ff4400;
    font-size: 1.2em;
}

#components-reconnect-modal .reconnect-spinner {
    border-width: 0.3em;
    border-style: solid;
    border-color: #ff4400 #444 #444;
    border-radius: 50%;
    width: 2em;
    height: 2em;
    display: inline-block;
    animation: spin 1s linear infinite;
    margin: 10px 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


#components-reconnect-modal .button-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px auto 0;
}

#components-reconnect-modal button {
    display: none;
    padding: 8px 16px;
    background: #ff4400;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1em;
}

#components-reconnect-modal button.reload {
    background: #444; /* Unterschiedliche Farbe für den Neu laden Button */
}

#components-reconnect-modal button:hover {
    background: darkred;
}

#components-reconnect-modal button.reload:hover {
    background: #333;
}

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

/* Den alten Text-Link ausblenden */
#components-reconnect-modal p {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed p,
#components-reconnect-modal.components-reconnect-rejected p {
    display: block;
}

#components-reconnect-modal a {
    color: #ff4400;
    text-decoration: underline;
    cursor: pointer;
}

#components-reconnect-modal a:hover {
    color: darkred;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Loader Animation */
.loader-grid {
    display: grid;
    grid-template-columns: repeat(3, 12px);
    gap: 5px;
    justify-content: center;
}

.loader-grid div {
    width: 12px;
    height: 12px;
    background-color: orange;
    animation: fade 1.2s infinite;
}

.loader-grid div:nth-child(1) { animation-delay: 0s; }
.loader-grid div:nth-child(2) { animation-delay: 0.2s; }
.loader-grid div:nth-child(3) { animation-delay: 0.4s; }
.loader-grid div:nth-child(4) { animation-delay: 0.6s; }
.loader-grid div:nth-child(5) { animation-delay: 0.8s; }
.loader-grid div:nth-child(6) { animation-delay: 1s; }
.loader-grid div:nth-child(7) { animation-delay: 1.2s; }
.loader-grid div:nth-child(8) { animation-delay: 1.4s; }
.loader-grid div:nth-child(9) { animation-delay: 1.6s; }

@keyframes fade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.loader {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
}

.loader div {
    width: 12px;
    height: 12px;
    background-color: orange;
    border-radius: 50%;
    animation: bounce 0.6s infinite alternate;
}

.loader div:nth-child(2) {
    animation-delay: 0.2s;
}
.loader div:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    from {
        transform: translateY(0);
        opacity: 0.6;
    }
    to {
        transform: translateY(-8px);
        opacity: 1;
    }
}