/**
 * Theme Name: Hiacynta i Franciszek
 * Text Domain: hiacyntaifranciszek
 * Version: 0.015
 */


/* Change color and background color for selection */
::selection {
	background-color: var(--wp--preset--color--indigo-500);
	color: var(--wp--preset--color--white);
}

/* Add smooth scrolling to internal links (anchors) */
html {
	scroll-behavior: smooth;
}

/* Change numbers appearance in Playfair Display font */
body {
	font-variant-numeric: lining-nums;
}

/* Remove underline decoration from links in website logo wrapper */
.logo-wrapper {
	a {
		text-decoration: none;
	}
}

/* Change underline offset and color in links */
a:where(:not(.wp-element-button)) {
    text-underline-offset: 3px;
	text-decoration-color: hsl(from currentcolor h s l / 0.3)
}

/* Main navigation submenu appearance */

/* Move navigation to top of the stacking context */
.wp-block-navigation__container {
	z-index: 1;
}

/* Add perspective to navigation items that has submenu */
.wp-block-navigation-item.has-child {
	perspective: 1500px;
}

/* Change appearance of submenu */
.wp-block-navigation .wp-block-navigation__responsive-container-content .wp-block-navigation__container .wp-block-navigation-item.has-child .wp-block-navigation__submenu-container {
	min-width: 275px;
	box-shadow: 
		0px 51px 80px rgba(22, 26, 41, 0.0154121), 
		0px 15.375px 24.1177px rgba(22, 26, 41, 0.0270905), 
		0px 6.38599px 10.0172px rgba(22, 26, 41, 0.0409122), 
		0px 0.5px 3.62304px rgba(22, 26, 41, 0.07);
	border: none;
	padding: 12px;
	border-radius: 8px;
	width: auto;
	height: auto;
	top: calc(100% + 12px);
	left: 50%;
	overflow: visible;
	transform: translateX(-50%) rotateX(-40deg);
	transform-style: preserve-3d;
	transform-origin: 50% 0;
	transition: 140ms ease-in;
}

/* Add triangle to top of submenu container */
.wp-block-navigation__submenu-container::before {
    content: '';
    display: block;
    width: 16px;
    height: 16px;
    background-color: white;
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    z-index: 1;
    border-top-left-radius: 2px;
}

/* Add transparent element on top of submenu to ensure submenu won't close when you move your mouse from link to submenu container */
.wp-block-navigation__submenu-container::after {
	content: '';
	display: block;
	width: 100%;
	height: 12px;
	position: absolute;
	top: -12px;
	left: 0;
}

/* Show submenu on hover */
.wp-block-navigation .wp-block-navigation-item.has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container {
	transform: translate(-50%) rotateX(0);
	transition: 200ms ease-out;
}

/* Hover state animations */
[class*='hover-background-color-'] {
	transition: background-color 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-background-color-slate-50:hover {
	background-color: var(--wp--preset--color--slate-50);
}

.hover-background-color-indigo-50:hover {
	background-color: var(--wp--preset--color--indigo-50);
}

.hover-background-color-indigo-50-custom:hover {
	background-color: var(--wp--preset--color--indigo-50-custom);
}

.hover-background-color-slate-50-opacity-80:hover {
	background-color: var(--wp--preset--color--slate-50-opacity-80);
}

/* Utility classes */

.z-1 {
	z-index: 1;
}