/*
Theme Name: Reinert Piano
Theme URI: https://reinert-piano.de
Author: Reinert-Piano
Description: Wartbares, mobiles Block-Theme für Reinert-Piano und WooCommerce.
Version: 0.1.4
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: reinert-piano
*/

html {
  scroll-behavior: smooth;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a,
button,
input,
select,
textarea {
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease, opacity 160ms ease, transform 160ms ease;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
}

.rp-dark-header {
  border-bottom: 1px solid rgba(199, 158, 76, 0.42);
}

.rp-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rp-hero-title {
  text-wrap: balance;
}

.rp-card {
  border-top: 3px solid var(--wp--preset--color--gold);
  box-shadow: 0 18px 50px rgba(29, 28, 25, 0.06);
}

.rp-card-grid-five {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center;
  gap: 1rem;
}

.rp-card-grid-five > .wp-block-column {
  flex: 0 1 calc(33.333% - 0.7rem);
  margin-left: 0 !important;
}

.rp-card-grid-five > .rp-card {
  display: flex;
  flex-direction: column;
}

.rp-card-grid-five > .rp-card > p:last-child {
  margin-top: auto;
}

.rp-workshop-photo {
  min-height: clamp(280px, 58vw, 620px);
  background-image: linear-gradient(90deg, rgba(8, 16, 14, 0.18), rgba(8, 16, 14, 0.02)), url('./assets/images/klavierstimmung.webp');
  background-position: center;
  background-size: cover;
}

.rp-outline-button .wp-block-button__link {
  background: transparent;
  border: 1px solid var(--wp--preset--color--gold-dark);
}

.rp-outline-button .wp-block-button__link:hover {
  background: var(--wp--preset--color--paper);
}

.rp-trust-item + .rp-trust-item {
  border-left: 1px solid var(--wp--preset--color--line);
}

@media (max-width: 781px) {
  .rp-dark-header .wp-block-site-logo img {
    max-width: 210px;
  }

  .rp-hero {
    min-height: auto !important;
  }

  .rp-trust-item + .rp-trust-item {
    border-left: 0;
    border-top: 1px solid var(--wp--preset--color--line);
  }

  .rp-card-grid {
    gap: 14px !important;
  }


  .rp-card-grid-five {
    flex-direction: column;
  }

  .rp-card-grid-five > .wp-block-column {
    flex-basis: auto;
    width: 100%;
  }
  .rp-workshop-photo {
    min-height: 310px;
    background-position: 54% center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}


/* Show the export note only for calculated US shipments without VAT. */
html[lang^="en"][data-rp-us-tax-free] .wc-block-components-totals-footer-item .wc-block-components-totals-item__description::after {
  content: "VAT-exempt export delivery – product prices shown without German VAT";
}


/* Legal pages: calm, readable cards in the Reinert Piano design. */
.agb_content.agb_imprint {
  box-sizing: border-box;
  width: 100%;
  max-width: 860px;
  margin: 2.5rem auto 0;
  padding: clamp(1.4rem, 3.6vw, 2.6rem);
  color: var(--wp--preset--color--ink, #1c211d);
  background: #fffdf8;
  border: 1px solid var(--wp--preset--color--line, #d8d2c6);
  border-top: 3px solid var(--wp--preset--color--gold, #c79e4c);
  border-radius: 18px;
  box-shadow: 0 18px 44px rgba(28, 33, 29, 0.08);
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.agb_content.agb_imprint > div:first-child {
  max-width: 72ch;
}

.agb_content.agb_imprint a {
  text-underline-offset: 0.18em;
}

#itkanzlei_txt_copyright {
  margin-top: 2.5rem !important;
  padding-top: 1rem;
  color: #625f58;
  border-top: 1px solid var(--wp--preset--color--line, #d8d2c6);
  font-size: 0.86rem;
}

#itkanzlei_txt_copyright > div {
  float: none !important;
  margin: 0 !important;
  white-space: normal !important;
  text-align: right;
}

.rp-legal-supplement,
.rp-legal-cta {
  box-sizing: border-box;
  max-width: 860px;
  margin: 2.5rem auto;
  border-radius: 16px;
}

.rp-legal-supplement {
  padding: clamp(1.25rem, 3vw, 2.25rem);
  background: #f7f1e5;
  border: 1px solid var(--wp--preset--color--line, #d8d2c6);
  border-top: 3px solid var(--wp--preset--color--gold, #c79e4c);
}

.rp-legal-supplement h3 {
  margin-top: 0;
}

.rp-legal-supplement p:last-child {
  margin-bottom: 0;
}

.rp-legal-cta {
  padding: clamp(1.25rem, 3vw, 1.8rem);
  background: #fffdf8;
  border: 1px solid var(--wp--preset--color--line, #d8d2c6);
  border-left: 5px solid var(--wp--preset--color--gold, #c79e4c);
  box-shadow: 0 12px 30px rgba(28, 33, 29, 0.07);
}

.rp-legal-cta p {
  margin: 0 0 0.9rem;
  font-size: clamp(1.05rem, 2.3vw, 1.25rem);
  font-weight: 600;
}

.rp-legal-cta .wp-element-button {
  display: inline-block;
  padding: 0.8rem 1.15rem;
  color: #151515;
  background: var(--wp--preset--color--gold, #c79e4c);
  border-radius: 0;
  font-weight: 700;
  text-decoration: none;
}

.rp-legal-cta .wp-element-button:hover,
.rp-legal-cta .wp-element-button:focus-visible {
  color: #151515;
  background: #d9b867;
}

@media (max-width: 600px) {
  .agb_content.agb_imprint,
  .rp-legal-supplement,
  .rp-legal-cta {
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 13px;
  }

  .agb_content.agb_imprint {
    padding: 1.1rem;
  }

  .rp-legal-supplement,
  .rp-legal-cta {
    padding: 1.1rem;
  }

  .rp-legal-cta .wp-element-button {
    box-sizing: border-box;
    width: 100%;
    text-align: center;
  }
}


/* Corporate-green selection button for pianos, grand pianos and accessories */
body.term-klavier-fluegel-zubehoer .rp-chooser .rp-selected-continue {
  background: #294b3d !important;
  color: #fff !important;
  box-shadow: inset 0 -2px 0 #52645d !important;
}

body.term-klavier-fluegel-zubehoer .rp-chooser .rp-selected-continue:hover,
body.term-klavier-fluegel-zubehoer .rp-chooser .rp-selected-continue:focus-visible {
  background: #23332d !important;
  color: #fff !important;
}

/* WooCommerce add-to-cart confirmation */
.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success:has(.wc-forward) {
  align-items: center;
  gap: .625rem;
  padding: .625rem .75rem;
  cursor: pointer;
  border: 1px solid #c8d3c9;
  border-inline-start: 4px solid #294b3d;
  border-radius: 12px;
  background: #fcfaf4;
  color: #23332d;
}

.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success:has(.wc-forward) > svg {
  flex: none;
  background: #294b3d;
  fill: #fff;
}

.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success:has(.wc-forward) .wc-block-components-notice-banner__content {
  display: grid;
  flex: 1 1 0;
  grid-template-columns: minmax(0, 1fr) fit-content(42%);
  align-items: center;
  gap: .625rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__content .wc-forward {
  display: inline-flex;
  grid-area: 1 / 2;
  align-items: center;
  justify-content: center;
  text-align: center;
  float: none;
  box-sizing: border-box;
  max-width: 100%;
  min-height: 44px;
  margin: 0;
  padding: .375rem .625rem !important;
  border: 0;
  border-radius: 8px;
  background: #294b3d;
  color: #fff;
  font-size: .95em;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  opacity: 1;
}

.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__content .wc-forward:hover,
.woocommerce-notices-wrapper .wc-block-components-notice-banner.is-success .wc-block-components-notice-banner__content .wc-forward:focus-visible {
  background: #23332d;
  color: #fff;
}
