/* =========================================================
   SPEEDACURE LEFT CATEGORY SIDEBAR ACTIVE ITEM FIX
   ========================================================= */

/* Sidebar category links */
.category-sidebar a,
[class*="category-sidebar"] a,
[class*="side-category"] a,
aside .category-list a,
aside .categories a,
aside nav a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 72px;
    padding: 16px 18px;
    line-height: 1.25;
    border-radius: 14px;
    text-decoration: none;
    white-space: normal;
    word-break: normal;
    transition: all 0.2s ease;
}

/* Active category */
.category-sidebar a.active,
.category-sidebar .active > a,
.category-sidebar a[aria-current="page"],
.category-sidebar .is-active > a,

[class*="category-sidebar"] a.active,
[class*="category-sidebar"] .active > a,
[class*="category-sidebar"] a[aria-current="page"],
[class*="category-sidebar"] .is-active > a,

[class*="side-category"] a.active,
[class*="side-category"] .active > a,
[class*="side-category"] a[aria-current="page"],
[class*="side-category"] .is-active > a,

aside .category-list a.active,
aside .category-list .active > a,
aside .category-list a[aria-current="page"],

aside .categories a.active,
aside .categories .active > a,
aside .categories a[aria-current="page"] {
    background: #0c9b66 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    box-shadow: 0 6px 16px rgba(12, 155, 102, 0.15);
}

/* Ensure child text also becomes white */
.category-sidebar a.active *,
.category-sidebar .active > a *,
.category-sidebar a[aria-current="page"] *,

[class*="category-sidebar"] a.active *,
[class*="category-sidebar"] .active > a *,
[class*="category-sidebar"] a[aria-current="page"] *,

[class*="side-category"] a.active *,
[class*="side-category"] .active > a *,
[class*="side-category"] a[aria-current="page"] *,

aside .category-list a.active *,
aside .category-list .active > a *,
aside .category-list a[aria-current="page"] *,

aside .categories a.active *,
aside .categories .active > a *,
aside .categories a[aria-current="page"] * {
    color: #ffffff !important;
}

/* Optional: slightly improve normal sidebar links too */
.category-sidebar a:hover,
[class*="category-sidebar"] a:hover,
[class*="side-category"] a:hover,
aside .category-list a:hover,
aside .categories a:hover {
    background: #f3faf6;
}

/* SPEEDACURE ACTIVE CATEGORY CONTRAST FIX */

/* Active navigation links */
aside a.active,
aside a[aria-current="page"],
aside .active a,
aside .is-active a,
.category-sidebar a.active,
.category-sidebar a[aria-current="page"] {
    background-color: #11966e !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-weight: 700 !important;
}

/* Preserve white text inside active links */
aside a.active *,
aside a[aria-current="page"] *,
aside .active a *,
aside .is-active a *,
.category-sidebar a.active *,
.category-sidebar a[aria-current="page"] * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Improve text wrapping */
aside a.active,
aside a[aria-current="page"] {
    line-height: 1.4 !important;
    overflow-wrap: break-word;
}


/* =====================================================
   SPEEDACURE CATEGORY SIDEBAR — EXACT ACTIVE FIX
   ===================================================== */

aside.sc-category-sidebar
.sc-category-links
a.is-active,

aside.sc-category-sidebar
.sc-category-links
a.is-active:link,

aside.sc-category-sidebar
.sc-category-links
a.is-active:visited,

aside.sc-category-sidebar
.sc-category-links
a.is-active:hover,

aside.sc-category-sidebar
.sc-category-links
a.is-active:focus {

    background-color: #0f8f63 !important;

    color: #ffffff !important;

    -webkit-text-fill-color: #ffffff !important;

    font-weight: 700 !important;

    line-height: 1.35 !important;

    text-decoration: none !important;
}

/* Any text/icon inside active category */

aside.sc-category-sidebar
.sc-category-links
a.is-active * {

    color: #ffffff !important;

    -webkit-text-fill-color: #ffffff !important;
}


/* ==============================================
   SPEEDACURE COMPACT CATEGORY SIDEBAR V2
   ============================================== */

/* Compact sidebar links */
aside.sc-category-sidebar .sc-category-links a {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    height: auto !important;
    min-height: 44px !important;
    max-height: none !important;

    margin: 0 !important;
    padding: 10px 14px !important;

    font-size: 15px !important;
    line-height: 1.35 !important;

    border-radius: 10px !important;
    white-space: normal !important;
}

/* Reduce gaps between category links */
aside.sc-category-sidebar .sc-category-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

/* Active category */
aside.sc-category-sidebar .sc-category-links a.is-active {
    background: #087B36 !important;
    color: #FFFFFF !important;
    -webkit-text-fill-color: #FFFFFF !important;
    font-weight: 700 !important;
}

/* Normal category links */
aside.sc-category-sidebar .sc-category-links a:not(.is-active) {
    background: transparent !important;
    color: #123D2F !important;
    -webkit-text-fill-color: #123D2F !important;
}

/* Hover */
aside.sc-category-sidebar .sc-category-links a:not(.is-active):hover {
    background: #EAF8ED !important;
    color: #087B36 !important;
    -webkit-text-fill-color: #087B36 !important;
}

/* Keep sidebar content below sticky header if applicable */
aside.sc-category-sidebar {
    scroll-margin-top: 130px;
}

/* Mobile */
@media (max-width: 768px) {
    aside.sc-category-sidebar .sc-category-links a {
        min-height: 40px !important;
        padding: 9px 12px !important;
        font-size: 14px !important;
    }
}

