/*
Theme Name: EF Dev
Theme URI:
Author: EF
Author URI:
Description: Custom FSE theme for DeciMAL based on Blank theme V2 https://jakson.co/
Requires at least: 6.7
Tested up to: 6.7
Requires PHP: 7.4
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ef-theme
Tags: Block Editor Patterns, Site Editor



/*  Smoot Scroll */



html {
  scroll-behavior: smooth;
}

/*  Reduced motion prefs  */
@media screen and (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/*  Navigation Block Breakpoint. Credit: https://wpdocs.io/ */
body .wp-block-navigation__responsive-container-open:not(.always-shown) {
  display: block !important;
}

body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: none !important;
}

/* Change the width to the breakpoit of the Nav */
@media (min-width: 799px) {
  body .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  body .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
  }
}

/* end nav break point */

:where(.wp-block-navigation.has-background .wp-block-navigation-item a:not(.wp-element-button)){
    padding:0;
}

.nav-secondaire .alt-site a{
  background: var(--wp--preset--color--custom-pale-green);
  border-radius:4px;
  color:#000;
  font-weight:700;
  line-height:1em;
  padding:3px 6px;
  margin-left:0.8em;
  transition:background 250ms;
  text-transform:none;
  color:black !important;
}

.crc .nav-secondaire .alt-site a{
  background: var(--wp--preset--color--custom-pale-blue);
    line-height:1.2em;
}
.nav-secondaire .alt-site a:hover{
  background: var(--wp--preset--color--custom-red);
}


:root .crc-template-default .main-navigation{
  --wp--preset--color--custom-pale-blue: var(--wp--preset--color--custom-pale-green);
}

/* Nicley wrapped headlines */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* I've no idea why when you add a backgroud colour to a column, WP by default adds padding to it... so weird - this get's rid of that */
:where(.wp-block-columns.has-background) {
  padding: initial;
}



/* :root :where(p){
  line-height:inherit;
} */

/*  pagination */

.wp-block-query-pagination .page-numbers,
.wp-block-query-pagination .wp-block-query-pagination-next,
.wp-block-query-pagination .wp-block-query-pagination-previous
{
	text-align:center;
	display:inline-block;
	padding:6px 18px;
	transition: background-color 250ms ;
	background:#fff;
	border-radius:15px;
	font-size:.96rem;
	font-weight:700;
	line-height:1em;
	margin:0.3em;
  background:#eee;
  text-decoration: none;
}

.wp-block-query-pagination .page-numbers:hover,
.wp-block-query-pagination .wp-block-query-pagination-next:hover,
.wp-block-query-pagination .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination .page-numbers.current
{
	background-color:#111;
	border-color:#111;
	color:#fff;
	text-decoration:none !important;
}

.wp-block-query-pagination .page-numbers.dots:hover{
		background:#fff;
		color:#111;
		border-color:var(--wp--preset--color--primary);
}

.wp-block-query-pagination .is-arrow-arrow{
	margin:0;
}


.wp-block-query-pagination.sombre .page-numbers,
.wp-block-query-pagination.sombre .wp-block-query-pagination-next,
.wp-block-query-pagination.sombre .wp-block-query-pagination-previous
{
	background:#111;
	color: #bbb;
}
.wp-block-query-pagination.sombre .page-numbers:hover,
.wp-block-query-pagination.sombre .wp-block-query-pagination-next:hover,
.wp-block-query-pagination.sombre .wp-block-query-pagination-previous:hover,
.wp-block-query-pagination.sombre .page-numbers.current
{
	background-color:#aaa;
	border-color:#111;
	color:#111;
}
.wp-block-query-pagination.sombre .page-numbers.dots:hover{
		background:#111;
		color: #bbb;
}




.wp-block-navigation-item__content{
  transition:color 260ms;
}


/* Pull Quote */
.wp-block-pullquote blockquote {
  display: grid;
  gap: 20px;
}

.wp-block-pullquote cite {
  font-size: 80%;
  font-weight: 600;
}

/* Search Block */
.wp-block-search__input {
  border: 1px solid;
}

.wp-block-search__button {
  box-shadow: none;
  border: 1px solid var(--wp--preset--color--custom-off-black);
  border-radius: 0;
  color: white;
  padding: 0.4rem 1rem 0.5rem 1rem;
  font-weight: 500;
}

/* Comments */
.comment-form-cookies-consent {
  font-size: 14px;
  line-height: 2;
}

/* Keep our titles link the off black color*/
.wp-block-post-title :where(a) {
  color: var(--wp--preset--color--custom-off-black);
}

.wp-block-post-featured-image{
  text-align:center;
}
.wp-block-post-featured-image :where(img){
  width:auto !important;
  max-height:450px;
}


/* Button hover state  - core button block still does not have this and I can't figure out how to do it in theme.json! */
.wp-block-button__link,
a {
  transition: 0.3s;
}



.wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-pale-green);
  border-color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-off-black);
  color: var(--wp--preset--color--custom-white);
  border-color: var(--wp--preset--color--custom-off-black);
}
