/* pointer-events / fill / text-rendering / mask-* declarations of this file live in the sibling .css3-ext.css (tools/css3-split, GIGW_COMPLIANCE.md section 7). New ones added here are moved there by re-running the script. */
/* Pill-style Sidebar Navigation */
.sidebar-nav {
   /* background: var(--card-bg);*/
    border-radius: 1.5rem;
/*    box-shadow: 0 2px 8px var(--shadow-color);*/
   
}

.nav-pill {
    display: flex;
    align-items: center;
    width: 100%;
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    margin-bottom: 0.5rem;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    font-size: 1.1rem;
    box-shadow: none;

}
/*
    .nav-pill.active, .nav-pill:focus, .nav-pill:hover {
        background: var(--button-primary);
        color: var(--text-color);
        box-shadow: 0 2px 8px var(--shadow-color);
    }*/

.nav-sublist {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-subpill {
    display: block;
    color: var(--secondary-color);
    background: none;
    border: none;
    text-align: left;
    padding: 0.4rem 1.2rem;
    border-radius: 1rem;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
    margin-bottom: 0;
}

/*    .nav-subpill.active, .nav-subpill:focus, .nav-subpill:hover {
        background: var(--accent-color);
        color: var(--primary-color);
    }*/

/* Card and Table Styling */
.card {
    background: var(--card-bg);
    border-top: 4px solid var(--border-color);
    box-shadow: 0 2px 12px var(--shadow-color);
}

#resourcesTableContainer table {
    background: var(--bg-color);
    border-radius: 7px;
    overflow: hidden;
}

#resourcesTableContainer th {
    background: var(--primary-color);
    color: var(--text-color);
    font-weight: 600;
    border: none;
}

#resourcesTableContainer td {
    vertical-align: middle;
}

/* Search Bar Styling */
.search-container .form-control {
    border-radius: 2rem 0 0 2rem !important;
    border: 2px solid var(--primary-color);
   
}

.search-container .input-group-text {
    border-radius: 0 2rem 2rem 0 !important;
    border: 2px solid var(--primary-color);
    border-left: none;
}

.search-container .form-control:focus {
    box-shadow: 0 0 0 2px var(--accent-color);
    border-color: var(--primary-color);
}

.accordion-item .accordion-button {
    /* border-top-left-radius: var(--bs-accordion-inner-border-radius); */
    /* border-top-right-radius: var(--bs-accordion-inner-border-radius); */
    border-radius: 3px !important;
    border: 1px solid var(--border-color);
}

.accordion-header {
    font-size: 20px;
    font-weight: 500;
    color: var(--text-color);
}

#subcategoryNav .nav-link {
    color: var(--nav-text) !important;
}

    #subcategoryNav .nav-link:active {
        color: var(--text-color) !important;
        background-color: var(--button-primary) !important;
    }

    #subcategoryNav .nav-link:focus {
        color: var(--text-color) !important;
        background-color: var(--button-primary) !important;
    }

    #subcategoryNav .nav-link:hover {
        color: var(--text-color) !important;
        background-color: var(--button-primary) !important;
    }
/* Responsive Tweaks */
@media (max-width: 991.98px) {
    .sidebar-nav {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .sidebar-nav {
        border-radius: 1rem;
        padding: 1rem;
    }

    .nav-pill, .nav-subpill {
        font-size: 1rem;
        padding: 0.5rem 1rem;
    }

    .card {
        border-radius: 1rem;
        padding: 1rem;
    }
}

.accordion-body {
    padding: 0.5rem 1rem;
}

.accordion-button::after {
    display: none !important;
}

/* Acts & Rules Dropdown Styles */
.acts-dropdown {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 16px var(--shadow-color);
    margin-top: 8px;
    padding: 10px 0 10px 0;
    transition: all 0.3s;
    min-width: 180px;
    position: relative;
    z-index: 2;
}

.acts-dropdown-item {
    color: var(--primary-color);
    padding: 8px 24px 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-size: 1.08rem;
    margin: 2px 0;
    display: block;
}

    .acts-dropdown-item:hover {
        background: var(--accent-color);
        color: var(--text-color);
        font-weight: 700;
        box-shadow: 0 2px 8px var(--shadow-color);
    }

#actsDropdownBtn .fa-caret-down {
    transition: transform 0.3s;
}

#actsDropdownBtn.open .fa-caret-down {
    transform: rotate(-180deg);
}

.nav-pills .nav-link {
    color:black;
    font-weight: 500;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background-image: none !important;
    background: transparent !important;
}

    .nav-pills .nav-link.active,
    .nav-pills .nav-link:hover {
        /*background-color: var(--button-primary) !important;*/
        /*color: var(--text-color) !important;*/
        font-weight: 600;
        box-shadow: none !important;
        background-image: none !important;
        background: var(--button-primary) !important;
    }

    .nav-pills .nav-link svg {
    }

    .nav-pills .nav-link.active svg {
    }

/* --text-color is the colour of body text on the PAGE background, not on this header's
   --primary-color fill. Pairing the two put dark teal on dark teal: measured 1.17:1 where
   WCAG AA asks 4.5:1, so the header text was effectively invisible. --primary-color is a
   strong brand colour in every theme, so white reads on it: 4.83:1 (sunset) to 8.72:1
   (blue). The one exception is handled below. */
thead th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    vertical-align: middle;
}

/* The dark theme is the exception: its --primary-color is a LIGHT blue (#60a5fa), an accent
   meant to sit on a dark page, so white on it is only 2.5:1. That theme already pairs
   #1f2937 with the same blue for the active service button; reuse that pairing here — 5.77:1. */
[data-theme="dark"] thead th {
    color: #1f2937;
}

tbody a.btn-view {
    color: var(--accent-color);
    border-color: var(--accent-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    font-size: 0.9rem;
}

    tbody a.btn-view svg {
        width: 1rem;
        height: 1rem;
    }

tbody a.btn-download {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 500;
    font-size: 0.9rem;
}

    tbody a.btn-download svg {
        width: 1rem;
        height: 1rem;
    }

.table tbody tr:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.container-custom {
    max-width: 900px;
    background: var(--card-bg);
    padding: 1rem 2rem 2rem 2rem;
    border-radius: 12px;
    box-shadow: 0 0 10px var(--shadow-color);
}
