/* Gesine Options v0.2.3: Audio-Karten, Waveform-Hörproben und CashCart. */
.gi-options-products[hidden],
.gi-options-preview-audio[hidden] { display: none !important; }

.gi-options-tagline {
  color: var(--gi-color-text, #173A2A);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.3vw, 1.3rem);
  margin: .6em 0 1em;
}
.gi-options-subheading { margin-top: 1.2em; }
.gi-options-single-offer {
  margin: 2rem 0 0;
  padding: 1.35rem 1.5rem;
  border-left: 3px solid var(--gi-color-secondary, #5DBB63);
  background: #F8F2E5;
  border-radius: 0 12px 12px 0;
}
.gi-options-single-name {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
  margin: 0 0 .6rem;
}
.gi-options-single-price { font-size: 1.35rem; font-weight: 600; margin: 0 0 1.2rem; }
.gi-options-single-offer .wp-block-buttons { margin: 0; }
.gi-options-single-notice { color: #5c685e; font-size: .85rem; margin: .9rem 0 0; }

.gi-options-cart-toolbar { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
.gi-options-cart-open, .gi-options-preview-button {
  background: transparent;
  color: #173A2A;
  border: 1px solid #8f9c88;
  border-radius: 9px;
  font: inherit;
  font-weight: 600;
  padding: .7rem 1rem;
  cursor: pointer;
  transition: background-color .18s ease;
}
.gi-options-cart-open:hover, .gi-options-preview-button:hover { background: #F8F2E5; }
.gi-options-audio-duration { font-weight: 600; margin: .45rem 0 .9rem; }
.gi-options-audio-preview { margin: .4rem 0 1.15rem; display: flex; flex-direction: column; align-items: flex-start; gap: .6rem; }
.gi-options-preview-audio { width: 100%; max-width: 360px; }
.gi-options-bundles { margin-top: 2.5rem; }
.gi-options-bundles-heading { margin-bottom: 1rem; }
.gi-options-bundle-contents { color: #556652; font-size: .96rem; line-height: 1.5; overflow-wrap: anywhere; }
.gi-options-cart-feedback { font-size: .85rem; min-height: 1.2em; margin: .45rem 0 0; color: #38663e; }
.gi-options-product-card { overflow-wrap: anywhere; }

/* Warenkorb-Modal */
.gi-options-cart-dialog {
  box-sizing: border-box;
  width: min(570px, calc(100% - 24px));
  max-height: min(85vh, 730px);
  overflow-y: auto;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid #dee1da;
  border-radius: 16px;
  background: #fff;
  color: #173A2A;
  box-shadow: 0 20px 80px rgba(0,0,0,.22);
}
.gi-options-cart-dialog::backdrop { background: rgba(18,28,21,.55); }
.gi-options-cart-title { margin: 0 3rem 1.5rem 0; }
.gi-options-cart-close {
  position: absolute; right: 1.1rem; top: 1rem;
  border: 0; background: transparent; color: #173A2A;
  font-size: 1.9rem; cursor: pointer;
}
.gi-options-cart-line {
  display: flex; align-items: center; flex-wrap: wrap; gap: .8rem;
  padding: .8rem 0; border-bottom: 1px solid #e6e9e1;
}
.gi-options-cart-line-info { flex: 1 1 170px; display: flex; flex-direction: column; gap: .2rem; }
.gi-options-cart-line-kind { color: #647164; font-size: .82rem; }
.gi-options-cart-line-price { font-weight: 600; white-space: nowrap; }
.gi-options-cart-remove {
  border: 0; background: transparent; color: #6c4440;
  cursor: pointer; text-decoration: underline; padding: .25rem;
}
.gi-options-cart-total { display: flex; justify-content: space-between; gap: 1rem; margin: 1.2rem 0; font-size: 1.25rem; }
.gi-options-cart-hint { font-size: .88rem; color: #5a665a; margin-bottom: 1.5rem; }
.gi-options-cart-actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.gi-options-cart-actions button {
  padding: .8rem 1.1rem; border-radius: 9px;
  font: inherit; cursor: pointer;
}
.gi-options-cart-continue { border: 1px solid #789378; background: white; color: #173A2A; }
.gi-options-cart-checkout { background: #617d60; border: 1px solid #617d60; color: white; }
.gi-options-cart-checkout:disabled { opacity: .55; cursor: not-allowed; }
@media (max-width: 640px) {
  .gi-options-cart-actions button { width: 100%; }
  .gi-options-single-offer { padding: 1rem; }
}

/* v0.2.2: Vier gleich breite Karten pro Zeile (auch bei nur einer Karte).
 * CSS Grid beruecksichtigt den Kartenabstand; vier Flex-Items mit je
 * flex-basis:25% PLUS gap wuerden sonst in eine fuenfte Zeile umbrechen. */
.gi-options-products .gi-options-products-list,
.gi-options-bundles .gi-options-bundles-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: stretch;
}
.gi-options-products .gi-options-product-card {
  box-sizing: border-box;
  width: 100%;
  max-width: none;
  min-width: 0;
  flex: none;
  display: flex;
  flex-direction: column;
}
.gi-options-products .gi-options-product-name {
  line-height: 1.2;
  height: 2.4em;
  min-height: 2.4em;
  max-height: 2.4em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.gi-options-products .gi-options-product-description {
  line-height: 1.45;
  height: 4.35em;
  min-height: 4.35em;
  max-height: 4.35em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.gi-options-products .gi-options-product-footer {
  margin-top: auto;
}
.gi-options-products .gi-options-product-price {
  margin-bottom: .9rem;
}

/* Native HTML5-Audiowiedergabe, selbst gezeichnete 30-Sekunden-Wellenform. */
.gi-options-waveform-player {
  --gi-options-wave-inactive: #c7d2c7;
  --gi-options-wave-active: #456e53;
  display: flex;
  align-items: center;
  gap: .65rem;
  width: 100%;
  min-width: 0;
  margin: .7rem 0 1.2rem;
}
.gi-options-waveform-play {
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid #729377;
  border-radius: 50%;
  background: #f8f2e5;
  color: #173a2a;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
}
.gi-options-waveform-play:hover { background: #e8efdf; }
.gi-options-waveform-play:focus-visible {
  outline: 2px solid #456e53;
  outline-offset: 3px;
}
.gi-options-waveform-play:disabled { opacity: .7; cursor: wait; }
.gi-options-waveform-content { min-width: 0; flex: 1 1 auto; }
.gi-options-waveform-track { position: relative; width: 100%; height: 40px; }
.gi-options-waveform-canvas {
  display: block;
  width: 100%;
  height: 40px;
}
.gi-options-waveform-seek {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 40px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.gi-options-waveform-seek:disabled { cursor: default; }
.gi-options-waveform-track:focus-within {
  outline: 2px solid #456e53;
  outline-offset: 2px;
  border-radius: 3px;
}
.gi-options-waveform-time {
  display: block;
  text-align: right;
  font-size: .8rem;
  color: #536755;
  font-variant-numeric: tabular-nums;
  margin-top: -.15rem;
}
.gi-options-waveform-message {
  display: block;
  color: #805d3b;
  font-size: .8rem;
  line-height: 1.3;
}
.gi-options-waveform-message:empty { display: none; }
.gi-options-waveform-player audio[hidden] { display: none !important; }

@media (max-width: 1060px) {
  .gi-options-products .gi-options-products-list,
  .gi-options-bundles .gi-options-bundles-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 620px) {
  .gi-options-products .gi-options-products-list,
  .gi-options-bundles .gi-options-bundles-list {
    grid-template-columns: minmax(0, 1fr);
  }
}


/* v0.2.3: kompakter, gleichmaessiger vertikaler Rhythmus in Meditationen
 * und Audio-Paketen; ueberschreibt bei diesen Karten alte Theme-Mindesthoehen. */
.gi-options-products .gi-options-product-card.gi-options-audio-card,
.gi-options-products .gi-options-product-card.gi-options-bundle-card {
  height: auto !important;
  min-height: 0 !important;
  justify-content: flex-start !important;
  padding-bottom: 1.5rem;
}
.gi-options-products .gi-options-audio-card .gi-options-product-name,
.gi-options-products .gi-options-bundle-card .gi-options-product-name {
  margin: 0 0 .55rem !important;
}
.gi-options-products .gi-options-audio-card .gi-options-product-description,
.gi-options-products .gi-options-bundle-card .gi-options-product-description {
  margin: 0 0 .65rem !important;
}
.gi-options-products .gi-options-bundle-card .gi-options-product-description {
  height: 2.9em;
  min-height: 2.9em;
  max-height: 2.9em;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}
.gi-options-products .gi-options-audio-card .gi-options-audio-duration {
  margin: 0 0 .65rem !important;
}
.gi-options-products .gi-options-audio-card .gi-options-waveform-player {
  margin: 0 0 .85rem !important;
}
.gi-options-products .gi-options-bundle-card .gi-options-bundle-contents {
  margin: 0 0 .85rem !important;
}
.gi-options-products .gi-options-audio-card .gi-options-product-footer,
.gi-options-products .gi-options-bundle-card .gi-options-product-footer {
  margin: 0 !important;
  padding: 0 !important;
}
.gi-options-products .gi-options-audio-card .gi-options-product-price,
.gi-options-products .gi-options-bundle-card .gi-options-product-price {
  margin: 0 0 .75rem !important;
}
.gi-options-products .gi-options-audio-card .gi-options-cart-feedback,
.gi-options-products .gi-options-bundle-card .gi-options-cart-feedback {
  margin: .35rem 0 0;
  min-height: 0;
}
.gi-options-products .gi-options-audio-card .gi-options-cart-feedback:empty,
.gi-options-products .gi-options-bundle-card .gi-options-cart-feedback:empty {
  display: none;
}
/* Play-Button mittig zur 40px-Wellenform, nicht zur Wellenform + Zeitzeile. */
.gi-options-waveform-player .gi-options-waveform-play {
  align-self: flex-start;
  margin-top: 2px;
}
/* Auch ein einzelnes Audio-Paket bleibt auf der Seitenmitte.
 * Breite: ein Viertel der verfuegbaren Reihe, inkl. korrekter gap-Rechnung. */
.gi-options-products .gi-options-bundles {
  margin-top: 2rem;
}
.gi-options-products .gi-options-bundles-heading {
  text-align: center;
  margin: 0 0 1rem !important;
}
.gi-options-products .gi-options-bundles .gi-options-bundles-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 1.1rem;
}
.gi-options-products .gi-options-bundles .gi-options-bundle-card {
  box-sizing: border-box;
  flex: 0 0 calc((100% - 3.3rem) / 4);
  width: calc((100% - 3.3rem) / 4);
  max-width: calc((100% - 3.3rem) / 4);
  min-width: 0;
  text-align: left;
}
@media (max-width: 1060px) {
  .gi-options-products .gi-options-bundles .gi-options-bundle-card {
    flex-basis: calc((100% - 1.1rem) / 2);
    width: calc((100% - 1.1rem) / 2);
    max-width: calc((100% - 1.1rem) / 2);
  }
}
@media (max-width: 620px) {
  .gi-options-bundle-card .gi-options-product-cta {
    font-size: .9rem;
    padding-inline: .75rem;
    white-space: nowrap;
  }
  .gi-options-products .gi-options-bundles .gi-options-bundle-card {
    flex-basis: 100%;
    width: 100%;
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .gi-options-bundle-card .gi-options-product-cta { white-space: normal; }
}
