#vat_number_field_wrapper {
  display: flex;
  justify-content: flex-start;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  margin-bottom: 10px;
  padding: 15px 25px;
}

#vat_number_field_wrapper .vat-number-field-class {
  /* A fixed % width doesn't grow to fill whatever's left after the button,
     so under CheckoutWC's (wider) payment-tab layout the leftover space
     sat as a gap between the input and the button instead of after it.
     flex: 1 1 auto lets the input claim exactly the space the button
     doesn't need; min-width: 0 lets it shrink below its content's
     intrinsic width instead of overflowing the row. */
  flex: 1 1 auto;
  min-width: 0;
}

#vat_number_field_wrapper .vat-number-field-class {
  padding: 0;
  margin: 0px 20px 0px 0px;
}

#vat_number_field_wrapper .vat-number-field-class span,
#vat_number_field_wrapper .vat-number-field-class input {
  width: 100%;
  height: 51px;
  color: var(--forms-fields-normal-color, #69727d);
  background-color: #f9fafa;
  border-radius: var(--forms-fields-border-radius, 0);
  border: none;
}

#vat_number_field_wrapper
  .vat-number-field-class
  span.woocommerce-input-wrapper:focus {
  outline: none !important; /* Remove the default focus outline */
  border: none !important; /* Remove the border */
}

#vat_number_field_wrapper button#vat_button,
#vat_button {
  height: 51px;
  /* CheckoutWC's .cfw-secondary-btn rule sets width:100% - without this
     override the button would stretch to fill the flex row instead of
     sitting next to the CVR input (see PROJECT-NOTES Feature 8). */
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
  margin: auto 0px 0px 0px;
  cursor: pointer;
}

/* Entrance animation for both the fraud-check messages and the CVR/name
   picklist below - fade + slide down from above. Plays automatically every
   time either appears because frontend.js always removes the old element
   and inserts a brand new one on re-check (see e.g. renderEanMessage()) -
   a genuinely new DOM node always starts a fresh @keyframes animation, so
   no forced-reflow/JS retrigger hook is needed. Kept as `animation` rather
   than `transition` for the same reason: a transition needs its "before"
   state committed to an actual render frame before the "after" state change
   to fire reliably, which a synchronous remove-then-insert can skip - a
   keyframe animation's 0% state doesn't depend on that timing at all. */
@keyframes wk-ean-message-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wk-ean-message {
  /* Bottom-only, not top-only: several of these can stack directly against
     each other with nothing else in between (e.g. 3+ in
     #wk_cvr_payment_messages under CheckoutWC) - a top-only margin on the
     NEXT message collapses against the PRECEDING message's own (zero)
     bottom margin, and a first-child's top margin can also collapse straight
     through a margin/padding-less parent instead of creating space inside
     it. Giving every message its own trailing space instead sidesteps both:
     each one pushes room below itself regardless of what follows or
     precedes it, so the gap is guaranteed whether there's 1 message or 5.
     Last message's trailing margin is intentionally left in (not zeroed via
     :last-child) - harmless breathing room before whatever checkout content
     comes next. */
  margin: 0 0 12px;
  padding: 10px;
  border-radius: 5px;
  border-left: 4px solid transparent;
  font-size: 14px;
  line-height: 1.6;
  animation: wk-ean-message-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

/* CheckoutWC ships its own body.checkout-wc p / main.checkoutwc p rule that
   zeroes margin-block-start/-end on EVERY <p>, at (0,1,2) specificity -
   higher than our bare .wk-ean-message (0,1,0), so it always wins there
   regardless of stylesheet load order. Confirmed live via DevTools: that
   rule, not ours, was the one actually applying, which is why stacked
   messages sat flush against each other only under CheckoutWC (classic
   checkout has no such reset, so the base rule above already works fine
   there). Scoping this override the same way CheckoutWC scopes its own
   rule (body.checkout-wc / main.checkoutwc + our class) reaches (0,2,1)
   specificity, which beats theirs deterministically - no !important needed.
   Matches their property (margin-block-end, not margin-bottom) so there's
   no ambiguity between the logical/physical versions of the same edge. */
body.checkout-wc .wk-ean-message,
main.checkoutwc .wk-ean-message {
  margin-block-end: 12px;
}

.wk-ean-message--green {
  color: #1b4332;
  background-color: #f1f8f4;
  border-left-color: #2f9e63;
}

.wk-ean-message--yellow {
  color: #5c4108;
  background-color: #fbf6e7;
  border-left-color: #c9930b;
}

.wk-ean-message--red {
  color: #7a2426;
  background-color: #fbeded;
  border-left-color: #d64545;
}

.wk-cvr-picklist {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid #d9dde3;
  border-radius: 0;
  animation: wk-ean-message-in 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.wk-cvr-picklist-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #ececec;
}

.wk-cvr-picklist-item:last-child {
  border-bottom: none;
}

.wk-cvr-picklist-item:hover,
.wk-cvr-picklist-item:focus {
  background-color: #f9fafa;
}

.wk-cvr-picklist-item strong {
  display: block;
}

.wk-cvr-picklist-item span {
  font-size: 0.9em;
  color: #69727d;
}

@media (prefers-reduced-motion: reduce) {
  .wk-ean-message,
  .wk-cvr-picklist {
    animation: none;
  }
}

#production_unit_field_wrapper {
  margin-bottom: 10px;
}

#production_unit_button {
  cursor: pointer;
}

.wk-production-unit-select-wrapper {
  margin-top: 8px;
}

.wk-production-unit-select-wrapper select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d3d3d3;
  border-radius: 3px;
  background-color: #f9fafa;
  color: var(--forms-fields-normal-color, #69727d);
}
