.lec {
  margin: 0 0 1em;
  width: 100%;
}
.lec-product-price {
  width: 100%;
  flex: 0 0 100%;
}
/* One stable price below all inline fields; WooCommerce still controls variation stock/availability. */
.single_variation_wrap:has(.lec:not(.lec--popup)):has(.lec-product-price)
  .woocommerce-variation-price {
  display: none;
}
.lec [hidden],
.lec-modal [hidden],
.lec-modal[hidden] {
  display: none !important;
}
.lec-section {
  border: 0;
  padding: 0;
  margin: 0 0 1.25em;
  min-width: 0;
}
.lec-section__title {
  font-weight: 600;
  font-size: 1.1em;
  padding: 0;
  margin-bottom: 0.75em;
}
.lec-field {
  margin-bottom: 1em;
}
.lec-label {
  display: block;
  font-size: 14px;
  font-weight: 400;
  margin-bottom: 0.35em;
}
.lec-req {
  color: #b32d2e;
}
.lec-field input[type="text"],
.lec-field textarea,
.lec-field select {
  width: 100%;
  box-sizing: border-box;
}
.lec-field select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 44px;
  padding: 9px 36px 9px 12px;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23111' d='M4 6l4 4 4-4z'/%3E%3C/svg%3E")
    no-repeat right 12px center;
  background-size: 10px;
  font: inherit;
  color: #111;
  font-size: 15px;
  font-weight: 500;
}
.lec-meta {
  display: flex;
  justify-content: space-between;
  gap: 1em;
  font-size: 0.85em;
  opacity: 0.75;
  margin-top: 0.25em;
}
.lec-meta:empty {
  display: none;
}
.lec-field--over .lec-counter {
  color: #b32d2e;
  font-weight: 600;
}
.lec-check {
  display: flex;
  align-items: center;
  gap: 0.5em;
  cursor: pointer;
}
.lec-price {
  white-space: nowrap;
  opacity: 0.75;
  font-size: 0.9em;
}
.lec-help {
  font-size: 0.85em;
  opacity: 0.7;
  margin: 0.35em 0 0;
}
.lec-info {
  padding: 0.75em 1em;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
}
.lec-info p:last-child {
  margin-bottom: 0;
}

.lec-choices {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 0.6em;
}
.lec-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25em;
  padding: 0.5em;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-radius: 6px;
  text-align: center;
  cursor: pointer;
  font-size: 0.9em;
}
.lec-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.lec-choice__img img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}
.lec-choice:hover {
  border-color: rgba(0, 0, 0, 0.35);
}
.lec-choice:has(input:checked) {
  border-color: currentColor;
  box-shadow: 0 0 0 1px currentColor;
}
.lec-choice:has(input:focus-visible) {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.lec-choice:has(input:disabled) {
  opacity: 0.5;
}

.lec-choices--pill {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em;
}
.lec-choice--pill {
  flex-direction: row;
  display: inline-flex;
  width: auto;
  padding: 0.1em 1em;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 999px;
  font-size: 1em;
}

.lec-summary {
  display: grid;
  gap: 0.25em;
  padding: 0.75em 1em;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}
.lec-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1em;
}

/* Popup-Modus */
.lec-open {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 1px solid currentColor;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
}
.lec-open:hover,
.lec-open:focus-visible {
  background: #000;
  color: #fff;
  border-color: #000;
}
.lec-recap {
  list-style: none;
  margin: 0.6em 0 0;
  padding: 0;
  font-size: 0.9em;
  opacity: 0.85;
}
.lec-recap li {
  margin: 0;
}

html.lec-modal-open {
  overflow: hidden;
}
.lec-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.lec-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.lec-modal__dialog {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(760px, 100%);
  max-height: 100%;
  background: #fff;
  color: #111;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
.lec-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  padding: 12px 16px;
  background: #1a1a1a;
  color: #fff;
}
.lec-modal__title {
  margin: 0;
  font-size: 0.85em;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: inherit;
}
.lec-modal__x {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.6em;
  line-height: 1;
  padding: 0 4px;
  cursor: pointer;
}
.lec-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}
.lec-modal__foot {
  padding: 12px 24px 16px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.lec-modal__actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1em;
  margin-top: 0.5em;
}
.lec-modal__reset {
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  color: inherit;
  font: inherit;
  font-size: 0.9em;
  cursor: pointer;
  opacity: 0.7;
}
.lec-modal__confirm {
  padding: 12px 28px;
  border: 0;
  background: #1a1a1a;
  color: #fff;
  font: inherit;
  font-size: 0.85em;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}
.lec-modal__confirm:hover {
  background: #000;
}
.lec-modal .lec-field,
.lec-modal .lec-section {
  color: inherit;
}
.lec-modal .lec-choices {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}
@media (max-width: 600px) {
  .lec-modal {
    padding: 0;
  }
  .lec-modal__dialog {
    height: 100%;
    width: 100%;
  }
}

.lec-section:has(+ .lec-status) {
  margin-bottom: 0;
}
.lec-section:has(+ .lec-status) .lec-field:last-child {
  margin-bottom: 0;
}
.lec-section + .lec-status {
  margin-top: 0.5em;
}
.lec-status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin-top: 0.5em;
  padding: 6px 16px;
  box-sizing: border-box;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.55556;
  text-align: center;
}
.lec-status.is-empty {
  background: #808080;
}
.lec-status.is-success {
  background: #00a63e;
}

/* Aufpreis-Hinweise */
.lec-price {
  color: #f0605d;
}
.lec-price--sup {
  font-size: 0.7em;
  margin-left: 0.1em;
  vertical-align: super;
  line-height: 0;
}

/* Popup: zentrierte Darstellung */
.lec-modal__body {
  text-align: center;
}
.lec-modal .lec-label {
  font-weight: 500;
}
.lec-modal .lec-field input[type="text"],
.lec-modal .lec-field textarea {
  text-align: center;
}
.lec-modal .lec-meta {
  justify-content: center;
}
.lec-modal .lec-check {
  justify-content: center;
}
.lec-modal .lec-choices {
  justify-content: center;
}

/* Popup: Abschnittstitel zentriert, Trennlinie zwischen Abschnitten */
.lec-modal .lec-section__title {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 500;
  margin: 0 0 1.25em;
  float: none;
}
.lec-modal .lec-section--titled + .lec-section,
.lec-modal .lec-section + .lec-section--titled {
  margin-top: 2em;
  padding-top: 2em;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
