/* ==========================================================
   Single post sidebar shortcode: [mobin_post_sidebar]
   ========================================================== */
.mcs-post-sidebar {
    --mcs-ps-text: #303036;
    --mcs-ps-muted: #667085;
    --mcs-ps-red: #ef4b4f;
    --mcs-ps-active-bg: #f5f6fd;
    --mcs-ps-hover-bg: #fafafd;
    --mcs-ps-border: #ececef;

    width: 100%;
    display: block;
    direction: rtl;
    font-family: inherit;
    box-sizing: border-box;
}

.mcs-post-sidebar *,
.mcs-post-sidebar *::before,
.mcs-post-sidebar *::after {
    box-sizing: border-box;
}

.mcs-post-sidebar a {
    text-decoration: none !important;
}

/* Active/root category ------------------------------------ */
.mcs-post-sidebar__root-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mcs-post-sidebar__root-item {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    border-radius: 8px;
    color: var(--mcs-ps-text);
    background: transparent;
    transition: background-color .18s ease, color .18s ease;
}

.mcs-post-sidebar__root-item:hover,
.mcs-post-sidebar__root-item:focus-visible,
.mcs-post-sidebar__root-item.is-touched {
    color: var(--mcs-ps-text);
    background: var(--mcs-ps-hover-bg);
    outline: none;
}

.mcs-post-sidebar__root-item--active,
.mcs-post-sidebar__root-item--active:hover,
.mcs-post-sidebar__root-item--active:focus-visible {
    background: var(--mcs-ps-active-bg);
    color: #25252a;
    font-weight: 700;
}

.mcs-post-sidebar__root-icon {
    width: 19px;
    min-width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.mcs-post-sidebar__root-icon img {
    display: block;
    width: 18px;
    height: 18px;
    object-fit: contain;
    object-position: center;
}

.mcs-post-sidebar__root-label {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-style: normal;
    font-weight: 500;
    line-height: 1.8;
}

.mcs-post-sidebar__root-item--active .mcs-post-sidebar__root-label {
    font-weight: 700;
}

/* Child categories ---------------------------------------- */
.mcs-post-sidebar__sections {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 7px;
    padding: 0 10px 0 4px;
}

.mcs-post-sidebar__child-item {
    width: 100%;
    min-height: 34px;
    padding: 5px 8px 5px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 7px;
    color: var(--mcs-ps-text);
    background: transparent;
    transition: color .18s ease, background-color .18s ease;
}

.mcs-post-sidebar__child-item:hover,
.mcs-post-sidebar__child-item:focus-visible,
.mcs-post-sidebar__child-item.is-touched {
    color: #242429;
    background: var(--mcs-ps-hover-bg);
    outline: none;
}

.mcs-post-sidebar__child-item--active,
.mcs-post-sidebar__child-item--active:hover,
.mcs-post-sidebar__child-item--active:focus-visible {
    color: var(--mcs-ps-red);
    background: transparent;
    font-weight: 600;
}

.mcs-post-sidebar__child-label {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-style: normal;
    font-weight: inherit;
    line-height: 1.75;
}

.mcs-post-sidebar__child-chevron {
    width: 14px;
    min-width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #34343a;
    flex: 0 0 auto;
}

.mcs-post-sidebar__child-item--active .mcs-post-sidebar__child-chevron {
    color: var(--mcs-ps-red);
}

.mcs-post-sidebar__child-chevron svg {
    display: block;
    width: 7px;
    height: 12px;
}

.mcs-post-sidebar__child-item--active .mcs-post-sidebar__child-chevron svg {
    width: 10px;
    height: 7px;
}

.mcs-post-sidebar__child-chevron path {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.35;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Expanded article list ----------------------------------- */
.mcs-post-sidebar__article-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    margin: 0 14px 5px 8px;
    padding: 0 12px 0 0;
    border-right: 1px solid var(--mcs-ps-border);
}

.mcs-post-sidebar__article-link {
    display: block;
    width: 100%;
    padding: 4px 0;
    color: var(--mcs-ps-muted);
    font-size: 11.5px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.65;
    transition: color .16s ease;
}

.mcs-post-sidebar__article-link:hover,
.mcs-post-sidebar__article-link:focus-visible,
.mcs-post-sidebar__article-link.is-touched {
    color: #303036;
    outline: none;
}

.mcs-post-sidebar__article-link--current,
.mcs-post-sidebar__article-link--current:hover,
.mcs-post-sidebar__article-link--current:focus-visible {
    color: var(--mcs-ps-red);
    font-weight: 500;
}

/* Divider before other root categories -------------------- */
.mcs-post-sidebar__divider {
    width: calc(100% - 8px);
    height: 1px;
    margin: 12px 4px 10px;
    background: var(--mcs-ps-border);
}

@media (max-width: 767px) {
    .mcs-post-sidebar__root-item {
        min-height: 40px;
        padding: 7px 9px;
    }

    .mcs-post-sidebar__root-label {
        font-size: 12.5px;
    }

    .mcs-post-sidebar__child-item {
        min-height: 33px;
    }

    .mcs-post-sidebar__child-label {
        font-size: 11.5px;
    }

    .mcs-post-sidebar__article-link {
        font-size: 11px;
    }
}
