/* Dental Bridge — dark-mode coverage for plugin UI (WooCommerce blocks, Tutor, BuddyPress).
   The core theme already recolors via design tokens; this handles plugin surfaces that
   hardcode light backgrounds/text. Scoped to :root[data-theme="dark"]. */

/* ============================ Tutor LMS ============================ */
:root[data-theme="dark"] {
	--tutor-body-bg: var(--bg);
	--tutor-fontColor: var(--text);
	--tutor-color-black: var(--ink);
	--tutor-color-secondary: var(--text);
	--tutor-color-muted: var(--muted);
	--tutor-color-subdued: var(--muted);
	--tutor-color-hints: var(--muted);
	--tutor-border-color: var(--border);
	--tutor-surface: var(--surface);
}
:root[data-theme="dark"] .tutor-frontend-dashboard,
:root[data-theme="dark"] .tutor-wrap,
:root[data-theme="dark"] .tutor-course-details-page,
:root[data-theme="dark"] .tutor-learning-area { background: var(--bg); color: var(--text); }

:root[data-theme="dark"] .tutor-card,
:root[data-theme="dark"] .tutor-course-card,
:root[data-theme="dark"] .tutor-dashboard-menu,
:root[data-theme="dark"] .tutor-dashboard .tutor-dashboard-content-inner,
:root[data-theme="dark"] .tutor-lesson-content,
:root[data-theme="dark"] .tutor-quiz-wrapper,
:root[data-theme="dark"] .tutor-learning-sidebar,
:root[data-theme="dark"] .tutor-learning-area-content,
:root[data-theme="dark"] .tutor-learning-area-container,
:root[data-theme="dark"] [class*="tutor-card"] {
	background-color: var(--surface);
	border-color: var(--border);
	color: var(--text);
}
:root[data-theme="dark"] .tutor-course-name a,
:root[data-theme="dark"] .tutor-course-details-title,
:root[data-theme="dark"] .tutor-lesson-content h1,
:root[data-theme="dark"] .tutor-lesson-content h2,
:root[data-theme="dark"] .tutor-lesson-content h3,
:root[data-theme="dark"] .tutor-dashboard-content-inner h1,
:root[data-theme="dark"] .tutor-dashboard-content-inner h2,
:root[data-theme="dark"] .tutor-dashboard-content-inner h3 { color: var(--ink); }

:root[data-theme="dark"] .tutor-form-control,
:root[data-theme="dark"] .tutor-input-group input,
:root[data-theme="dark"] .tutor-dashboard input,
:root[data-theme="dark"] .tutor-dashboard select,
:root[data-theme="dark"] .tutor-dashboard textarea {
	background: var(--bg-alt); color: var(--text); border-color: var(--border);
}
:root[data-theme="dark"] .tutor-lesson-content .db-lesson-body blockquote {
	background: var(--bg-alt); border-color: var(--accent);
}

/* ==================== WooCommerce block cart / checkout ==================== */
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-sidebar,
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-checkout-step,
:root[data-theme="dark"] .woo-blockwrap .wc-block-cart-items,
:root[data-theme="dark"] .woo-blockwrap .wc-block-cart-items__header,
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-panel {
	background-color: var(--surface) !important;
	border-color: var(--border) !important;
	color: var(--text);
}
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-text-input input,
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-address-form input,
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-quantity-selector input {
	background: var(--bg-alt) !important; color: var(--text) !important;
}
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-product-name,
:root[data-theme="dark"] .woo-blockwrap .wc-block-components-totals-item__value { color: var(--ink); }

/* classic WooCommerce (account, orders, addresses, single product) */
:root[data-theme="dark"] .woocommerce table.shop_table,
:root[data-theme="dark"] .woocommerce-Address,
:root[data-theme="dark"] .db-acct .card,
:root[data-theme="dark"] .db-single .db-specs .spec,
:root[data-theme="dark"] .woocommerce .cart_totals,
:root[data-theme="dark"] .woocommerce-checkout #order_review {
	background: var(--surface); border-color: var(--border); color: var(--text);
}
:root[data-theme="dark"] .woocommerce-orders-table thead th,
:root[data-theme="dark"] .woocommerce-table--order-details th { background: var(--bg-alt); }
:root[data-theme="dark"] .woocommerce-info,
:root[data-theme="dark"] .woocommerce-message { background: var(--bg-alt); color: var(--text); }
:root[data-theme="dark"] .woocommerce form .form-row input.input-text,
:root[data-theme="dark"] .woocommerce form .form-row textarea,
:root[data-theme="dark"] .select2-container .select2-selection {
	background: var(--bg-alt); color: var(--text); border-color: var(--border);
}

/* ============================ BuddyPress ============================ */
:root[data-theme="dark"] .buddypress-wrap input[type="text"],
:root[data-theme="dark"] .buddypress-wrap input[type="search"],
:root[data-theme="dark"] .buddypress-wrap input[type="email"],
:root[data-theme="dark"] .buddypress-wrap textarea,
:root[data-theme="dark"] .buddypress-wrap select,
:root[data-theme="dark"] .db-composer textarea {
	background: var(--bg-alt); color: var(--text); border-color: var(--border);
}
:root[data-theme="dark"] .buddypress-wrap .bp-tabs-wrap,
:root[data-theme="dark"] .buddypress-wrap table,
:root[data-theme="dark"] .buddypress-wrap .bp-messages-content { background: var(--surface); color: var(--text); }
:root[data-theme="dark"] .buddypress-wrap .activity-list .load-more,
:root[data-theme="dark"] .buddypress-wrap .pag-count { color: var(--muted); }

/* rtMedia uploader popovers */
:root[data-theme="dark"] .rtmedia-container, :root[data-theme="dark"] .rtmedia-uploader-div {
	background: var(--surface); color: var(--text); border-color: var(--border);
}

/* Contact Form 7 fields already use tokens; ensure the container is dark */
:root[data-theme="dark"] .wpcf7-form input,
:root[data-theme="dark"] .wpcf7-form textarea,
:root[data-theme="dark"] .wpcf7-form select { background: var(--bg-alt); color: var(--text); }
