/*
Theme Name: North Lincs Logs
Theme URI:
Author:
Author URI:
Description: A bespoke block theme for NLL. Based on Kiosko by WooCommerce
Requires at least: 6.9
Tested up to: 6.9
Requires PHP: 5.7
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: north-lincs-logs
Tags: e-commerce, four-columns, wide-blocks, block-patterns, block-styles, featured-images, full-site-editing, rtl-language-support, sticky-post, template-editing, threaded-comments, translation-ready

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */

/*
 * Control the hover stylings of outline block style.
 * Unnecessary once block styles are configurable via theme.json
 * https://github.com/WordPress/gutenberg/issues/42794
 */
.wp-block-button.is-style-outline
  > .wp-block-button__link:not(.has-background):hover {
  background-color: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  border-color: var(--wp--preset--color--contrast);
}

:root {
  interpolate-size: allow-keywords;
  --sidebarWidth: 80dvw;
}

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
  text-decoration-color: var(--wp--preset--color--primary);
  text-decoration-thickness: 0.5px !important;
  text-underline-offset: 0.05em;
}

/* Reset browser default margins for blockquote element */
.wp-block-pullquote blockquote {
  margin: 0;
}

/* Search button inside style */
.wp-block-search__button-inside .wp-block-search__inside-wrapper {
  padding: 4px;
}

/* Adjust font size for comment reply title */
.wp-block-post-comments-form .comment-reply-title {
  font-size: var(--wp--preset--font-size--large);
}

/* Remove the bottom margin from the button */
.wp-block-post-comments-form .form-submit {
  margin-bottom: 0;
}

/*
 * Responsive menu container padding.
 * This ensures the responsive container inherits the same
 * spacing defined above. This behavior may be built into
 * the Block Editor in the future.
 */
.wp-block-navigation__responsive-container.is-menu-open {
  padding: var(--wp--preset--spacing--50);
}

/* Adjust the top padding for the submenu items */
.wp-block-navigation__responsive-container.is-menu-open
  .wp-block-navigation__responsive-container-content
  .wp-block-navigation__submenu-container {
  padding-top: var(--wp--preset--spacing--30);
}

/* Override the Gutenberg style to theme style */
.wp-block-post-author__byline,
.wp-block-post-author__bio {
  font-size: inherit;
}

/* Round the avatar and reset the vertical alignment */
.wp-block-post-author__avatar img {
  border-radius: 999px;
  line-height: 0;
}

/* Style tag cloud outline style  */
.wp-block-tag-cloud.is-style-outline a {
  border-color: var(--wp--preset--color--tertiary);
  border-radius: 999px;
  padding: 0 0.5rem;
}

.wp-block-tag-cloud.is-style-outline a:hover {
  color: var(--wp--preset--color--base);
  background-color: var(--wp--preset--color--primary);
}

/* Remove the default margin from author bio */
.wp-block-post-author__bio {
  margin: 0;
}

/* Remove the default margin from term description. */
.wp-block-term-description p:first-child {
  margin-top: 0;
}

.wp-block-term-description p:last-child {
  margin-bottom: 0;
}

/* Normalise font sizes for the latest comments and latest posts widgets */
.wp-block-latest-comments__comment-excerpt p,
.wp-block-latest-comments__comment-date,
.wp-block-latest-posts__post-author,
.wp-block-latest-posts__post-date {
  font-size: inherit;
}

/* Adjust font colour in the Calendar widget */
.wp-block-calendar table:where(:not(.has-text-color)) {
  color: var(--wp--preset--color--foreground);
}

/* Fix border radius setting for the avatar block */
.wp-block-avatar a,
.wp-block-avatar img {
  border-radius: inherit;
  vertical-align: middle;
}

/* Fix line height for various fields */
.wp-block-search__input,
.wp-block-post-comments-form
  .comment-form
  input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form .comment-form textarea {
  line-height: inherit;
}

/* Style  border colour for search and Jetpack subscription blocks */
.wp-block-search__input,
.wp-block-search__button-inside .wp-block-search__inside-wrapper,
.wp-block-jetpack-subscriptions.wp-block-jetpack-subscriptions__supports-newline
  form
  input[type="email"] {
  border-color: var(--wp--preset--color--tertiary);
}

/* Needed to style input field for various Jetpack blocks */
.wp-block-jetpack-contact-form
  input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea,
.wp-block-jetpack-mailchimp input:not([type="submit"]):not([type="checkbox"]),
.wp-block-jetpack-revue input:not([type="submit"]):not([type="checkbox"]) {
  background-color: #fff;
  border: 1px solid var(--wp--preset--color--tertiary);
  font-size: inherit;
  line-height: inherit;
  padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form label {
  font-weight: 400;
}

.wp-block-jetpack-contact-form.contact-form label span {
  opacity: 0.7;
}

.wp-block-jetpack-contact-form.contact-form select {
  padding: 0.5rem;
}

.wp-block-jetpack-contact-form.contact-form textarea {
  margin-bottom: var(--wp--preset--spacing--40);
}

/* Style the feedback you get after submitting the contact form */
div[id^="contact-form-"] h4 {
  font-size: var(--wp--preset--font-size--medium);
  font-weight: inherit;
  line-height: 1.555555556;
}

div[id^="contact-form-"] .contact-form-submission {
  margin: 0;
  padding: 0;
}

/* Adjust vertical margins in the mailchimp block */
.wp-block-jetpack-mailchimp .wp-block-jetpack-button,
.wp-block-jetpack-mailchimp p {
  margin: var(--wp--preset--spacing--40) 0;
}

/* Adjust the size of the consent text in mailchimp block */
#wp-block-jetpack-mailchimp_consent-text {
  font-size: var(--wp--preset--font-size--small);
  margin-bottom: 0;
}

/* Remove underline from the price after discounted */
ins {
  text-decoration: none;
}

/* Fix the hardcoded wide width value in the stylesheet for TT3 */
.woocommerce.woocommerce-page main {
  max-width: calc(
    var(--wp--style--global--wide-size) + var(--wp--style--root--padding-right) +
      var(--wp--style--root--padding-left)
  );
}

.wp-block-button:hover,
.icon:hover,
.wp-block-cover .wp-block-button__link:hover {
  transition: transform 0.2s;
  transform: scale(1.05);
  cursor: pointer;
}

.wp-block-button.is-style-outline a:hover {
  background: none !important;
  color: inherit !important;
  border-color: inherit !important;
}

/* Header */

header {
  position: relative;
  z-index: 5;
}

.wc-block-mini-cart__quantity-badge {
  display: none !important;
}

.wp-block-social-links .wp-social-link svg {
  width: 1.35em;
  height: 1.35em;
}

/* Why Us

.why-us{
 width: -webkit-fill-available;
}

.why-us>.wp-block-group{
 box-shadow: 6px 6px 9px rgba(0, 0, 0, 0.05) !important;
}*/

/* Accordion */

.home .wp-block-accordion-item {
  padding: 1.3em 0;
}

.wp-block-accordion-item {
  padding: 1em 0;
}

.wp-block-accordion-heading__toggle-icon {
  color: var(--wp--preset--color--custom-green);
}

/* Instagram Feed */

.ti-widget[data-wkey="feed-instagram"]
  .ti-layout-container
  .ti-widget-layout
  .ti-layout-item {
  aspect-ratio: 1;
}

.instagram-feed .wp-block-button svg {
  width: 0.9em;
  height: auto;
  fill: var(--wp--preset--color--custom-green);
  vertical-align: bottom;
}

footer.ti-widget-footer {
  display: none !important;
}

.home footer {
  margin-block-start: 0;
}

.wp-block-heading a {
  text-decoration: none;
}

/* Category Page */

.archive nav.woocommerce-breadcrumb {
  text-align: center;
}

select.orderby {
  font-family: var(--wp--preset--font-family--dm-serif-display);
  font-weight: 300;
  padding: 0.5em;
  border-radius: 0;
  border: none;
  background: var(--wp--preset--color--custom-light-green);
  color: var(--wp--preset--color--custom-mid-green);
}

.woocommerce-result-count {
  font-weight: 300;
}

/* Product Page */

.wc-block-grid__product-rating
  .wc-block-grid__product-rating__stars
  span:before {
  color: var(--wp--preset--color--luminous-vivid-amber);
}

a.woocommerce-review-link {
  font-weight: 300;
  font-size: 0.8em;
  padding-top: 1.5em;
}

.single_add_to_cart_button {
  border-radius: 0;
  padding: 1.2rem 1.75rem !important;
}

.quantity.wc-block-components-quantity-selector {
  border: none !important;
}

.wc-block-components-quantity-selector
  > .wc-block-components-quantity-selector__button--minus,
.wc-block-components-quantity-selector
  > .wc-block-components-quantity-selector__button--plus {
  background-color: #eee;
}

div.wc-block-add-to-cart-form.wc-block-add-to-cart-form--stepper
  .wc-block-components-quantity-selector
  input[type="number"].input-text.qty.text {
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  font-family: var(--wp--preset--font-family--nunito);
}

.single-product .wp-block-accordion-item {
  padding: 0.75em 0;
}

.wc-block-review-sort-select {
  display: none;
}

ul.wc-block-review-list {
  padding: 0.5em 0 0 0;
  height: 325px;
  overflow-y: scroll;
  overflow-x: none !important;
}

ul.wc-block-review-list li {
  box-shadow: 1px 4px 10px 0px rgba(0, 0, 0, 0.1),
    0px 0px 2px 0px rgba(0, 0, 0, 0.05);
  background-color: white !important;
  backdrop-filter: blur(0px);
  border-radius: 12px !important;
  padding: 20px 20px 10px 20px !important;
  margin: 0 8px;
  font-size: var(--wp--preset--font-size--medium) !important;
  margin-bottom: 1em;
}

.wc-block-review-list-item__published-date {
  margin-top: 0.4em;
  font-weight: 300;
  font-size: 0.8em;
}

.wc-block-components-review-list-item__info {
  margin-bottom: 0.75em;
}

.wc-block-review-list-item__text p {
  margin: 0 0 0.5em 0;
  line-height: 1.1;
}

.video-wrapper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.video-wrapper iframe {
  width: 100vw;
  height: 56.25vw; /* Given a 16:9 aspect ratio, 9/16*100 = 56.25 */
  min-height: 100vh;
  min-width: 177.77vh; /* Given a 16:9 aspect ratio, 16/9*100 = 177.77 */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.wp-block-cb-carousel-v2 .cb-button-next {
  right: -50px !important;
}

.wp-block-cb-carousel-v2 .cb-button-prev {
  left: -50px !important;
}

.wp-block-cb-carousel-v2 .cb-button-next:after,
.wp-block-cb-carousel-v2 .cb-button-prev:after {
  font-size: 0.9em !important;
}

/* Contact Page */

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: -webkit-fill-available;
  font-family: var(--wp--preset--font-family--nunito);
  font-size: 1.1rem;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 1em;
  padding: 1em;
  border: 1px solid var(--wp--preset--color--custom-light-green);
  color: var(--wp--preset--color--primary);
  font-weight: 200;
}

.wpcf7-form input::placeholder,
.wpcf7-form textarea::placeholder {
  color: var(--wp--preset--color--primary);
}

.wpcf7-form input:focus-visible,
.wpcf7-form textarea:focus-visible {
  outline-color: var(--wp--preset--color--custom-mid-green);
}

.wpcf7-form .wpcf7-list-item {
  margin: 0 0;
}

.wpcf7-form input[type="checkbox"] {
  margin: 0 0.5em 0 0;
}

.wpcf7-form .wpcf7-list-item-label {
  font-size: 0.8em;
}

.wpcf7-form input[type="submit"] {
  padding: 0.85em 1.75rem;
  background-color: var(--wp--preset--color--custom-mid-green);
  color: var(--wp--preset--color--base);
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--wp--preset--font-family--nunito);
}

/* Store Notice */

.woocommerce-notices-wrapper:focus-visible,
.wc-block-components-notice-banner.is-success:focus-visible {
  outline: none !important;
}

.wc-block-components-notice-banner.is-success {
  background-color: var(--wp--preset--color--custom-light-green) !important;
  border: none !important;
}

.wc-block-components-notice-banner.is-success > svg {
  background-color: #85b54c;
}

.wc-block-components-notice-banner > svg {
  width: 20px;
  height: 20px;
}

.wc-block-components-notice-banner__content {
  font-weight: 200;
  color: var(--wp--preset--color--primary);
}

.wc-block-components-notice-banner
  > .wc-block-components-notice-banner__content
  .wc-forward {
  color: var(--wp--preset--color--custom-dark-green) !important;
  padding-top: 0.3em !important;
}

.custom-button-wrap {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
  position: relative;
  height: 100%;
}

.custom-button-wrap:after {
  content: "";
  display: block;
  position: absolute;
  /*background-color: #fff;*/
  height: 100%;
  width: 100%;
  border-radius: 99rem 0 0 99rem;
  inset: 0;
  z-index: 2;
}

.custom-button-wrap > span {
  flex: 1 0 auto;
  padding: calc(0.667em + 2px) calc(1.334rem + 2px);
}

.custom-button-wrap .icon {
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 99rem;
  background-color: var(--wp--preset--color--custom-mid-green);
  width: auto;
  padding: 0;
  aspect-ratio: 1/1;
  z-index: 3;
  position: relative;
}

.custom-button-wrap .icon svg {
  height: 1.5rem;
  width: 1.5rem;
  fill: currentColor;
}

.custom-button-wrap span.text {
  background-color: #417d62;
  padding: calc(0.667em + 2px) calc(1.334rem + 2px);
  position: absolute;
  z-index: 1;
  transition: all 0.25s linear;
  left: 100%;
  right: -250px;
  width: 9rem;
  align-self: center;
  corner-shape: squircle;
  border-radius: 99rem 0 0 99rem;
}

button.wp-block-button__link.add_to_cart_button {
  overflow: visible !important;
}

@media (min-width: 1000px) {
  /*
  *	Over-ride grid behaviour on mobile only.
  */
  li div[data-block-name="woocommerce/product-image"] + .is-layout-grid {
    gap: 0;
    grid-template-columns: repeat(3, 1fr);
    max-width: 100%;
    box-sizing: content-box;
  }

  li
    div[data-block-name="woocommerce/product-image"]
    + .is-layout-grid
    > .wp-block-group {
    grid-column: span 2;
  }

  body
    button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap) {
    height: 40px;
    width: 40px;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  .wc-block-product-template.is-flex-container.is-flex-container.columns-3
    > li {
    width: calc(50% - 1em) !important;
  }

  .wc-block-product-template.is-flex-container.is-flex-container.columns-3
    > li
    > .wp-block-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .wc-block-product-template.is-flex-container.is-flex-container.columns-3
    > li
    > .wp-block-group
    .custom-button-wrap
    span.text,
  .product-info .custom-button-wrap span.text {
    border-radius: 99rem !important;
  }

  .green-full-width figure img {
    height: 100%;
  }

  .green-full-width > .wp-block-group {
    padding-top: var(--wp--preset--spacing--60);
    padding-bottom: var(--wp--preset--spacing--60);
  }

  .wp-block-cb-carousel-v2 .cb-button-next {
    right: 0 !important;
  }

  .custom-button-wrap span.text {
    left: 10px;
  }

  .product-info {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
}

@media (max-width: 992px) {
  /*
  *	Over-ride grid behaviour on mobile only.
  */
  li div[data-block-name="woocommerce/product-image"] + .is-layout-grid {
    display: flex;
    flex-direction: column;
    gap: var(--wp--preset--spacing--30);
  }
  .custom-button-wrap span.text {
    position: relative;
    inset: 0;
    width: auto;
    z-index: 3;
    padding: 0.6rem 3rem 0.6rem 1rem;
  }

  button.wp-block-button__link.add_to_cart_button .custom-button-wrap {
    align-items: center;
  }

  body
    button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap) {
    width: auto;
    height: auto;
    margin-left: 0 !important;
  }

  .custom-button-wrap .icon {
    height: 42px;
    left: calc(-21px - 0.5rem);
  }

  .custom-button-wrap .icon svg {
    width: 1.25rem;
    height: 1.25rem;
  }

  .mb-padding-0 {
    padding: 0 !important;
  }

  .mb-justify-center {
    justify-content: center;
  }

  .mb-align-center {
    align-items: center;
  }

  .is-layout-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }

  .mb-padding-default {
    padding: var(--wp--style--root--padding-left) !important;
  }

  .custom-button-wrap .text {
    position: relative !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
  }

  .custom-button-wrap {
    overflow: hidden !important;
  }

  .mb-flex-col {
    flex-direction: column !important;
  }

  .mb-flex-col-reverse {
    flex-direction: column-reverse !important;
  }

  .has-gradient {
    background: linear-gradient(
      180deg,
      rgb(255, 255, 255) 28%,
      rgb(242, 248, 234) 28%
    ) !important;
  }

  .wpcf7-form input[type="text"],
  .wpcf7-form input[type="email"],
  .wpcf7-form input[type="tel"],
  .wpcf7-form textarea {
    width: calc(100% - 2em) !important;
  }
}

button.wp-block-button__link.add_to_cart_button
  + span[data-wp-bind--hidden="!state.displayViewCart"] {
  display: none;
}

button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap) {
  padding: 0;
  border-radius: 99rem;

  height: 50px;
  width: 50px;
  margin-left: auto;
  background-color: transparent;
}
button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap):hover {
  transform: none;
}

button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap):hover
  .icon,
button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap)
  .icon:hover {
  transform: none;
}
button.wp-block-button__link.add_to_cart_button:has(.custom-button-wrap):hover
  .text {
  left: unset;
  right: calc(100% - 1rem);
}

body li.wc-block-product,
body li.wp-block-post {
  overflow: hidden;
}

aside#sidebar {
  position: fixed;
  height: 100dvh;
  z-index: 99;
  background-color: #fff;
  left: 0;
  top: 0;
  min-width: 80dvw;
  max-width: var(--sidebarWidth);
  transform: translateX(calc(var(--sidebarWidth) * -1));
  transition: all 0.25s;
}

aside#sidebar.open {
  transform: translate(0);
  z-index: 6;
}

body.sidebar-open {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body.sidebar-open:after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  background-color: rgba(0, 0, 0, 0.5);
}

@media (max-width: 884px) {
  /*
  * Wide ranging target for any 'rows' or columns in WordPress to force them down to 1 column on mobile
  */
  body main .is-layout-flex {
    flex-direction: column;
  }

  /*
  * Wide ranging target for any grid in WordPress to force them down to 1 column on mobile
  */
  body main .is-layout-grid {
    grid-template-columns: 1fr;
  }
}

/*
* Checkout Styling Shopify Style
*/

body.woocommerce-checkout
  .wc-block-components-sidebar-layout.wc-block-checkout {
  align-items: stretch;
}

body.woocommerce-checkout
  .wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block {
  border-left: 1px solid #f4f4f4;
  background-color: #f7f7f7;
  align-self: stretch;
  flex: 1;
  padding: 1rem;
}

body.woocommerce-checkout
  .wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block
  .wp-block-woocommerce-checkout-order-summary-block {
  border: 0;
}

body.woocommerce-checkout
  .wc-block-components-sidebar-layout
  .wc-block-components-main {
  padding-left: 2rem;
  padding-right: 2rem;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout {
  margin-top: 0;
  padding-top: 0;
}

body.woocommerce-checkout main {
  max-width: 100%;
}

.wc-block-components-main wc-block-checkout__main {
  padding: 2rem !important;
}

@media (min-width: 1100px) {
  body.woocommerce-checkout
    .wc-block-components-sidebar-layout.wc-block-checkout {
    min-height: 100dvh;
  }

  body .wc-block-components-sidebar-layout .wc-block-components-main {
    width: 60%;
  }
  body
    .wc-block-components-sidebar.wc-block-checkout__sidebar.wp-block-woocommerce-checkout-totals-block {
    width: 40%;
  }
}

table.wc-block-cart-items .wc-block-cart-items__header th,
.wc-block-cart .wc-block-cart__totals-title,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item
  .wc-block-components-totals-item__value {
  font-family: var(--wp--preset--font-family--dm-serif-display);
  text-transform: capitalize;
}

@media (max-width: 932px) {
  body.home .entry-content > .wp-block-cover:first-of-type {
    min-height: 40dvh !important;
    margin-top: 0 !important;
    overflow-y: visible;
  }

  body.home .entry-content > .wp-block-cover .wp-block-buttons {
    margin-bottom: 0 !important;
    transform: translateY(50%);
  }

  body.home .entry-content > .wp-block-cover:first-of-type iframe {
    min-height: 100%;
    height: 100%;
  }

  body.home header > .wp-block-group:last-of-type {
    margin-top: 0 !important;
    background-color: #1a1a1a;
    padding-bottom: 1rem !important;
  }
}
