/*
Theme Name: Starter Block Theme v4
Theme URI: https://jakson.co/
Author: https://jakson.co/
Author URI: https://jakson.co/
Description: A bare bones, blank canvas starter theme for building WordPress Block Themes using the Full Site Editor. It includes only the templates and essential settings you need to create sites fast!
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: starter-block-theme-v4
Tags: Block editor patterns, Block editor styles, Block themes, Template editing
*/

/*  Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Keep anchored sections clear of the top edge when jumping from the menu */
[id] {
  scroll-margin-top: 1.5rem;
}

/*  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 breakpoint of the Nav */
@media (min-width: 782px) {
  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 */

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

/* I've no idea why when you add a background color 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;
}

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

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

/* Keeps our titles link as the brand color in things like the query loop*/
.wp-block-post-title :where(a) {
  color: var(--wp--preset--color--primary);
}

/* Button hover transition - hover colours themselves live in theme.json */
.wp-block-button__link,
a {
  transition: 0.3s;
}

/* Header, main and footer sit flush - each section carries its own background */
.wp-site-blocks > * + * {
  margin-block-start: 0;
}

/* Cards: let a top image follow the card's rounded corners */
.is-style-card {
  overflow: hidden;
}

/* Contact Form 7 - no native controls exist for its fields */
.wpcf7-form p {
  margin: 0 0 1.25rem;
}

.wpcf7-form label {
  display: block;
  font-weight: 500;
  color: var(--wp--preset--color--primary);
}

.wpcf7-form input:not([type="submit"]),
.wpcf7-form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  font: inherit;
  color: var(--wp--preset--color--contrast);
  background: var(--wp--preset--color--base);
  border: 1px solid var(--wp--preset--color--base-2);
  border-radius: var(--wp--preset--border-radius--sm);
}

.wpcf7-form input:not([type="submit"])::placeholder,
.wpcf7-form textarea::placeholder {
  color: var(--wp--preset--color--contrast-2);
  opacity: 1;
}

.wpcf7-form input:not([type="submit"]):focus,
.wpcf7-form textarea:focus {
  outline: 2px solid var(--wp--preset--color--accent);
  outline-offset: 1px;
  border-color: var(--wp--preset--color--accent);
}

.wpcf7-form textarea {
  min-height: 9rem;
  resize: vertical;
}

.wpcf7-form .wpcf7-submit {
  cursor: pointer;
}

.wpcf7-form .wpcf7-spinner {
  vertical-align: middle;
}
