/* Simpel Download Manager Tree UI */
.sdm-tree-wrapper {
    font-family: inherit;
    font-size: 16px;
}
.sdm-tree-wrapper ul {
    list-style: none !important;
    padding-left: 0;
    margin: 0;
}
.sdm-tree-wrapper .sdm-children-wrapper {
    padding-left: 32px !important; /* Indent the whole child block */
}
.sdm-tree-wrapper .sdm-children-wrapper ul {
    padding-left: 0 !important;
}
.sdm-tree-wrapper li {
    list-style: none !important;
    margin: 5px 0;
    line-height: 24px;
}
.sdm-item-content {
    display: flex;
    align-items: center;
    position: relative;
    padding: 5px 0;
}
.sdm-toggle-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    margin-right: 8px;
    border: 1px solid #7f8c8d;
    border-radius: 50%; /* Circle */
    position: relative;
    transition: all 0.2s;
}
.sdm-toggle-icon:hover {
    border-color: #34495e;
}
.sdm-toggle-icon.collapsed::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid #7f8c8d;
    vertical-align: middle;
    margin-left: 2px;
}
.sdm-toggle-icon.expanded::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid #7f8c8d;
    vertical-align: middle;
    margin-top: 2px;
}
.sdm-folder-name {
    font-weight: 500;
    color: #e6b15c; /* Match image color roughly */
    cursor: pointer;
    user-select: none;
    margin-right: 10px;
}
.sdm-file-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    text-align: center;
    margin-right: 8px;
    margin-left: 4px;
}
.sdm-file-name {
    color: #333;
    margin-right: 10px;
}

/* Download Buttons */
.sdm-download-btn, .sdm-download-single {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}
.sdm-download-btn:hover, .sdm-download-single:hover {
    transform: scale(1.1);
}

/* Tooltip (Bubble) implementation */
.tooltip-wrap {
    position: relative;
}
.tooltip-wrap .tooltip-text {
    visibility: hidden;
    width: max-content;
    max-width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px 8px;
    position: absolute;
    z-index: 100;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    line-height: 1.4;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.tooltip-wrap .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
}
.tooltip-wrap:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Loading state */
.sdm-download-btn.loading {
    opacity: 0.5 !important;
    pointer-events: none;
}


/* Override old triangles */
.sdm-toggle-icon::before { display: none !important; }
.sdm-toggle-icon { width: auto !important; height: auto !important; border: none !important; }

/* Hotfix for vertical alignment and removing redundant tiny arrows */
.sdm-item-content {
    align-items: flex-start !important;
}
.sdm-toggle-icon {
    margin-top: 3px !important;
}
.sdm-toggle-icon::after {
    display: none !important;
}

/* Force hide Divi bullet icons */
.sdm-tree-wrapper li::before {
    display: none !important;
    content: none !important;
}

/* Force hide Divi bullet icons with high specificity */
#main-content .sdm-tree-wrapper ul li::before,
.et_pb_text .sdm-tree-wrapper ul li::before {
    display: none !important;
    content: none !important;
}
