:root {
  --ocpo-blue: #1769a8;
  --ocpo-blue-dark: #0d4d7c;
  --ocpo-gold: #ab8d69;
  --ocpo-text: #222a31;
  --ocpo-muted: #65717d;
  --ocpo-border: #d8dfe5;
  --ocpo-soft: #f5f8fa;
  --ocpo-danger: #b42318;
}

body.ocpo-hide-legacy .oc-variant-thumbs,
body.ocpo-hide-legacy .oc-size-note {
  display: none !important;
}

body.ocpo-active form.variations_form .ocpo-native-row-hidden {
  display: none !important;
}

/* Sobald ein Builder-Mengenfeld aktiv ist, darf die native Woo-Menge nicht
   als zweite, widersprüchliche Eingabe daneben erscheinen. */
body.ocpo-has-quantity-controller form.cart > .quantity,
body.ocpo-has-quantity-controller form.cart .woocommerce-variation-add-to-cart > .quantity {
  display: none !important;
}

.ocpo-staging[hidden] {
  display: none !important;
}

.ocpo-slot:empty {
  display: none;
}

.ocpo-slot--before_gallery,
.ocpo-slot--after_gallery,
.ocpo-slot--before_tabs,
.ocpo-slot--after_tabs,
.ocpo-slot--before_related {
  clear: both;
}

.ocpo-element {
  box-sizing: border-box;
  margin: 13px 0;
  color: var(--ocpo-text);
}

.ocpo-heading,
.ocpo-content-title {
  margin: 0 0 10px;
  color: var(--ocpo-text);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
}

.ocpo-text {
  color: var(--ocpo-muted);
  font-size: 14px;
  line-height: 1.6;
}

.ocpo-text > :first-child { margin-top: 0; }
.ocpo-text > :last-child { margin-bottom: 0; }

.ocpo-divider {
  height: 1px;
  margin: 18px 0;
  border: 0;
  background: var(--ocpo-border);
}

.ocpo-info {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 9px 0;
  font-size: 14px;
}

.ocpo-info strong {
  color: var(--ocpo-text);
}

.ocpo-info span {
  color: var(--ocpo-muted);
}

.ocpo-field {
  min-width: 0;
}

.ocpo-label {
  display: block;
  margin: 0 0 7px;
  color: #3b4650;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.ocpo-label span {
  color: var(--ocpo-danger);
}

.ocpo-control.ocpo-select,
.ocpo-control.ocpo-quantity {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  margin: 0;
  border: 1px solid var(--ocpo-border);
  border-radius: 7px;
  background: #fff;
  color: var(--ocpo-text);
  font-size: 15px;
  box-shadow: none;
}

.ocpo-control.ocpo-select {
  padding: 7px 36px 7px 11px;
}

.ocpo-control.ocpo-quantity {
  max-width: 130px;
  padding: 7px 11px;
}

.ocpo-control:focus,
.ocpo-choice:focus-visible,
.ocpo-pdf:focus-visible {
  border-color: var(--ocpo-blue);
  outline: 2px solid rgba(23, 105, 168, .18);
  outline-offset: 1px;
}

.ocpo-field.has-error .ocpo-control,
.ocpo-field.has-error .ocpo-choices {
  border-color: var(--ocpo-danger);
}

.ocpo-eyes {
  margin: 0;
  padding: 0;
  border: 0;
}

.ocpo-eyes > legend {
  width: 100%;
  margin: 0 0 9px;
  padding: 0;
  color: var(--ocpo-text);
  font-size: 15px;
  font-weight: 700;
}

.ocpo-eyes__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.ocpo-eyes__grid > .ocpo-field {
  padding: 13px;
  border: 1px solid var(--ocpo-border);
  border-radius: 9px;
  background: var(--ocpo-soft);
}

.ocpo-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ocpo-choice {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--ocpo-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ocpo-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.ocpo-choice:hover {
  border-color: #8fa7ba;
}

.ocpo-choice.is-active {
  border-color: var(--ocpo-blue-dark);
  background: #edf6fc;
  box-shadow: inset 0 0 0 1px var(--ocpo-blue-dark);
  color: var(--ocpo-blue-dark);
  font-weight: 700;
}

.ocpo-choice.is-disabled,
.ocpo-choice:disabled {
  opacity: .38;
  cursor: not-allowed;
  text-decoration: line-through;
}

.ocpo-choices--tiles .ocpo-choice {
  flex-direction: column;
  width: 88px;
  padding: 7px;
  overflow: hidden;
}

.ocpo-choices--tiles .ocpo-choice img {
  display: block;
  width: 72px;
  height: 72px;
  margin-bottom: 6px;
  border-radius: 6px;
  object-fit: contain;
  background: #fff;
}

.ocpo-choice__swatch {
  display: block;
  width: 66px;
  height: 52px;
  margin-bottom: 6px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f0f2f4, #d9dfe4);
}

.ocpo-choices--tiles .ocpo-choice > span:last-child {
  max-width: 100%;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ocpo-image {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 9px;
}

.ocpo-pdf {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid var(--ocpo-border);
  border-radius: 8px;
  color: var(--ocpo-blue-dark);
  background: #fff;
  text-decoration: none;
  font-weight: 700;
}

.ocpo-pdf:hover {
  border-color: var(--ocpo-blue);
  color: var(--ocpo-blue);
}

.ocpo-pdf__icon {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 28px;
  border-radius: 5px;
  background: #d94a42;
  color: #fff;
  font-size: 10px;
  letter-spacing: .04em;
}

.ocpo-errors {
  margin: 10px 0;
  padding: 11px 13px;
  border-left: 4px solid var(--ocpo-danger);
  border-radius: 5px;
  background: #fff0ef;
  color: #7a271a;
  font-size: 13px;
}

.ocpo-required-disabled {
  opacity: .55 !important;
  cursor: not-allowed !important;
}

/* Warenkorb, Kasse, Bestellansicht und klassische E-Mail-Vorschau */
.ocpo-summary {
  margin: 7px 0 2px;
  font-size: 12px;
  line-height: 1.45;
}

.ocpo-summary__group {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid rgba(0, 0, 0, .09);
}

.ocpo-summary__group:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.ocpo-summary__heading {
  display: block;
  margin-bottom: 3px;
  color: #252c32;
  font-size: 12px;
}

.ocpo-summary__list {
  margin: 0;
}

.ocpo-summary__row {
  display: grid;
  grid-template-columns: minmax(90px, .7fr) minmax(120px, 1.3fr);
  gap: 7px;
  padding: 1px 0;
}

.ocpo-summary__row dt,
.ocpo-summary__row dd {
  margin: 0;
}

.ocpo-summary__row dt {
  color: #68737d;
  font-weight: 500;
}

.ocpo-summary__row dd {
  color: #242b31;
  font-weight: 600;
}

.ocpo-summary__image-link {
  display: inline-block;
  line-height: 0;
}

.ocpo-summary__image {
  display: block;
  width: 64px;
  height: 48px;
  border: 1px solid var(--ocpo-border);
  border-radius: 5px;
  object-fit: cover;
  background: #fff;
}

.ocpo-summary__price {
  color: #68737d;
  font-weight: 400;
}

.ocpo-edit-link {
  display: inline-block;
  margin-top: 7px;
  color: var(--ocpo-blue-dark, #0d4d7c);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}

/* Strukturierte Reservierungsliste */
.ocpo-reservation-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, .82fr);
  gap: 24px;
  align-items: start;
}

.ocpo-reservation-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ocpo-reservation-item {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--ocpo-border, #d8dfe5);
}

.ocpo-reservation-item__image img {
  width: 96px;
  height: 96px;
  border-radius: 8px;
  object-fit: contain;
}

.ocpo-reservation-item__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}

.ocpo-reservation-original .oc-res-left {
  display: none !important;
}

.ocpo-reservation-original .oc-res-wrap {
  display: block !important;
}

.ocpo-reservation-original .oc-res-right {
  width: auto !important;
  max-width: none !important;
}

.ocpo-res-hover__config {
  display: block;
  margin-top: 4px;
  color: #68737d;
  font-size: 11px;
  line-height: 1.35;
}

@media (max-width: 992px) {
  .ocpo-eyes__grid,
  .ocpo-reservation-wrap {
    grid-template-columns: 1fr;
  }

  .ocpo-eyes__grid {
    gap: 10px;
  }

  .ocpo-element {
    margin: 11px 0;
  }
}

@media (max-width: 520px) {
  .ocpo-choices--tiles .ocpo-choice {
    width: calc(33.333% - 6px);
    min-width: 82px;
  }

  .ocpo-summary__row {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 3px 0;
  }

  .ocpo-reservation-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .ocpo-reservation-item__image img {
    width: 72px;
    height: 72px;
  }
}
