/* SAT Tables - Houtini Theme Overrides
 * Fixes specificity conflicts with dark theme + normalises plugin font sizes.
 * Plugin CSS (sat-professional-styles.css) is not modified.
 * v1.0.4
 */

/* ══════════════════════════════════════════════════════
   BOTH MODES — font size normalisation
   Plugin sets table at 16px and .sat-price-link at 24px.
   These apply in light and dark mode.
   ══════════════════════════════════════════════════════ */

.sat-table-wrapper,
.sat-products-container,
.sat-products-container .sat-products-table {
    font-size: 0.75rem !important;
}

.sat-products-container .sat-price-link,
.sat-products-container .sat-col-price a {
    font-size: 0.875rem !important;
}

.sat-products-container .sat-no-rating,
.sat-products-container .sat-rating-value,
.sat-products-container .sat-rating-count {
    font-size: 0.75rem !important;
}

.sat-products-container .sat-star {
    font-size: 0.8125rem !important;
}

.sat-products-container .sat-in-stock,
.sat-products-container .sat-out-of-stock {
    font-size: 0.6875rem !important;
}

.sat-more-info-btn {
    border-radius: 6px !important;
    font-size: 0.75rem !important;
}

.sat-filter-bar {
    font-size: 0.75rem !important;
}

/* ══════════════════════════════════════════════════════
   DARK MODE — colour and background overrides
   These only apply when body carries .dark-theme class.
   ══════════════════════════════════════════════════════ */

/* ── Filter bar (Show / Sort by controls) ── */
.dark-theme .sat-table-wrapper .sat-filter-bar {
    background: #1f2937 !important;
    color: #d1d5db !important;
    border-bottom: 1px solid #374151 !important;
}

.dark-theme .sat-filter-bar select {
    background: #111827 !important;
    color: #d1d5db !important;
    border-color: #374151 !important;
}

.dark-theme .sat-filter-bar .sat-filter-label,
.dark-theme .sat-filter-bar .sat-filter-suffix {
    color: #d1d5db !important;
    font-size: 0.75rem !important;
}

/* ── Container and table base ── */
.dark-theme .sat-datatables-container,
.dark-theme .sat-products-container {
    background: #111827 !important;
}

.dark-theme .sat-products-container .sat-products-table {
    background: #111827 !important;
    border: none !important;
}

/* ── Row backgrounds ── */
.dark-theme .sat-products-container .sat-products-table tbody tr {
    background: #1f2937 !important;
}

.dark-theme .sat-products-container .sat-products-table tbody tr:hover {
    background: #374151 !important;
}

/* ── Cell backgrounds and text ── */
.dark-theme .post-content .sat-products-container .sat-products-table td,
.dark-theme .entry-content .sat-products-container .sat-products-table td,
.dark-theme .sat-products-container .sat-products-table td {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #374151 !important;
    padding: 0.625rem 0.5rem !important;
    color: #d1d5db !important;
}

/* ── Header cells ── */
.dark-theme .post-content .sat-products-container .sat-products-table thead th,
.dark-theme .entry-content .sat-products-container .sat-products-table thead th,
.dark-theme .sat-products-container .sat-products-table thead th {
    background: #000F41 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0.625rem 0.5rem !important;
}

/* ── Price link colour in dark mode ── */
.dark-theme .sat-products-container .sat-price-link,
.dark-theme .sat-products-container .sat-col-price a {
    color: #34d399 !important;
}

/* ── Product name links ── */
.dark-theme .sat-products-container .sat-products-table .sat-col-product a,
.dark-theme .sat-products-container .sat-products-table .sat-title-link {
    color: #60a5fa !important;
}

/* ── Merchant links ── */
.dark-theme .sat-products-container .sat-products-table .sat-col-merchants a,
.dark-theme .sat-products-container .sat-merchant-link {
    color: #60a5fa !important;
}

/* ── No-rating / rating text colour ── */
.dark-theme .sat-products-container .sat-no-rating {
    color: #6b7280 !important;
}
