/*
Theme Name: Polity Blocks
Theme URI: https://expotype.com
Author: expotype
Author URI: https://expotype.com
Description: 
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.4
Version: 2.0.39
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starter-block-theme-v2
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;
  }
}

.aligncenter {
    margin: 0 auto;
    text-align: center;
}
input.color-required::placeholder::first-letter
 {
	color: red;
}

.square-circle {
	width: 400px;
	height: 400px;
	border-radius: 50%;
}
.center-grid-items {
	margin: auto !important;
	justify-items: center;
}

h1:where(.wp-block-heading).has-background, h2:where(.wp-block-heading).has-background, h3:where(.wp-block-heading).has-background, h4:where(.wp-block-heading).has-background, h5:where(.wp-block-heading).has-background, h6:where(.wp-block-heading).has-background 
{
    padding: 1.0em;
}




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

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

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

/* 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.is-style-fill .wp-block-button__link:hover,
#commentform .form-submit.wp-block-button input:hover {
  background: var(--wp--preset--color--custom-white);
  color: var(--wp--preset--color--custom-off-black);
}

.wp-block-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--custom-custom-white);
  color: var(--wp--preset--color--off-black);
  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);
}
/*
a:hover:not(.wp-block-site-title a, .wp-block-button__link.wp-element-button) {
  text-decoration: underline !important;
}
  */

.wp-block-media-text>.wp-block-media-text__content {
max-width: calc(1280px /2);

}

.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__content  {
	margin-left: auto;
	padding-left: 8%;
	margin-right: 8%;
	margin-bottom: 2rem;
}
.wpcf7-form-control-wrap {
    display: flex;
}

.wpcf7-list-item {
    display: inline-block;
    margin: 0;
}

.wpcf7 form .wpcf7-response-output {
	background: var(--wp--preset--color--custom-3);
	border: 2px solid #cccccc;
}

input[type=email], input[type=number], input[type=password], input[type=search], input[type=tel], input[type=text], input[type=url], select, textarea {
 	font-family: inherit;
  	font-size: 1em;
	background: transparent;
	background: white;
  	border: 1px solid #333333;
  	border-radius: 1px;
  	padding: 0.5em;
 	margin-bottom: 1.5em;	
	width: 100%;
  	max-width: 100%;	
	color: #333333;
	display: flex;
	box-sizing: border-box;
	}

textarea {
	height: 120px;
}
input::placeholder, textarea::placeholder {
  color: #000000;
}

button, input[type=button], input[type=reset], input[type=submit] {

}

button, input[type=button], input[type=reset], input[type=submit] {

	background: #e3a15b;
  border-width: 0px;
  border: none;
  border-radius: 50px;
  padding: 0.75em 5.0em;
  width: auto;
  color: #ffffff;
  font-weight: normal;
  cursor: pointer;
	box-shadow: none;
	font-weight: bold;
}
button:hover, input[type=button]:hover, input[type=reset]:hover, input[type=submit]:hover { 
	background: #c3813b;
}

.flex-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
	column-gap: 1.0em;
	
}

 .flex-grid span {
	flex-basis: 48.75%;
}

.wp-block-buttons {
	margin-block-start: 2em;
	margin-block-end: 2em;
}

.wp-block-buttons>.wp-block-button {
    position: relative;
}
.wpcf7-spinner {
  position: absolute;
  top: 30%;
}
.wpcf7-not-valid-tip {
    position: relative;
    top: -1em;
}

.flex-grid-3-2 .wp-block-group {
	flex: 0 1 30%; 
 	min-width: 250px;
}


@media (max-width: 782px) {
	.flex-grid {
  		display: block;
	}
.flex-grid-3-2 .wp-block-group {
	flex: 0 1 100%; 
}	
}

.wp-block-media-text>.wp-block-media-text__content {
max-width: calc(1280px /2);
}

.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__content  {
	margin-left: auto;
	padding-left: 8%;
	margin-right: 8%;
	margin-bottom: 2rem;
}


@media (max-width: 999px) {
	/*
	.wp-block-media-text.is-stacked-on-mobile {
        grid-template-columns: 100% !important;
    }
	*/
	.wp-block-media-text>.wp-block-media-text__content {
		padding: 0 2rem;
		margin: initial;
	}
	.wp-block-media-text__media img, .wp-block-media-text__media video {
		margin-bottom: 1.0rem;
	}	
	.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__media {
		grid-column: 1;
		grid-row: 1;
	}
}
