#blazor-error-ui {
    background: #ffe082 !important;
    border: 1px solid #ffd54f !important;
    border-radius: 10px !important;
    bottom: 32px !important;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18) !important;
    display: none;
    left: 32px !important;
    right: 32px !important;
    padding: 0 !important;
    position: fixed !important;
    z-index: 1000 !important;
    max-width: 520px !important;
    margin: 0 auto !important;
}

#blazor-error-ui .error-banner {
    display: flex !important;
    align-items: center !important;
    padding: 1.25rem 1.5rem !important;
    gap: 1rem !important;
}

#blazor-error-ui .error-icon {
    font-size: 1.5rem !important;
    flex-shrink: 0 !important;
}

#blazor-error-ui .error-content {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.25rem !important;
}

#blazor-error-ui .error-message {
    color: #212529 !important;
    font-size: 1.05rem !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: 0.01em !important;
}

#blazor-error-ui .error-actions {
    display: flex !important;
    gap: 0.5rem !important;
    flex-shrink: 0 !important;
}

#blazor-error-ui .error-btn {
    padding: 0.55rem 1.2rem !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
    display: inline-block !important;
}

#blazor-error-ui .error-reload {
    background-color: #1976d2 !important;
    color: #fff !important;
}

#blazor-error-ui .error-reload:hover {
    background-color: #115293 !important;
    transform: translateY(-1px) !important;
}

#blazor-error-ui .error-dismiss {
    background-color: #757575 !important;
    color: #fff !important;
}

#blazor-error-ui .error-dismiss:hover {
    background-color: #424242 !important;
    transform: translateY(-1px) !important;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHZpZXdCb3g9IjAgMCA1NiA0OSIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzIyXzApIj4KPHBhdGggZD0iTTU2IDI3LjQ5NjJDMzYuMjY5OSAyNy40OTYyIDIwLjQ5NjIgNDMuMjY5OSAyMC40OTYyIDYzVjYzQzIwLjQ5NjIgODIuNzMwMSAzNi4yNjk5IDk4LjUwMzggNTYgOTguNTAzOEw1NiA5OC41MDM4Qzc1LjczMDEgOTguNTAzOCA5MS41MDM4IDgyLjczMDEgOTEuNTAzOCA2M1Y2M0M5MS41MDM4IDQzLjI2OTkgNzUuNzMwMSAyNy40OTYyIDU2IDI3LjQ5NjJaIiBzdHJva2U9IiNGRkU1MDAiIHN0cm9rZS13aWR0aD0iMiIgc3Ryb2tlLWxpbmVjYXA9InJvdW5kIiBzdHJva2UtbGluZWpvaW49InJvdW5kIi8+CjxwYXRoIGQ9Ik01NiA0MS4wMDM4QzU2IDQxLjAwMzggNTYuMDAwMSA0MS4wMDM4IDU2IDQxLjAwMzhDNTYuMDAwMSA0MS4wMDM4IDU2IDQxLjAwMzggNTYgNDEuMDAzOFoiIGZpbGw9IiNGRkU1MDAiLz4KPHBhdGggZD0iTTU2IDQ1LjAwMzhDNTYuMDAwMSA0NS4wMDM4IDU2IDQ1LjAwMzggNTYgNDUuMDAzOEM1Ni4wMDAxIDQ1LjAwMzggNTYgNDUuMDAzOCA1NiA0NS4wMDM4WiIgZmlsbD0iI0ZGRTUwMCIvPgo8L2c+CjxkZWZzPgo8Y2xpcFBhdGggaWQ9ImNsaXAwXzIyXzAiPgo8cmVjdCB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIGZpbGw9IndoaXRlIi8+CjwvY2xpcFBhdGg+CjwvZGVmcz4KPC9zdmc+Cg==) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1ba1e2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Error Boundary Component Styles */
.error-boundary-container {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 50%;
    max-width: 50%;
    min-height: 250px;
    padding: 2rem;
}

.error-boundary {
    background: #ffe082;
    border: 1px solid #ffd54f;
    border-radius: 10px;
    padding: 2rem;
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}

.error-boundary-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.error-boundary-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.error-image {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.disconnected-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.error-boundary-text {
    flex: 1;
    max-width: 500px;
}

.error-boundary-text h3 {
    margin: 0 0 1rem 0;
    color: #212529;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

.error-boundary-text p {
    margin: 0 0 1.5rem 0;
    color: #424242;
    font-size: 1.1rem;
    line-height: 1.6;
}

.error-details {
    margin: 1.5rem 0;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    text-align: left;
}

.error-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #424242;
    margin-bottom: 0.5rem;
}

.error-stack-trace {
    background: rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #d32f2f;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

.error-boundary-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.error-boundary-actions .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 120px;
}

.error-boundary-actions .btn-primary {
    background-color: #1976d2;
    color: #fff;
}

.error-boundary-actions .btn-primary:hover {
    background-color: #115293;
    transform: translateY(-1px);
}

.error-boundary-actions .btn-secondary {
    background-color: #ffffff;
    color: #fff;
}

.error-boundary-actions .btn-secondary:hover {
    background-color: #424242;
    transform: translateY(-1px);
}

/* Blazor Server Reconnection Modal Styles */
#components-reconnect-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.4);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

#components-reconnect-modal.components-reconnect-show {
    display: flex;
}

#components-reconnect-modal.components-reconnect-hide {
    display: none;
}

#components-reconnect-modal.components-reconnect-failed {
    display: flex;
}

#components-reconnect-modal.components-reconnect-rejected {
    display: flex;
}

.reconnect-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.reconnect-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(255, 255, 255, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

#components-reconnect-modal.components-reconnect-show .reconnect-content,
#components-reconnect-modal.components-reconnect-failed .reconnect-content,
#components-reconnect-modal.components-reconnect-rejected .reconnect-content {
    transform: scale(1);
}

.reconnect-icon {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.reconnect-icon svg {
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

.reconnect-text h3 {
    margin: 0 0 0.75rem 0;
    color: #212529;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.reconnect-text p {
    margin: 0 0 1.5rem 0;
    color: #424242;
    font-size: 1rem;
    line-height: 1.5;
}

.reconnect-progress {
    width: 100%;
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #1976d2, #6e9ae4);
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

.reconnect-actions {
    margin-top: 1.5rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 120px;
}

.btn-secondary {
    background-color: #6e9ae4;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #343232;
    color: #000000;
    transform: translateY(-1px);
}

#components-reconnect-modal.components-reconnect-failed .reconnect-text h3 {
    color: #d32f2f;
}

#components-reconnect-modal.components-reconnect-failed .reconnect-text h3::before {
    content: "❌ ";
}

#components-reconnect-modal.components-reconnect-rejected .reconnect-text h3 {
    color: #f57c00;
}

#components-reconnect-modal.components-reconnect-rejected .reconnect-text h3::before {
    content: "🚫 ";
}

@media (prefers-color-scheme: dark) {
    .reconnect-content {
        background: #ffffff;
        color: #fff;
    }

    .reconnect-text h3 {
        color: #000000;
    }

    .reconnect-text p {
        color: rgba(0, 0, 0, 0.8);
    }

    .reconnect-progress {
        background: rgba(255, 255, 255, 0.1);
    }
}

@media (max-width: 480px) {
    .reconnect-overlay {
        padding: 1rem;
    }

    .reconnect-content {
        padding: 2rem 1.5rem;
    }

    .reconnect-text h3 {
        font-size: 1.1rem;
    }

    .reconnect-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
    }

    #blazor-error-ui {
        left: 16px !important;
        right: 16px !important;
        bottom: 16px !important;
    }

    .error-banner {
        flex-direction: column;
        gap: 0.75rem;
    }

    .error-content {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }

    .error-actions {
        width: 100%;
        justify-content: center;
    }

    .error-btn {
        flex: 1;
        min-width: 0;
    }
}

/* Test Modals Component Styles */
.test-modals-container {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 300px;
}

.test-modals-container h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.test-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.test-buttons .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #1976d2;
    color: #fff;
}

.btn-primary:hover {
    background-color: #115293;
}

.btn-warning {
    background-color: #f57c00;
    color: #fff;
}

.btn-warning:hover {
    background-color: #e65100;
}

.btn-info {
    background-color: #0288d1;
    color: #fff;
}

.btn-info:hover {
    background-color: #01579b;
}

.btn-danger {
    background-color: #d32f2f;
    color: #fff;
}

.btn-danger:hover {
    background-color: #b71c1c;
}

@media (max-width: 480px) {
    .test-buttons {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .test-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
} 