/*
Theme Name: Ridgemar
Author: Vasilis Papadopoulos
Author URI: mailto:vasilis@betapi.software
Description: A bespoke Wordpress theme for Ridgemar, based on Bruce design.
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: ridgemar
Tags: Block editor patterns, Block editor styles, Block themes, Template editing

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

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

/* Button hover state  - core button block still does not have this and it can't be done 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--theme-bright-orange);
  color: var(--wp--preset--color--theme-white);
}

/* Custom CSS */

.ribbon-link a {
  text-decoration: none;
  &:hover {
    color: var(--wp--preset--color--theme-bright-orange);
    text-decoration: none;
  }
}
footer a {
  text-decoration: none;
}
.img-w-bg {
  background-color: var(--wp--preset--color--theme-lighter-blue);
}

.tst-card {
  align-items: end;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}
.tst-card > * {
  grid-area: 1 / 1;
}
.tst-card-img {
  background-color: var(--wp--preset--color--theme-lighter-blue);
  width: 100%;
}
.tst-card h3 {
  color: var(--wp--preset--color--theme-dark-green);
  font-size: 2rem;
  font-weight: normal;
  margin-left: 12px;
  margin-bottom: 12px;
}
.tst-card-btn {
  bottom: 0;
  display: block;
  margin-bottom: 80px;
  position: relative;
  text-align: center;
}
.tst-card-btn a {
  height: auto;
  text-transform: uppercase;
  &:hover {
    background-color: var(--wp--preset--color--theme-bright-orange);
  }
}

.feature-image {
  align-items: end;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}
.feature-image > * {
  grid-area: 1 / 1;
}
.feature-image-caption {
  background-color: rgb(
    from var(--wp--preset--color--theme-navy-teal) r g b / 0.65
  );
  color: var(--wp--preset--color--theme-white);
  font-size: var(--wp--preset--font-size--xsmall);
  padding: 0.5rem;
  right: 0;
  top: 0;
  position: absolute;
  margin: 1rem;
}

.wp-block-navigation__container {
  align-items: stretch;
}
.wp-block-navigation__container .current-menu-item {
  color: var(--wp--preset--color--theme-orange);
  font-weight: bold;
}
.wp-block-navigation-item {
  border-left: 1px solid var(--wp--preset--color--theme-white);
  padding-block: 0.5rem;
  padding-left: 0.75rem;
  margin-left: 0.75rem;
  overflow-wrap: break-word;
  word-wrap: break-word; /* Legacy support for older browsers */
  flex-basis: fit-content;
  max-width: 8rem;
  &:first-child {
    border-left: none;
    padding-left: 0;
    margin-left: 0;
  }
  &:hover {
    color: var(--wp--preset--color--theme-bright-orange);
  }
}

/* Contact Form Styling */
#fluentform_1 .ff-el-group:not(:has(button)) {
  border: 1px solid var(--wp--preset--color--theme-navy-teal);
}
#fluentform_1 input,
#fluentform_1 textarea {
  border: none;
  border-radius: 0;
  color: var(--wp--preset--color--theme-navy-teal);
  font-size: 1.5rem;
  padding: 0.5rem;

  &::placeholder {
    color: var(--wp--preset--color--theme-light-grey);
  }
}
#fluentform_1 label {
  color: var(--wp--preset--color--theme-navy-teal);
  font-size: 0.8rem;
  margin: 0.25rem;
  margin-bottom: 0;
}
#fluentform_1 .ff-el-input--label {
  margin-bottom: 0;
}

/* Cookie Admin */
.cookieadmin-poweredby {
  display: none !important;
}
