.cs-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cs-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.cs-dialog {
    width: 100%;
    max-width: 560px;
    margin: 1rem;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    border-radius: 1rem;
}

.dropdown-menu-custom {
    position: absolute;
    right: 0;
    top: calc(100% - 6px); /* Move up a bit so the 3-dots are visible */
    min-width: 140px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    padding: 0; /* Remove extra vertical padding */
    z-index: 1061;
    border: none;
}

.dropdown-delete-btn {
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    outline: none;
    box-shadow: none;
    border-radius: 8px;
    transition: background-color 0.15s ease;
    padding: 6px 12px; /* Compact vertical and horizontal padding */
    min-height: 32px;  /* Ensures it's not too tall */
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-delete-btn:hover,
.dropdown-delete-btn:focus {
    background-color: #fef2f2;
    outline: none;
    box-shadow: none;
}

/* Allow dropdown menus to overflow the scrollable modal body */
.dropdown-menu[aria-labelledby="keySortDropdown"] {
    position: fixed !important;
}