/*
Theme Name: BrightOps
Author: Pixelbroeder - Olaf Nieuwland
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 8.3
Version: 25.12
Text Domain: brightops
/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}

/*
 * Prevents unnecessary scrollbars while handling long lines of preformatted text.
 * https://core.trac.wordpress.org/ticket/63875
 */
:where(pre) {
	overflow-x: auto;
}

/* Custom styles for BrightOps theme */
header {
	position: sticky;
	top: 0;
	z-index: 99;
	backdrop-filter: blur(2px);

	& .wp-block-navigation__responsive-container.is-menu-open {
		height: 100dvh;
	}
}

.wp-block-heading>strong {
	color: var(--wp--preset--color--groen-50);
	font-weight: inherit;
}

.wp-block-post-content>.wp-block-group .wp-block-group {
	z-index: 1;
	position: relative;
}

.wp-block-button>.wp-block-button__link.wp-element-button {
	transition: all .2s ease-out;

	&:hover {
		background: var(--wp--preset--color--base);
		border: 1px solid var(--wp--preset--color--base);
		color: var(--wp--preset--color--paars-60);
	}
}

.wp-block-post-content>.has-custom-bo-light-gradient-background+div:not(.has-custom-bo-light-gradient-background) {
	position: relative;

	&:before {
		content: "";
		position: absolute;
		left: 0;
		bottom: 1rem;

		width: min(560px, 50vw);
		height: auto;
		aspect-ratio: 560 / 812;
		background-image: url('assets/images/bulb-honeycomb.svg');
		background-size: contain;
		background-repeat: no-repeat;
		pointer-events: none;
	}

	&:after {
		content: "";
		position: absolute;
		right: 0;
		top: 0;
		transform: translateY(calc(-100% - 5rem));

		width: min(560px, 50vw);
		height: auto;
		aspect-ratio: 560 / 812;
		background-image: url('assets/images/bulb-honeycomb-right.svg');
		background-size: contain;
		background-repeat: no-repeat;
		pointer-events: none;
	}

	&:nth-child(2):after {
		display: none;
	}
}

@media only screen and (max-width: 600px) {

	header>.wp-block-group {
		& nav {
			width: 0;

			& button.wp-block-navigation__responsive-container-open>svg {
				width: 3rem;
				height: 3rem;
			}
		}
	}

}

@media only screen and (max-width: 782px) {

	header>.wp-block-group {
		justify-content: center;

		&>figure {
			max-width: calc(100% - 6rem);
		}
	}

	.wp-block-image[style*="margin-top:-"] {
		margin-top: 0 !important;
		text-align: center;

		& img {
			max-height: 40vh;
			width: auto;
			margin-inline: auto;
		}
	}

	.wp-block-image[style*="margin-bottom:-"] {
		margin-bottom: 0 !important;
		text-align: center;

		& img {
			max-height: 40vh;
			width: auto;
			margin-inline: auto;
		}
	}

	.wp-block-group.is-layout-flex>:is(.wp-block-heading, p) {
		flex-grow: 1;
	}
}

@media only screen and (max-width: 1024px) {
	header nav+div {
		display: none !important;
	}
}