/*
Theme Name: Kiosko Child
Template: kiosko
Text Domain: kiosko-child
*/

html, body {
  font-size: 1rem;
}

/**
 * Product blocks have an image zoom animation on hover.
 */
.wc-block-product {
  cursor: pointer;
  
  .wc-block-grid__product-image {
    overflow: hidden;

    a > img {
      transition: transform 300ms ease-in-out;
    }    
  }
  &:hover {
    .wc-block-grid__product-image a > img {
      transform: scale(1.05);
    }
    .wp-block-post-title > a {
      text-decoration: underline;
    }
  }
}

/**
 * Hide elements on mobile size.
 */
@media (max-width: 599px) {
  .hide-on-mobile {
    display: none;
  }
}

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

/**
 * Navigation menu link gap smaller on desktop.
 * Navigation menu link font larger on mobile.
 */
.wp-block-navigation {
  gap: 8px 18px;
}
@media (max-width: 599px) {
  header .wp-block-navigation {
    font-size: 20px;
  }
}

/**
 * Hide the product link in the slide-out mini cart.
 * (Needs to be done differenty probably.)
 */
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
  display: none;
}
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name[hidden] {
  display: block;
}

/**
 * Product detail pagina.
 */
.wp-block-woocommerce-product-details {
  margin-bottom: 4rem;
}
.woocommerce-Tabs-panel {
  > *:first-child,
  > *:nth-child(2) {
    margin-top: 0;
  }
}

/**
 * Sticky footer.
 */
html, body {
  height: 100%;
}
.wp-site-blocks,
.wp-block-woocommerce-coming-soon {
  display: flex;
  flex-direction: column;
  height: 100%;
  > main {
    flex: 1 0 auto;
    width: 100%;
  }
  > footer {
    flex-shrink: 0;
  }
}

/**
 * Footer MailPoet newsletter form.
 */
@media (max-width: 599px) {
  footer .mailpoet_form form {
    flex-direction: column;

    input {
      width: 100%;
    }
  }
}
footer .mailpoet_form {
  margin-top: 0;
}
footer .mailpoet_form form {
  display: flex;
  gap: 10px;
  padding: 0 !important;

  input {
    font-family: Merriweather, serif;
    padding: 0.5rem 1rem !important;
  }
  input[type=email] {
    border: 1px solid #c6c6c6;
  }
  input[type=submit] {
    background-color: #444444;
    color: #ffffff;
  }
  .mailpoet_form_html li {
    font-family: Merriweather, serif;
  }
  .mailpoet_paragraph {
    margin-bottom: 0 !important;
  }
  .mailpoet_validate_success,
  .mailpoet_validate_error {
    font-family: Merriweather, serif;
    left: 0 !important;
    margin: 0 !important;
    text-align: left !important;
    top: 0 !important;
    transform: none !important;
  }
}

/**
 * Add-to-cart button disabled and spinner.
 */
.wc-block-components-button:disabled {
  color: #999999;
  cursor: default;

  .wc-block-components-spinner {
    color: #ffffff;
  }
}
