/*
Theme Name: Proud Nerds Store
Theme URI: https://www.proudnerds.com/store
Template: storefront
Author: Proud Nerds
Author URI: https://www.proudnerds.com
Description: A custom WordPress theme for the Proud Nerds online store.
Version: 1.0.0
Text Domain: proudnerds
*/

/*
 * 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;
}

/*
 * Site container max-width
 * Limit the maximum width of the site container for better readability
 */
.site-content,
.storefront-primary-navigation,
.col-full {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

/* Ensure Gutenberg blocks respect the container width */
.wp-site-blocks {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
	box-sizing: border-box;
}

/* Limit alignwide blocks to container width */
.alignwide {
	max-width: 1200px !important;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Reset padding for full-width blocks */
.wp-block-group.alignfull,
.wp-block-cover.alignfull {
	margin-left: calc(-1 * var(--wp--style--root--padding-left, 1rem));
	margin-right: calc(-1 * var(--wp--style--root--padding-right, 1rem));
	width: auto;
}
