/* WebEditor Slide Menu Widget Styles */
.web-editor-slide-menu {
    width: 100%;
}

.web-editor-slide-menu .wd-sm-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.web-editor-slide-menu .wd-sm-item {
    border-top: 1px solid #e5e7eb;
    padding: 10px 0;
}

.web-editor-slide-menu .wd-sm-item:last-child {
    border-bottom: 1px solid #e5e7eb;
}

/* Regular link (no children) */
.web-editor-slide-menu .wd-sm-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px;
    text-decoration: none;
    color: var(--e-global-color-423324e, #333);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.web-editor-slide-menu .wd-sm-link-title {
    flex: 1;
    text-align: right;
}

/* Parent button (has children) */
.web-editor-slide-menu .wd-sm-parent {
    width: 100%;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* gap: 12px; Removed to ensure consistent alignment with wd-sm-link. Spacing handled by specific margins. */
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
    color: var(--e-global-color-primary, #333);
}

.web-editor-slide-menu .wd-sm-parent-title {
    flex: 1;
    text-align: right;
}

/* Chevron arrow */
.web-editor-slide-menu .wd-sm-chevron {
    width: 18px;
    min-width: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    color: #111;
    transform: none;
    transition: transform 0.2s ease;
    margin-inline-start: 12px;
    /* Add spacing between text and chevron */
}

/* Rotate chevron when open */
.web-editor-slide-menu .wd-sm-item.has-children.is-open .wd-sm-chevron {
    transform: rotate(90deg);
}

/* Wrapper for the icon to center it and give it a fixed area */
.web-editor-slide-menu .wd-menu-icon-wrap {
    width: 40px;
    /* Base width */
    min-width: 40px;
    /* Ensure it doesn't shrink below this base (overridden by custom CSS) */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Critical: Prevent shrinking/growing based on content */
}

/* Ensure the image fits within the wrapper */
.web-editor-slide-menu .wd-menu-icon-img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

/* Flex Order for Positioning */
/* Default DOM: Icon, Title, Chevron */

/* Position: Start (Default) - Icon First */
.wd-icon-pos-start .web-editor-slide-menu .wd-menu-icon-wrap {
    order: -1;
}

/* Position: End - Icon Last */
.wd-icon-pos-end .web-editor-slide-menu .wd-menu-icon-wrap {
    order: 10;
}

/* Subcategories Indentation */
/* If Icon is at Start (Visual Right in RTL, Left in LTR), indent subcategories */
.wd-icon-pos-start .web-editor-slide-menu .wd-sm-sub {
    padding-inline-start: 5px;
    /* 40px icon + approx gap */
}

/* If Icon is at End, no indentation needed usually */
.wd-icon-pos-end .web-editor-slide-menu .wd-sm-sub {
    padding-inline-start: 0;
}

/* Subcategories */
.web-editor-slide-menu .wd-sm-sub {
    list-style: none;
    margin: 0;
    padding: 0;
}

.web-editor-slide-menu .wd-sm-sub-link {
    display: block;
    padding: 0 0 3px 0;
    text-decoration: none;
    color: var(--e-global-color-423324e, #333);
    font-weight: 700;
    font-size: 15px;
    text-align: right;
}

.web-editor-slide-menu .wd-sm-all-link {
    color: var(--e-global-color-423324e, #333);
    font-weight: 700;
}

.web-editor-slide-menu .wd-sm-sub-item {
    padding: 5px 0;
}