/* =========================================================
   Исправление: запросы на удаление всплывают сбоку вверху
   Перебивает старые стили, где блок становился частью страницы
   ========================================================= */

#deleteRequestsSection.delete-sidebar-panel,
.admin-delete-requests-section.delete-sidebar-panel {
    position: fixed !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    bottom: auto !important;

    width: 340px !important;
    max-width: calc(100vw - 32px) !important;
    max-height: 72vh !important;
    overflow: auto !important;

    z-index: 999999 !important;

    background: #ffffff !important;
    border: 2px solid #dc2626 !important;
    border-left: 6px solid #dc2626 !important;
    border-radius: 12px !important;
    box-shadow: 0 18px 48px rgba(127, 29, 29, 0.26) !important;

    padding: 12px !important;
    margin: 0 !important;

    animation: deleteTopPopupOpen .18s ease-out !important;
}

@keyframes deleteTopPopupOpen {
    from {
        opacity: 0;
        transform: translateY(-10px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#deleteRequestsSection .delete-sidebar-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #fecaca !important;
}

#deleteRequestsSection h2 {
    margin: 0 !important;
    color: #991b1b !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
    font-weight: 900 !important;
}

#deleteRequestsSection .hint {
    margin-top: 3px !important;
    color: #6b7280 !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
}

#deleteRequestsSection .delete-sidebar-close {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
    font-size: 20px !important;
    line-height: 1 !important;
    cursor: pointer !important;
}

#deleteRequestsSection .delete-sidebar-close:hover {
    background: #fee2e2 !important;
    color: #7f1d1d !important;
}

#deleteRequestsSection .table-wrap {
    border: none !important;
    background: transparent !important;
    overflow: visible !important;
}

#deleteRequestsSection table,
#deleteRequestsSection thead,
#deleteRequestsSection tbody,
#deleteRequestsSection th,
#deleteRequestsSection td,
#deleteRequestsSection tr {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
}

#deleteRequestsSection thead {
    display: none !important;
}

#deleteRequestsSection tr {
    background: #fffafa !important;
    border: 1px solid #fecaca !important;
    border-radius: 10px !important;
    padding: 9px !important;
    margin-bottom: 8px !important;
}

#deleteRequestsSection td {
    border: none !important;
    background: transparent !important;
    display: grid !important;
    grid-template-columns: 82px 1fr !important;
    gap: 6px !important;
    padding: 4px 0 !important;
    color: #1f2937 !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
}

#deleteRequestsSection td::before {
    content: attr(data-label);
    color: #991b1b !important;
    font-size: 11px !important;
    font-weight: 900 !important;
}

#deleteRequestsSection .row-actions-cell {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    margin-top: 6px !important;
}

#deleteRequestsSection .row-actions-cell::before {
    display: none !important;
}

#deleteRequestsSection .row-actions-cell button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 6px 8px !important;
    border-radius: 8px !important;
    font-size: 12px !important;
}

#deleteAdminPopup {
    display: none !important;
}

@media (max-width: 950px) {
    #deleteRequestsSection.delete-sidebar-panel,
    .admin-delete-requests-section.delete-sidebar-panel {
        top: 10px !important;
        right: 10px !important;
        width: 320px !important;
        max-width: calc(100vw - 20px) !important;
        max-height: 78vh !important;
    }

    #deleteRequestsSection td {
        grid-template-columns: 76px 1fr !important;
    }
}
