/* zoep-entertainment.de – order system (see assets/js/marktplatz-order.js, shared with weimar-werk.de)
   colors of the site: green #23af4d (ColorMag primary color), dark grey #333 */

/* "bestellen" / "entfernen" buttons in the tables and on the details pages */
.tablepress .ww-order-add,
.ww-order-box .ww-order-add {
  display: inline-block;
  margin-top: .4em;
  margin-bottom: 0; /* ColorMag gives every <button> "margin-bottom: 30px" */
  padding: .25em .6em;
  border: 1px solid #23af4d;
  border-radius: 3px;
  background: #23af4d;
  color: #fff;
  font-size: .85em;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.tablepress .ww-order-add.ww-added,
.ww-order-box .ww-order-add.ww-added {
  border-color: #23af4d;
  background: #fff;
  color: #23af4d;
}
.tablepress .ww-order-add:hover,
.tablepress .ww-order-add:focus-visible,
.ww-order-box .ww-order-add:hover,
.ww-order-box .ww-order-add:focus-visible {
  border-color: #333;
  background: #333;
  color: #fff;
}

/* order box on the details pages (/<title>/dp/<order number>/) */
.ww-order-box {
  clear: both;
  margin: 1.5em 0;
  padding: .8em 1em;
  border-top: 2px solid #23af4d;
  border-bottom: 2px solid #23af4d;
}
.ww-order-box .ww-order-box-title {
  margin: 0 0 .5em;
}
.ww-order-box .ww-order-variants {
  margin: 0;
  padding: 0;
  list-style: none;
}
.ww-order-box .ww-order-variant {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .3em 1em;
  padding: .35em 0;
}
.ww-order-box .ww-order-add {
  margin-top: 0;
}
.ww-order-box .ww-order-variant-label {
  font-weight: bold;
}
.ww-order-box .ww-order-variant-no,
.ww-order-box .ww-order-variant-price {
  white-space: nowrap;
}
.ww-order-box .ww-order-box-hint {
  margin: .5em 0 0;
  font-size: .9em;
}

/* notice after a click on "bestellen" / "entfernen" */
#ww-order-toast {
  position: fixed;
  right: 1em;
  bottom: calc(1em + env(safe-area-inset-bottom, 0px));
  z-index: 100000;
  max-width: min(26em, calc(100vw - 2em));
  padding: .8em 1em;
  border-left: 4px solid #23af4d;
  background: #333;
  color: #fff;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  opacity: 0;
  transform: translateY(1em);
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
#ww-order-toast.ww-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}
#ww-order-toast a {
  color: #5fd47f; /* lighter green: readable on the dark background */
  text-decoration: underline;
}

/* order form: fields span the whole content column (ColorMag: width 95% - space on the right
   only, so the right edges of the fields, the summary row and CF7's message did not line up) */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
  width: 100%;
}

/* Row right below the order field: total order value (left) and "Bestellung leeren" as a small
   link (right), aligned with the field (ColorMag: margin-bottom 30px - the row moves up into
   that margin) */
.wpcf7-form .ww-order-summary {
  /* above the field: it is pulled up into the field's bottom margin, and CF7's
     .wpcf7-form-control-wrap {position: relative} would otherwise cover it */
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin: -26px 0 30px;
  font-size: .85em;
  line-height: 1.4;
}
.wpcf7-form .ww-order-summary[hidden],
.wpcf7-form .ww-order-total[hidden] {
  display: none;
}
.wpcf7-form .ww-order-clear {
  display: block;
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: #23af4d;
  font-size: inherit;
  line-height: inherit;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  cursor: pointer;
}
.wpcf7-form .ww-order-clear:hover,
.wpcf7-form .ww-order-clear:focus-visible {
  background: none;
  color: #333;
  text-decoration-style: solid;
}
.wpcf7-form .ww-order-clear .fa-solid {
  font-size: .9em;
}
.wpcf7-form .ww-order-clear[hidden] {
  display: none;
}

/* order form: CF7's success / error message right next to the "Senden" button (moved there by
   marktplatz-order.js), wrapping below it on narrow screens */
.wpcf7-form .ww-order-submit-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  margin-bottom: 30px; /* the space ColorMag gives the button itself */
}
.wpcf7-form .ww-order-submit-row > .wpcf7-submit {
  margin: 0;
}
.wpcf7 form .ww-order-submit-row .wpcf7-response-output {
  flex: 1 1 16em;
  margin: 0;
}
/* CF7's spinner keeps its space (24px + 2 x 24px margin) while invisible: only take it out of the
   row while not sending (while sending, CF7 hides the message anyway) */
.wpcf7-form .ww-order-submit-row .wpcf7-spinner {
  margin: 0;
}
.wpcf7 form:not(.submitting) .ww-order-submit-row .wpcf7-spinner {
  display: none;
}
