﻿#blazor-error-ui {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.7) !important;
    backdrop-filter: blur(6px) !important;
    z-index: 999999 !important;
    display: none; /* Blazor змінить на block */
}

    /* Коли Blazor показує помилку */
    #blazor-error-ui[style*="display: block"] {
        display: block !important;
    }

/* Контейнер-оверлей для точного центрування */
.blazor-error-overlay {
    position: fixed !important; /* Саме fixed, щоб відірватися від батька */
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important; /* Зсув на центр */
    width: 100%;
    max-width: 450px; /* Обмежуємо ширину картки */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000000 !important;
}

/* Сама картка */
.blazor-error-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 400px;
    padding: 40px 30px;
    text-align: center;
    position: relative;
    border: 3px solid #ff5252;
    animation: zoomInError 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Іконка, текст та кнопки (лишаємо без змін) */
.blazor-error-icon {
    width: 64px;
    height: 64px;
    fill: #ff1744;
    margin-bottom: 20px;
}

.blazor-error-text h3 {
    color: #212121;
    margin-bottom: 10px;
    font-size: 1.6rem;
}

.blazor-error-text p {
    color: #616161;
    margin-bottom: 30px;
}

.btn-reload {
    background-color: #ff5252;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
}

.btn-dismiss {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #bdbdbd;
    cursor: pointer;
}

@keyframes zoomInError {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}
