/* 
 *
 * CUSTOM
 * Extra CSS that can't be conveniently/nicely added through WordPress itself
 *
 */

:root {
	--gradient-rotation: 135deg;
}
@property --gradient-rotation {
  syntax: '<angle>';
  inherits: false;
  initial-value: 135deg;
}

/* Smooth scrolling (mainly for anchor links) */
html { scroll-behavior: smooth; }

/* Check if user prefers reduced motion, if so, disable smooth scrolling */
@media screen and (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

/* Header */
.wp-site-blocks > header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 999;
}
.wp-site-blocks > header > div.wp-block-group {
	transition: background-color .3s, padding-top .3s, padding-bottom .3s;
}
.wp-site-blocks > header.scrolled:not(:hover) > div.wp-block-group  {
 	padding-top: clamp(0.5rem, 5vw, 1rem) !important;
    padding-bottom: clamp(0.5rem, 5vw, 1rem) !important;
}
.wp-site-blocks > header.scrolled > div.wp-block-group {
	background-color: rgb(250 250 250 / 80%) !important;
}
.wp-site-blocks > header:hover > div.wp-block-group {
    background-color: var(--wp--preset--color--base) !important;
}
@media (min-width: 601px) {
    body.admin-bar .wp-site-blocks > header {
        margin-top: var(--wp-admin--admin-bar--height);
    }
}

/* Footer */
body > .wp-site-blocks {
  min-height: 90vh; 
  margin:0;
  display:flex; 
  flex-direction:column;
}
body > .wp-site-blocks > main {
  flex:1;
}
body > .wp-site-blocks > footer {
  margin-block-start: 0;
}

/* Block spacing */
.wp-site-blocks {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}
.wp-site-blocks .wp-block-group {
	margin-top: 0;
}


/* Buttons */
.wp-element-button,
.wp-block-button .wp-block-button__link {
  	--gradient-rotation: 135deg;
  	background: linear-gradient(var(--gradient-rotation), mediumseagreen 0%, lightseagreen 100%) !important;
	transition: --gradient-rotation 1s, box-shadow .3s !important;
}
.wp-element-button:hover,
.wp-block-button .wp-block-button__link:hover,
.wp-element-button:active,
.wp-block-button .wp-block-button__link:active {
  	--gradient-rotation: 180deg;
}
div.wpforms-container-full input[type=submit]:focus:after, 
div.wpforms-container-full button[type=submit]:focus:after, 
div.wpforms-container-full .wpforms-page-button:focus:after {
 	content: none !important;
}
.wpforms-submit.wp-block-button__link::before {
	content: '\f1d8';
  	font: var(--fa-font-solid);
}

/* Break links to prevent page overflow */
.wp-block-post-content a:where(:not(.wp-element-button)) {
	word-break: break-all;
}


/* Comment fields */
.wp-block-post-comments-form p.comment-form-author,
.wp-block-post-comments-form p.comment-form-email,
.wp-block-post-comments-form p.comment-form-url,
.wp-block-post-comments-form p.comment-form-comment,
.wp-block-post-comments-form p.comment-form-cookies-consent,
.wp-block-post-comments-form p.form-submit {
	margin-top: 1em;
	font-weight: bold;
}
.wp-block-post-comments-form p.comment-form-cookies-consent,
.wp-block-post-comments-form p.form-submit {
	font-weight: normal;
}