/*
Theme Name: BAG Webshop
Theme URI: 
Author: Datenhaus AG
Author URI: https://datenhaus.ch
Description: Webshop Projekt für BAG 2023
Requires at least: 6.0
Tested up to: 6.3.1
Requires PHP: 5.7
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bagwebshop
Tags: grid-layout, one-column, two-columns, three-columns, four-columns, wide-blocks, blog, portfolio, entertainment, accessibility-ready, block-patterns, block-styles, custom-logo, custom-menu, editor-style, featured-images, full-site-editing, full-width-template, rtl-language-support, style-variations, template-editing, theme-options, translation-ready
*/

/* CSS Reset
---------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
}
a:focus,
a:hover {
  text-decoration: underline;
}

b,
strong {
  font-weight: var(--wp--custom--font-weight--semi-bold);
}

blockquote {
  margin: 0;
}

ol,
ul {
  padding: 0;
}

ol:where(:not([class*="wp-block"])),
ol:where(.wp-block-list),
ul:where(:not([class*="wp-block"])),
ul:where(.wp-block-list) {
  padding-inline-start: var(--wp--preset--spacing--medium);
}

div[class*="wp-block-"] figcaption {
  color: var(--wp--preset--color--secondary);
  font-size: var(--wp--preset--font-size--x-small);
  margin-bottom: 0;
  margin-top: 20px;
  text-align: center;
}

img,
video {
  /* border-radius: 5px; */
}

/* Standardize form styling
--------------------------------------------- */

input,
button,
textarea,
select {
  font: inherit;
}

input[type="button"],
input[type="email"],
input[type="search"],
input[type="submit"],
input[type="text"],
textarea {
  -webkit-appearance: none;
}

input:not([type="submit"]),
select,
textarea,
.wp-block-post-comments-form input:not([type="submit"]):not([type="checkbox"]),
.wp-block-post-comments-form textarea {
  color: var(--wp--preset--color--main);
  border-radius: 1rem;
  border: solid 1px var(--wp--preset--color--main-accent);
  padding: 0.5em 1em;
  font-size: var(--wp--preset--font-size--small);
  width: 100%;
}

input:focus-visible,
textarea:focus-visible {
  outline-color: var(--wp--preset--color--primary);
}

input[type="checkbox"],
input[type="image"],
input[type="radio"] {
  width: auto;
}

label {
  width: 100%;
  display: block;
}

::placeholder {
  color: var(--wp--preset--color--main-accent);
  font-size: var(--wp--preset--font-size--small);
  opacity: 0.75;
}

/* Helper styles that can't be done via theme.json
---------------------------------------------------------------------------- */

a.more-link {
  display: block;
}

/* Inline code */
*:not(.wp-block-code) > code {
  background-color: var(--wp--preset--color--tertiary);
  font-weight: var(--wp--custom--font-weight--medium);
  padding: 3px 5px;
  position: relative;
  border-radius: 3px;
}

/* Adjust terms at bottom of posts */
.single .wp-block-group .wp-block-post-terms,
.blog .wp-block-group .wp-block-post-terms {
  margin-bottom: -8px !important;
}

/* Remove margin on term description on archive pages */
.wp-block-term-description p:last-child {
  margin-bottom: 0;
}

/* Remove last separator on post list */
.remove-border-and-padding .wp-block-post-template li:last-child .wp-block-separator {
  display: none;
}

/* Hide post meta div if no tags assigned */
.single .wp-block-group:has(> .post-meta:empty) {
  display: none;
}

/*### Custom BAG Sytyles ###*/

/* WPML hide Test banner */
.otgs-development-site-front-end {
  display: none;
}

/* Breakpoint for Navblock */
/* copy of wp default css to a 1000px media query */
@media (min-width: 781px) {
  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: none !important;
  }

  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: block !important;
    width: 100%;
    position: relative;
    z-index: auto;
    background-color: inherit;
  }
}

/* neutralize the wp default for 600px */
@media (min-width: 600px) {
  .wp-block-navigation__responsive-container-open:not(.always-shown) {
    display: flex;
  }
  .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
    display: none;
  }
}

@media (max-width: 781px) {
  .bag-mobile-padding {
    padding-right: var(--wp--preset--spacing--x-small) !important;
  }
}

/* Lang Switcher mobile */
.bag-lang-mobile {
  text-transform: uppercase;
  font-size: var(--wp--preset--font-size--x-small);
  padding-top: 1rem;
}
@media (min-width: 781px) {
  .bag-show-mobile {
    display: none !important;
  }
}

@media (max-width: 781px) {
  .bag-show-desk {
    display: none !important;
  }
}

[data-wpml="language-item"]:first-of-type {
  margin-top: 0 !important;
}

/* Custom BAG Transparent Header */
.bag-header {
  /* position: fixed;
  z-index: 999;
  width: 100%; */
  background-color: var(--wp--preset--color--base);
}

/*** Woocommerce custom styles ***/
/* Hide price from cart and checkout */
.woocommerce table.cart td:nth-of-type(6),
.woocommerce table.cart th:nth-of-type(6),
.woocommerce table.cart td:nth-of-type(4),
.woocommerce table.cart th:nth-of-type(4),
.woocommerce table.shop_table tr.cart-subtotal,
.woocommerce table.shop_table tr.order-total,
.woocommerce table.shop_table th.product-total,
.woocommerce table.shop_table td.product-total,
.woocommerce table.shop_table .woocommerce-shipping-destination,
.woocommerce .cart_totals h2,
.wc-block-components-totals-item.wc-block-mini-cart__footer-subtotal,
.woocommerce-order-overview__total.total,
.woocommerce-table__product-table.product-total,
.woocommerce-table__product-total.product-total,
.woocommerce-table.woocommerce-table--order-details.shop_table.order_details tfoot tr:nth-of-type(1),
.woocommerce-table.woocommerce-table--order-details.shop_table.order_details tfoot tr:nth-of-type(3),
.woocommerce-customer-details h2,
.col-buy.col-add-to-cart.sorting_disabled {
  display: none;
}

.woocommerce-order-overview.woocommerce-thankyou-order-details.order_details {
  list-style-type: none;
}

.woocommerce table.cart td:nth-of-type(4),
.woocommerce table.cart th:nth-of-type(4) {
  display: none;
}

.woocommerce .quantity .qty {
  width: 7rem;
}

.woocommerce-billing-fields h3 {
  visibility: hidden;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector__button {
  display: none;
}

.wc-block-mini-cart-items .wc-block-components-quantity-selector__input {
  pointer-events: none;
}

.bag-shoppage {
  display: flex;
  gap: 1rem;
}

/* Product Tabelle */
.wc-product-table-controls .dataTables_filter:first-child {
  margin-right: 0 !important;
}
