/* ==========================================================
   SOURCEPOINT - List View Override Styles
   Version: 3.2.0 — Responsive table & filter fixes
   ========================================================== */

/* ----------------------------------------------------------
   HOMEPAGE: Force list view (no images, compact)
   ---------------------------------------------------------- */

/* Hide the background image */
body.home .lf-item-alternate .lf-background {
    display: none !important;
}

/* Hide the dark overlay */
body.home .lf-item-alternate .overlay {
    display: none !important;
}

/* Remove fixed height from the card */
body.home .lf-item-alternate {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    background: #fff !important;
}

/* Also target .lf-item directly */
body.home .lf-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* And the outer container */
body.home .lf-item-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* And the grid-item column wrapper */
body.home .grid-item {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

/* Remove fixed height from the link wrapper */
body.home .lf-item-alternate > a {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Hide the footer bar on homepage to save space */
body.home .lf-item-container .lf-head {
    display: none !important;
}

/* Hide unnecessary explore widget elements on homepage */
body.home .no-results-wrapper {
    display: none !important;
}

body.home .load-more-btn {
    display: none !important;
}

body.home .loader-bg {
    display: none !important;
}

/* Pull .lf-item-info-2 out of absolute positioning */
body.home .lf-item-alternate .lf-item-info-2 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    transform: none !important;
    background: #fff !important;
    padding: 10px 14px !important;
    margin: 0 !important;
}

/* Force dark text */
body.home .lf-item-alternate .lf-item-info-2,
body.home .lf-item-alternate .lf-item-info-2 * {
    color: #333 !important;
}

body.home .lf-item-alternate .lf-item-info-2 .listing-preview-title {
    color: #1a3a5c !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 1px 0 !important;
    padding: 0 !important;
    line-height: 1.3 !important;
}

/* Remove all extra spacing on card elements */
body.home .lf-item,
body.home .lf-item-container,
body.home .lf-item-alternate {
    padding: 0 !important;
    margin: 0 !important;
}

body.home .lf-item-alternate .lf-item-info-2 h6 {
    color: #555 !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    font-size: 13px !important;
}

body.home .lf-item-alternate .lf-item-info-2 .lf-contact {
    margin: 0 !important;
    padding: 0 !important;
}

body.home .lf-item-alternate .lf-item-info-2 .lf-contact li {
    display: inline !important;
    margin-right: 15px !important;
    font-size: 13px !important;
    color: #555 !important;
}

body.home .lf-item-alternate .lf-item-info-2 .lf-contact i {
    color: #1a3a5c !important;
}

/* Single column */
body.home .results-view [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-bottom: 8px !important;
}

/* Card container - compact list look */
body.home .lf-item-container {
    border-left: 4px solid #1a3a5c !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Constrain all elements to parent width */
body.home .lf-item-alternate,
body.home .lf-item-alternate > a,
body.home .lf-item-alternate .lf-item-info-2 {
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Prevent contact list from pushing width */
body.home .lf-item-alternate .lf-contact {
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.home .lf-item-alternate .lf-contact li {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

/* Footer bar - compact */
body.home .lf-item-container .lf-head {
    background: #fff !important;
    border-top: 1px solid #eee !important;
    padding: 6px 12px !important;
}

body.home .lf-item-container .lf-head .lf-head-btn {
    color: #555 !important;
    font-size: 12px !important;
}

/* Fix results-view container - Masonry sets inline height */
body.home .results-view,
body.home .results-view.grid {
    height: auto !important;
    min-height: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    max-width: 100% !important;
}

body.home .results-view .grid-item,
body.home .results-view [class*="col-"] {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Disable Masonry absolute positioning on home */
body.home .results-view {
    display: flex !important;
    flex-direction: column !important;
}


/* ----------------------------------------------------------
   DARK MODE: Homepage list view card
   ---------------------------------------------------------- */

body.home.darkmode--activated .lf-item-alternate {
    background: #000000 !important;
}

body.home.darkmode--activated .lf-item-container {
    background: #000000 !important;
    border-left: 4px solid #EC1313 !important;
    box-shadow: 0 1px 10px rgba(236, 19, 19, 0.2) !important;
}

body.home.darkmode--activated .lf-item {
    background: #000000 !important;
}

body.home.darkmode--activated .grid-item {
    background: transparent !important;
}

body.home.darkmode--activated .lf-item-alternate .lf-item-info-2 {
    background: #000000 !important;
}

body.home.darkmode--activated .lf-item-alternate .lf-item-info-2,
body.home.darkmode--activated .lf-item-alternate .lf-item-info-2 * {
    color: #FFFFFF !important;
}

body.home.darkmode--activated .lf-item-alternate .lf-item-info-2 h6 {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.home.darkmode--activated .lf-item-alternate .lf-contact li {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.home.darkmode--activated .lf-item-alternate .lf-contact i,
body.home.darkmode--activated .lf-item-alternate .lf-item-info-2 i {
    color: #EC1313 !important;
}

body.home.darkmode--activated .fl-head,
body.home.darkmode--activated .fl-results-no,
body.home.darkmode--activated .fl-results-no span {
    color: #FFFFFF !important;
}

body.home.darkmode--activated .results-view {
    background: transparent !important;
}


/* ----------------------------------------------------------
   DARK MODE: Explore page list view
   ---------------------------------------------------------- */

body.darkmode--activated .ml-force-list-view .lf-item-alternate,
body.darkmode--activated .ml-force-list-view .lf-item-container {
    background: #000000 !important;
}

body.darkmode--activated .ml-force-list-view .lf-item-alternate .lf-item-info-2 {
    background: #000000 !important;
}

body.darkmode--activated .ml-force-list-view .lf-item-alternate .lf-item-info-2,
body.darkmode--activated .ml-force-list-view .lf-item-alternate .lf-item-info-2 * {
    color: #FFFFFF !important;
}

body.darkmode--activated .ml-force-list-view .lf-item-alternate .lf-contact i,
body.darkmode--activated .ml-force-list-view .lf-item-alternate .lf-item-info-2 i {
    color: #EC1313 !important;
}

body.darkmode--activated .ml-force-list-view .lf-item-container {
    border-left: 4px solid #EC1313 !important;
    box-shadow: 0 1px 10px rgba(236, 19, 19, 0.2) !important;
}

body.darkmode--activated .ml-force-list-view .lf-item-container .lf-head {
    background: #000000 !important;
    border-top: 1px solid #222 !important;
}

body.darkmode--activated .ml-force-list-view .lf-item-container .lf-head .lf-head-btn {
    color: #FFFFFF !important;
}

body.darkmode--activated .ml-view-toggle {
    background: #111111 !important;
}

body.darkmode--activated .ml-view-toggle button {
    color: #FFFFFF !important;
}

body.darkmode--activated .ml-view-toggle button svg {
    fill: #FFFFFF !important;
}

body.darkmode--activated .ml-view-toggle button.active {
    background: #000000 !important;
    box-shadow: 0 1px 3px rgba(236, 19, 19, 0.3) !important;
}

.darkmode--activated .ml-view-toggle button.active svg {
    fill: #EC1313 !important;
}

.ml-view-toggle {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 10px;
    float: right;
}

.ml-view-toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, box-shadow 0.2s;
}

.ml-view-toggle button:hover {
    background: rgba(255, 255, 255, 0.6);
}

.ml-view-toggle button.active {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.ml-view-toggle button svg {
    width: 18px;
    height: 18px;
    fill: #555;
}

.ml-view-toggle button.active svg {
    fill: #1a3a5c;
}


/* ----------------------------------------------------------
   EXPLORE PAGE: List view mode
   ---------------------------------------------------------- */

.ml-force-list-view .lf-item-alternate .lf-background {
    display: none !important;
}

.ml-force-list-view .lf-item-alternate .overlay {
    display: none !important;
}

.ml-force-list-view .lf-item-alternate {
    height: auto !important;
    min-height: 0 !important;
    background: #fff !important;
}

.ml-force-list-view .lf-item-alternate > a {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2 {
    position: relative !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    transform: none !important;
    background: #fff !important;
    padding: 12px 16px !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2,
.ml-force-list-view .lf-item-alternate .lf-item-info-2 * {
    color: #333 !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2 .listing-preview-title {
    color: #1a3a5c !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 2px !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2 h6 {
    color: #555 !important;
    margin-top: 0 !important;
    margin-bottom: 4px !important;
    font-size: 13px !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2 .lf-contact {
    margin: 0 !important;
    padding: 0 !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2 .lf-contact li {
    display: inline !important;
    margin-right: 15px !important;
    font-size: 13px !important;
    color: #555 !important;
}

.ml-force-list-view .lf-item-alternate .lf-item-info-2 .lf-contact i {
    color: #1a3a5c !important;
}

.ml-force-list-view [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding-left: 5px !important;
    padding-right: 5px !important;
    margin-bottom: 8px !important;
}

.ml-force-list-view .lf-item-container {
    border-left: 4px solid #1a3a5c !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
}

.ml-force-list-view .lf-item-container .lf-head {
    background: #fff !important;
    border-top: 1px solid #eee !important;
    padding: 6px 12px !important;
}

.ml-force-list-view .lf-item-container .lf-head .lf-head-btn {
    color: #555 !important;
    font-size: 12px !important;
}

.ml-force-list-view {
    height: auto !important;
}

.ml-force-list-view .grid-item {
    position: relative !important;
}


/* ----------------------------------------------------------
   EXPLORE PAGE: Export button styles
   ---------------------------------------------------------- */

.sp-export-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: #1a3a5c;
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    margin: 8px 0;
    float: right;
}

.sp-export-btn:hover {
    background: #0f2a45;
    box-shadow: 0 2px 8px rgba(26, 58, 92, 0.3);
}

.sp-export-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.sp-export-btn svg {
    flex-shrink: 0;
}

.sp-export-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sp-spin 0.6s linear infinite;
    margin-right: 6px;
}

@keyframes sp-spin {
    to { transform: rotate(360deg); }
}

body.darkmode--activated .sp-export-btn {
    background: #EC1313;
    color: #fff !important;
}

body.darkmode--activated .sp-export-btn:hover {
    background: #d10000;
    box-shadow: 0 2px 8px rgba(236, 19, 19, 0.4);
}


/* ==========================================================
   SUPPLIER DIRECTORY TABLE — v3.2 Responsive
   ========================================================== */

/* Isolate the table wrapper from external page styles */
.sp-table-wrapper {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    font-family: "DM Sans", sans-serif;
    box-sizing: border-box;
}

.sp-table-wrapper *,
.sp-table-wrapper *::before,
.sp-table-wrapper *::after {
    box-sizing: border-box;
}

.sp-table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e8eaed;
    flex-wrap: wrap;
    gap: 10px;
}

.sp-table-count {
    font-size: 15px;
    font-weight: 600;
    color: #1a3a5c;
}

/* Search Bar */
.sp-search-bar {
    padding: 16px 20px 0;
}

.sp-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.sp-search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #1a3a5c;
    pointer-events: none;
    z-index: 1;
    width: 18px;
    height: 18px;
}

.sp-search-input {
    width: 100%;
    padding: 13px 44px 13px 46px;
    border: 2px solid #e0e2e6;
    border-radius: 10px;
    font-size: 14px;
    font-family: "DM Sans", sans-serif;
    color: #333;
    background: #f8f9fb;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.sp-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.sp-search-input:focus {
    outline: none;
    border-color: #1a3a5c;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(26, 58, 92, 0.08);
}

.sp-search-input:hover {
    border-color: #c0c4cc;
}

.sp-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    background: #e8eaed;
    border: none;
    font-size: 16px;
    color: #555;
    cursor: pointer;
    padding: 2px 7px;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
}

.sp-search-clear:hover {
    color: #fff;
    background: #1a3a5c;
}

/* ----------------------------------------------------------
   FILTER BAR — 2-row layout
   Row 1 (.sp-filter-bar-top): Industry, Category, Subcategory, Tags
   Row 2 (.sp-filter-bar):     Cert, BBBEE Class, BBBEE Level,
                                Black Own, Black Female, Province,
                                Location, Reset
   ---------------------------------------------------------- */

.sp-filter-bar,
.sp-filter-bar-top {
    display: grid;
    align-items: end;
    gap: 10px;
    padding: 12px 20px;
    background: #f8f9fb;
}

/* Row 1: 4 equal columns */
.sp-filter-bar-top {
    grid-template-columns: repeat(4, 1fr);
    border-bottom: none;
    padding-bottom: 4px;
}

/* Row 2: 8 items — fit all in one row on desktop */
.sp-filter-bar {
    grid-template-columns: repeat(7, 1fr) auto;
    border-bottom: 1px solid #e8eaed;
    padding-top: 4px;
}

.sp-filter-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0; /* prevents grid blowout */
}

.sp-filter-group label {
    font-size: 10px;
    font-weight: 700;
    color: #8a919a;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-filter-select {
    width: 100%;
    min-width: 0;
    padding: 8px 28px 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 13px;
    font-family: "DM Sans", sans-serif;
    color: #333;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-filter-select:focus {
    outline: none;
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
}

.sp-filter-select:hover {
    border-color: #aab0b8;
}

.sp-filter-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #f0f0f0;
}

/* Text input filter (location) */
.sp-filter-text {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    font-size: 13px;
    font-family: "DM Sans", sans-serif;
    color: #333;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.sp-filter-text::placeholder {
    color: #aaa;
    font-weight: 400;
}

.sp-filter-text:focus {
    outline: none;
    border-color: #1a3a5c;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
}

.sp-filter-reset {
    padding: 8px 16px;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    background: #fff;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    font-family: "DM Sans", sans-serif;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    height: fit-content;
    align-self: end;
}

.sp-filter-reset:hover {
    background: #1a3a5c;
    border-color: #1a3a5c;
    color: #fff;
}

.sp-filter-empty {
    text-align: center;
    padding: 50px 20px;
    color: #888;
    font-size: 14px;
    display: none;
}

.sp-filter-empty a {
    color: #1a3a5c;
    font-weight: 600;
    text-decoration: underline;
}

/* ----------------------------------------------------------
   RESPONSIVE FILTER BARS
   ---------------------------------------------------------- */

/* Large tablets / small desktops */
@media (max-width: 1200px) {
    .sp-filter-bar {
        grid-template-columns: repeat(4, 1fr);
    }
    .sp-filter-bar-top {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablets */
@media (max-width: 992px) {
    .sp-filter-bar {
        grid-template-columns: repeat(3, 1fr);
    }
    .sp-filter-bar-top {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large phones */
@media (max-width: 768px) {
    .sp-filter-bar,
    .sp-filter-bar-top {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 10px 14px;
    }
    .sp-filter-reset {
        grid-column: 1 / -1;
        text-align: center;
    }
    .sp-search-bar {
        padding: 12px 14px 0;
    }
    .sp-search-input {
        padding: 11px 40px 11px 42px;
        font-size: 13px;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .sp-filter-bar,
    .sp-filter-bar-top {
        grid-template-columns: 1fr;
        gap: 6px;
        padding: 8px 12px;
    }
    .sp-table-header {
        padding: 12px 14px;
    }
    .sp-table-count {
        font-size: 13px;
    }
}


/* ----------------------------------------------------------
   TABLE — Scroll container + base
   ---------------------------------------------------------- */

.sp-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sp-table-scroll::-webkit-scrollbar {
    height: 8px;
}

.sp-table-scroll::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.sp-table-scroll::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 4px;
}

.sp-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.sp-supplier-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
    font-size: 13px;
    table-layout: auto;
}

.sp-supplier-table thead th {
    background: #f4f5f7;
    color: #555;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    text-align: left;
    white-space: nowrap;
    border-bottom: 2px solid #e0e2e6;
    position: sticky;
    top: 0;
    z-index: 2;
}

.sp-supplier-table tbody tr {
    border-bottom: 1px solid #eef0f2;
    transition: background 0.15s;
}

.sp-supplier-table tbody tr:hover {
    background: #f8f9fb;
}

.sp-supplier-table tbody td {
    padding: 10px 12px;
    color: #333;
    vertical-align: middle;
    white-space: nowrap;
}

/* Company cell with avatar */
.sp-company-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

#sp-table .sp-avatar-img {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px;
    min-height: 34px;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0;
    border: 1px solid #e8eaed;
    display: inline-block !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.sp-company-name {
    color: #1a3a5c !important;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
}

.sp-company-name:hover {
    color: #0f2a45 !important;
    text-decoration: underline !important;
}

.sp-email-link {
    color: #2563eb !important;
    text-decoration: none !important;
    font-size: 12px;
}

.sp-email-link:hover {
    text-decoration: underline !important;
}

.sp-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.sp-badge-bbbee {
    background: #e8f5e9;
    color: #2e7d32;
}

.sp-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 15px;
}

/* Column widths — use max-width to prevent blowout */
.sp-col-company  { min-width: 160px; }
.sp-col-email    { min-width: 170px; }
.sp-col-category {
    min-width: 150px;
    max-width: 260px;
    white-space: normal !important;
    line-height: 1.4;
}
.sp-col-industry { min-width: 100px; }
.sp-col-cert     { min-width: 90px; }
.sp-col-bbbee    { min-width: 70px; }
.sp-col-bbbeeclass { min-width: 80px; }
.sp-col-ownership { min-width: 90px; }
.sp-col-female   { min-width: 90px; }
.sp-col-province { min-width: 80px; }
.sp-col-city     { min-width: 80px; }

.sp-col-location {
    white-space: normal !important;
    min-width: 150px;
    max-width: 250px;
}

/* Export button in table header */
.sp-table-header .sp-export-btn {
    margin: 0;
    float: none;
    flex-shrink: 0;
}

/* ----------------------------------------------------------
   RESPONSIVE TABLE HEADER
   ---------------------------------------------------------- */

@media (max-width: 768px) {
    .sp-table-header {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .sp-table-header .sp-export-btn {
        width: 100%;
        justify-content: center;
    }
    /* Reduce min-widths for scroll on small screens */
    .sp-supplier-table {
        min-width: 800px;
    }
    .sp-col-company  { min-width: 140px; }
    .sp-col-email    { min-width: 150px; }
    .sp-col-industry { min-width: 90px; }
    .sp-col-cert     { min-width: 80px; }
    .sp-col-bbbee    { min-width: 60px; }
    .sp-col-ownership { min-width: 80px; }
    .sp-col-female   { min-width: 80px; }
    .sp-col-province { min-width: 70px; }
    .sp-col-city     { min-width: 70px; }
    .sp-supplier-table thead th {
        padding: 8px 10px;
        font-size: 10px;
    }
    .sp-supplier-table tbody td {
        padding: 8px 10px;
        font-size: 12px;
    }
}


/* ==========================================================
   DARK MODE: Supplier Directory Table
   ========================================================== */

body.darkmode--activated .sp-table-wrapper {
    background: #000 !important;
    box-shadow: 0 2px 12px rgba(236, 19, 19, 0.15);
    border: 1px solid #222;
}

body.darkmode--activated .sp-table-header {
    border-bottom-color: #222;
}

body.darkmode--activated .sp-table-count {
    color: #fff;
}

body.darkmode--activated .sp-supplier-table thead th {
    background: #111;
    color: #aaa;
    border-bottom-color: #333;
}

body.darkmode--activated .sp-supplier-table tbody tr {
    border-bottom-color: #1a1a1a;
}

body.darkmode--activated .sp-supplier-table tbody tr:hover {
    background: #111;
}

body.darkmode--activated .sp-supplier-table tbody td {
    color: #ddd;
}

body.darkmode--activated .sp-company-name {
    color: #fff !important;
}

body.darkmode--activated .sp-company-name:hover {
    color: #EC1313 !important;
}

body.darkmode--activated .sp-email-link {
    color: #6ba3f7 !important;
}

body.darkmode--activated .sp-badge-bbbee {
    background: rgba(46, 125, 50, 0.2);
    color: #66bb6a;
}

body.darkmode--activated .sp-table-scroll::-webkit-scrollbar-track {
    background: #111;
}

body.darkmode--activated .sp-table-scroll::-webkit-scrollbar-thumb {
    background: #444;
}

body.darkmode--activated .sp-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #666;
}

body.darkmode--activated .sp-avatar {
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Dark mode: search bar */
body.darkmode--activated .sp-search-bar {
    background: #000;
}

body.darkmode--activated .sp-search-input {
    background: #0a0a0a;
    border-color: #333;
    color: #ddd;
}

body.darkmode--activated .sp-search-input::placeholder {
    color: #555;
}

body.darkmode--activated .sp-search-input:focus {
    border-color: #EC1313;
    background: #111;
    box-shadow: 0 0 0 4px rgba(236, 19, 19, 0.1);
}

body.darkmode--activated .sp-search-input:hover {
    border-color: #444;
}

body.darkmode--activated .sp-search-icon {
    color: #EC1313;
}

body.darkmode--activated .sp-search-clear {
    color: #999;
    background: #222;
}

body.darkmode--activated .sp-search-clear:hover {
    color: #fff;
    background: #EC1313;
}

/* Dark mode: filter bar */
body.darkmode--activated .sp-filter-bar,
body.darkmode--activated .sp-filter-bar-top {
    background: #0a0a0a;
    border-bottom-color: #222;
}

body.darkmode--activated .sp-filter-group label {
    color: #666;
}

body.darkmode--activated .sp-filter-select {
    background: #111 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center;
    background-size: 12px;
    border-color: #333;
    color: #ddd;
}

body.darkmode--activated .sp-filter-select:focus {
    border-color: #EC1313;
    box-shadow: 0 0 0 3px rgba(236, 19, 19, 0.15);
}

body.darkmode--activated .sp-filter-select:hover {
    border-color: #555;
}

body.darkmode--activated .sp-filter-select:disabled {
    opacity: 0.4;
    background-color: #0a0a0a;
}

body.darkmode--activated .sp-filter-text {
    background: #111;
    border-color: #333;
    color: #ddd;
}

body.darkmode--activated .sp-filter-text:focus {
    border-color: #EC1313;
    box-shadow: 0 0 0 3px rgba(236, 19, 19, 0.15);
}

body.darkmode--activated .sp-filter-reset {
    background: #111;
    border-color: #333;
    color: #aaa;
}

body.darkmode--activated .sp-filter-reset:hover {
    background: #EC1313;
    border-color: #EC1313;
    color: #fff;
}

body.darkmode--activated .sp-filter-empty {
    color: #666;
}

body.darkmode--activated .sp-filter-empty a {
    color: #EC1313;
}