/*
 * Page Builder Blocks: shared rules for every block. Breakpoints: phone < 600px,
 * tablet 600-1023px, desktop 1024px+. Tablet rules come after desktop and phone after tablet,
 * so a smaller screen's setting wins. Values come from the theme's tokens, with fallbacks.
 */

/* ---------- Text alignment ---------- */
.pbb-align-d-left { text-align: left; }
.pbb-align-d-center { text-align: center; }
.pbb-align-d-right { text-align: right; }
@media (max-width: 1023px) {
	.pbb-align-t-left { text-align: left; }
	.pbb-align-t-center { text-align: center; }
	.pbb-align-t-right { text-align: right; }
}
@media (max-width: 599px) {
	.pbb-align-p-left { text-align: left; }
	.pbb-align-p-center { text-align: center; }
	.pbb-align-p-right { text-align: right; }
}

/* ---------- Text sizes ---------- */
.pbb-size-d-s { font-size: var(--wp--preset--font-size--small, 0.875rem); }
.pbb-size-d-m { font-size: var(--wp--preset--font-size--medium, 1.0625rem); }
.pbb-size-d-l { font-size: var(--wp--preset--font-size--large, 1.25rem); }
.pbb-size-d-xl { font-size: var(--wp--preset--font-size--x-large, 1.75rem); }
.pbb-size-d-xxl { font-size: var(--wp--preset--font-size--xx-large, 2.5rem); }
.pbb-size-d-xxxl { font-size: var(--wp--preset--font-size--xxx-large, 3.5rem); }
@media (max-width: 1023px) {
	.pbb-size-t-s { font-size: var(--wp--preset--font-size--small, 0.875rem); }
	.pbb-size-t-m { font-size: var(--wp--preset--font-size--medium, 1.0625rem); }
	.pbb-size-t-l { font-size: var(--wp--preset--font-size--large, 1.25rem); }
	.pbb-size-t-xl { font-size: var(--wp--preset--font-size--x-large, 1.75rem); }
	.pbb-size-t-xxl { font-size: var(--wp--preset--font-size--xx-large, 2.5rem); }
	.pbb-size-t-xxxl { font-size: var(--wp--preset--font-size--xxx-large, 3.5rem); }
}
@media (max-width: 599px) {
	.pbb-size-p-s { font-size: var(--wp--preset--font-size--small, 0.875rem); }
	.pbb-size-p-m { font-size: var(--wp--preset--font-size--medium, 1.0625rem); }
	.pbb-size-p-l { font-size: var(--wp--preset--font-size--large, 1.25rem); }
	.pbb-size-p-xl { font-size: var(--wp--preset--font-size--x-large, 1.75rem); }
	.pbb-size-p-xxl { font-size: var(--wp--preset--font-size--xx-large, 2.5rem); }
	.pbb-size-p-xxxl { font-size: var(--wp--preset--font-size--xxx-large, 3.5rem); }
}

/* ---------- Text colours (from the palette) ---------- */
.pbb-color-primary { color: var(--wp--preset--color--primary, #1d4ed8); }
.pbb-color-contrast-2 { color: var(--wp--preset--color--contrast-2, #4b5563); }
.pbb-color-accent { color: var(--wp--preset--color--accent, #f59e0b); }
.pbb-color-base { color: var(--wp--preset--color--base, #fff); }

/* ---------- Show / hide per device ---------- */
/* On the site the block is gone; in the editor it stays, faded, so it can still be edited. */
@media (min-width: 1024px) {
	body:not(.editor-styles-wrapper) .pbb-hide-d { display: none !important; }
	.editor-styles-wrapper .pbb-hide-d { opacity: 0.35; }
}
@media (min-width: 600px) and (max-width: 1023px) {
	body:not(.editor-styles-wrapper) .pbb-hide-t { display: none !important; }
	.editor-styles-wrapper .pbb-hide-t { opacity: 0.35; }
}
@media (max-width: 599px) {
	body:not(.editor-styles-wrapper) .pbb-hide-p { display: none !important; }
	.editor-styles-wrapper .pbb-hide-p { opacity: 0.35; }
}
