/* Dropdown container */
.dropdown-container {
    display: inline-block;
    width: 100%;
}

/* Dropdown button */
.dropdown-btn {
    width: 100%;
    padding: 10px;
    text-align: left;
    border: 1px solid #ccc;
    background-color: #ffffff;
    color: #6c757d;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dropdown-btn:hover {
    background-color: #f8f9fa;
}

/* Dropdown content */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    width: auto;
    max-width: 350px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 300px;
    min-width: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    transform: translateY(10px);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Show dropdown */
.dropdown-content.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Dropdown items */
.dropdown-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown-content ul li {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    /* To position the expand icon */
}

.dropdown-content ul li:hover {
    background-color: #e9ecef;
    color: #343a40;
}

/* Subcategories */
.dropdown-content ul li ul {
    display: none;
    padding-left: 20px;
    margin-top: 5px;
}

.dropdown-content ul li.expanded>ul {
    display: block;
}

/* Expand icon */
.expand-icon {
    display: inline-block;
    margin-left: 10px;
    cursor: pointer;
    width: 10px;
    height: 10px;
    /* border-left: 5px solid transparent; */
    /* border-right: 5px solid transparent; */
    /* border-top: 5px solid #6c757d; */
    transition: transform 0.3s ease;
    position: relative;
    top: 0px;
    transform: translateY(-30%);
}

.expand-icon.rotate {
    transform: rotate(180deg) translateY(-30%);
    top: 0px;
}

.expand-icon i {
    font-size: 20px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.category-item:hover {
    background-color: #f8f9fa;
}

.dynamic-added td {
    padding: 10px;
}