/**
 * Shared base for all isolated UI pages (dashboard, login, checkout, etc.).
 * Theme styles are stripped; this provides minimal cross-page normalization.
 */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	margin: 0 !important;
	padding: 0 !important;
}

html.rd-isolated-ui,
html:has(body.rd-dashboard-body),
html:has(body.rd-isolated-ui) {
	margin: 0 !important;
	padding: 0 !important;
}

body.rd-isolated-ui {
	margin: 0;
	padding: 0;
	min-height: 100vh;
	width: 100%;
	max-width: none;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/*
 * WoodMart (and similar themes) set body width / max-width via theme classes
 * (e.g. wrapper-full-width) and inline customizer CSS. Force full viewport width.
 */
html body.rd-isolated-ui.rd-dashboard-body,
html body.rd-isolated-ui.rd-dashboard-body.wrapper-full-width,
html body.rd-isolated-ui.rd-dashboard-body.wrapper-boxed,
html body.rd-isolated-ui.rd-dashboard-body.wp-theme-woodmart {
	width: 100% !important;
	max-width: none !important;
	min-width: 0 !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
}

html body.rd-isolated-ui.rd-dashboard-body .rd-layout,
html body.rd-isolated-ui.rd-dashboard-body .rd-main,
html body.rd-isolated-ui.rd-dashboard-body .rd-content {
	width: 100% !important;
	max-width: none !important;
	box-sizing: border-box;
}

/* WoodMart outer wrappers when injected by theme hooks */
html body.rd-isolated-ui.rd-dashboard-body .website-wrapper,
html body.rd-isolated-ui.rd-dashboard-body .main-page-wrapper,
html body.rd-isolated-ui.rd-dashboard-body .wd-page-content {
	width: 100% !important;
	max-width: none !important;
	min-height: 100vh;
	box-sizing: border-box;
}

/* Prevent theme form/button globals from breaking plugin UI (WoodMart, etc.). */
body.rd-isolated-ui input:not([type='checkbox']):not([type='radio']),
body.rd-isolated-ui textarea,
body.rd-isolated-ui select {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
}

body.rd-isolated-ui button {
	font-family: inherit;
}

/* WoodMart mobile bottom toolbar and similar theme chrome */
body.rd-isolated-ui .wd-toolbar,
body.rd-isolated-ui .woodmart-toolbar,
body.rd-isolated-ui .wd-sticky-toolbar,
body.rd-isolated-ui .wd-sticky-nav,
body.rd-isolated-ui .mobile-nav,
body.rd-isolated-ui .wd-cookies-popup {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Theme headers / footers injected outside the dashboard layout */
body.rd-isolated-ui #masthead,
body.rd-isolated-ui .whb-header,
body.rd-isolated-ui .wd-header,
body.rd-isolated-ui .woodmart-header,
body.rd-isolated-ui > .site-header,
body.rd-isolated-ui header.site-header,
body.rd-isolated-ui footer.footer-container,
body.rd-isolated-ui .wd-footer,
body.rd-isolated-ui .woodmart-prefooter,
body.rd-isolated-ui .woodmart-footer {
	display: none !important;
	visibility: hidden !important;
	pointer-events: none !important;
	height: 0 !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}
