/**
* Theme Name:         suoma-wp
* Theme URI:          https://lmsomeco.fi/
* Author:             LM Someco
* Author URI:         https://lmsomeco.fi/
* Description:        suoma Block Theme
* Version:            1.0
* Requires at least:  7.0
* Tested up to:       7.0
* Requires PHP:       8.3
* License:            GNU General Public License v2 or later
* License URI:        http://www.gnu.org/licenses/gpl-2.0.html
* Text Domain:        suoma
* GitHub Theme URI:   https://github.com/lmandcreative/suoma-wp
* Primary Branch:     main
*/

/*
 * IMPORTANT: This file is only served on the frontend when `SCRIPT_DEBUG` is enabled;
 * in most instances, the `style.min.css` file will be served. It is not recommended that you
 * use the Theme File Editor to modify this stylesheet. Instead, add the necessary style
 * overrides via "Additional CSS" in the Site Editor.
 */

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.1em;
}

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

/* sticky header */
header.wp-block-template-part {
  position: sticky;
  z-index: 9999;
  top: 0;
}

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

.wp-block-navigation .wp-block-navigation-item a:hover {
  text-decoration: none;
}

.wp-block-navigation .wp-block-navigation-item {
  border-bottom: 2px solid transparent;
}

.wp-block-navigation .wp-block-navigation-item:hover,
.wp-block-navigation .wp-block-navigation-item.current-menu-item {
  border-bottom: 2px solid var(--wp--preset--color--blue);
}

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