.eoos {
  margin-top: 0.75rem;
}

.eoos__notice {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.eoos__toggle-wrap {
  margin-top: 0.625rem;
}

.eoos__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0;
}

.eoos__toggle-label {
  display: inline-block;
}

.eoos__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.eoos__icon svg {
  display: block;
}

.eoos__input-wrap {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  padding: 0 0.75rem;
  background: #fff;
}

.eoos__input-wrap:focus-within {
  outline: none;
  box-shadow: none;
}

.eoos__input-wrap .eoos__input,
.eoos__input-wrap .eoos__input:focus,
.eoos__input-wrap .eoos__input:focus-visible,
.eoos__input-wrap .eoos__input:active {
  outline: none;
  box-shadow: none;
  -webkit-appearance: none;
  appearance: none;
}

.eoos__input-wrap .eoos__input {
  border: 0;
  padding-left: 0;
  padding-right: 0;
  background: transparent;
  flex: 1 1 auto;
  min-width: 0;
}

.eoos__modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.eoos__modal[hidden] {
  display: none;
}

.eoos__modal.is-open {
  display: flex;
}

.eoos__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}

.eoos__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 28rem);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  padding: 1.5rem;
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.2);
}

.eoos__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
}

.eoos__title {
  margin: 0 2rem 1rem 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.eoos__form {
  display: grid;
  gap: 0.875rem;
  margin: 0;
}

.eoos__field {
  margin: 0;
}

.eoos__label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

.eoos__input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.25rem;
  box-sizing: border-box;
  outline: none;
  box-shadow: none;
}

.eoos__input:focus,
.eoos__input:focus-visible,
.eoos__input:active {
  outline: none;
  box-shadow: none;
}

.eoos__actions {
  margin: 0.25rem 0 0;
}

.eoos__submit {
  width: 100%;
}

.eoos__message {
  margin-top: 0.875rem;
  padding: 0.75rem;
  border-radius: 0.25rem;
}

.eoos__message.is-success {
  background: #ecfdf3;
  color: #027a48;
}

.eoos__message.is-error {
  background: #fef3f2;
  color: #b42318;
}

html.eoos-modal-open {
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .eoos__modal,
  .eoos__dialog {
    transition: none;
  }
}

/* Hide default WooCommerce / Elementor out-of-stock UI on single product pages. */
body.ezwp-oos-product .stock,
body.ezwp-oos-product .woocommerce-variation-availability,
body.ezwp-oos-product form.cart,
body.ezwp-oos-product .woocommerce-grouped-product-list,
body.ezwp-oos-product .single_add_to_cart_button,
body.ezwp-oos-product .quantity,
body.ezwp-oos-product .elementor-widget-woocommerce-product-add-to-cart,
body.ezwp-oos-product .elementor-widget-woocommerce-product-stock,
body.ezwp-oos-product .elementor-widget-wc-add-to-cart,
body.ezwp-oos-product .e-add-to-cart,
body.ezwp-oos-product .woocommerce-notices-wrapper .woocommerce-error,
body.ezwp-oos-product .product .cart {
  display: none !important;
}

body.ezwp-oos-product .eoos,
body.ezwp-oos-product .eoos__notice,
body.ezwp-oos-product .eoos__toggle-wrap {
  display: block;
}

body.ezwp-oos-product .eoos__toggle,
body.ezwp-oos-product .eoos__toggle.button,
body.ezwp-oos-product .eoos__toggle.button.alt {
  display: inline-flex;
  align-items: center;
}

/* —— Loop purchase pill (Elementor widget) —— */
.eoos-pill {
  --eoos-pill-bg: #e8f4fd;
  --eoos-pill-color: #1e3a5f;
  --eoos-pill-badge: #c5e4f7;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.55rem 0.55rem 0.55rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--eoos-pill-bg);
  color: var(--eoos-pill-color);
  font-weight: 700;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.eoos-pill:hover,
.eoos-pill:focus {
  background: var(--eoos-pill-bg);
  color: var(--eoos-pill-color);
  text-decoration: none;
}

.eoos-pill__label {
  flex: 1 1 auto;
  min-width: 0;
}

.eoos-pill__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--eoos-pill-badge);
  color: inherit;
}

.eoos-pill__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  line-height: 1;
}

.eoos-pill__icon svg,
.eoos-pill__icon i {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  font-size: 1.1rem;
}

.eoos-pill--ficha {
  padding-right: 1.25rem;
}

.eoos-pill.loading {
  opacity: 0.7;
  pointer-events: none;
}

/* —— Single product in-stock skin (native Woo / Elementor ATC) —— */
body.single-product:not(.ezwp-oos-product) form.cart,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

body.single-product:not(.ezwp-oos-product) form.cart .quantity,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .quantity {
  display: inline-flex;
  align-items: center;
  margin: 0;
  border: 1.5px solid var(--eoos-pill-color, #1e3a5f);
  border-radius: 0.65rem;
  background: #fff;
  overflow: hidden;
}

body.single-product:not(.ezwp-oos-product) form.cart .quantity .qty,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .quantity .qty {
  width: 2.5rem;
  min-width: 2.5rem;
  margin: 0;
  padding: 0.55rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--eoos-pill-color, #1e3a5f);
  font-weight: 600;
  text-align: center;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

body.single-product:not(.ezwp-oos-product) form.cart .quantity .qty::-webkit-outer-spin-button,
body.single-product:not(.ezwp-oos-product) form.cart .quantity .qty::-webkit-inner-spin-button,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .quantity .qty::-webkit-outer-spin-button,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .quantity .qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.single-product:not(.ezwp-oos-product) form.cart .quantity .minus,
body.single-product:not(.ezwp-oos-product) form.cart .quantity .plus,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .quantity .minus,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .quantity .plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  min-height: 2.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--eoos-pill-color, #1e3a5f);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

body.single-product:not(.ezwp-oos-product) form.cart .single_add_to_cart_button,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .single_add_to_cart_button {
  --eoos-pill-bg: #e8f4fd;
  --eoos-pill-color: #1e3a5f;
  --eoos-pill-badge: #c5e4f7;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 12rem;
  min-height: 2.85rem;
  margin: 0;
  padding: 0.55rem 3.4rem 0.55rem 1.25rem;
  border: 0;
  border-radius: 999px;
  background: var(--eoos-pill-bg) !important;
  color: var(--eoos-pill-color) !important;
  font-weight: 700;
  text-align: left;
  box-shadow: none;
}

body.single-product:not(.ezwp-oos-product) form.cart .single_add_to_cart_button::after,
body.single-product:not(.ezwp-oos-product) .elementor-widget-woocommerce-product-add-to-cart form.cart .single_add_to_cart_button::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 0.45rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background-color: var(--eoos-pill-badge);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e3a5f' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 1.1rem 1.1rem;
  transform: translateY(-50%);
}
