/* "Извести ме" dialog (Back In Stock Notifier: its own .cwg-modal-overlay or, when the plugin uses SweetAlert2,
   .swal2-container marked .mac-restock-swal by restock-modal.js; .mac-restock-box/.mac-restock-close are added to both) in the cart drawer and
   mobile menu language: a grey #E9E7E7 panel, heavy black title, round close button with a
   black fill, an animated bell (like the top bar van), white fields and the pink button whose
   white layer rises on hover. The plugin keeps its markup and behavior; restock-modal.js only
   adds the bell, a short line, the product preview and a note. Phones: a sheet from below. */
body :is(.cwg-modal-overlay, .mac-restock-swal) {
  padding: 16px;
  background: rgba(0, 0, 0, .28) !important;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity .35s ease;
}

body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-box {
  box-sizing: border-box;
  width: min(480px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0 !important;
  overflow: auto;
  border: 0;
  border-radius: 32px !important;
  background: #E9E7E7;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .18) !important;
  color: #000;
  font-family: "Montserrat", Arial, sans-serif;
  transform: translate3d(0, 22px, 0) scale(.98) !important;
  transition: transform .6s cubic-bezier(.7, 0, .2, 1) !important;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
body :is(.cwg-modal-overlay.cwg-modal-visible, .mac-restock-swal.swal2-backdrop-show) .mac-restock-box { transform: none !important; }

/* Close: the cart drawer's round outline button; a black layer rises on hover. */
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-close {
  position: absolute;
  top: 26px;
  right: 26px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid #ddd3d5;
  border-radius: 50%;
  background: transparent;
  color: #000;
  font: 400 24px/1 "Montserrat", Arial, sans-serif;
  cursor: pointer;
  transition: color .32s ease, border-color .32s ease;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-close::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #000;
  transform: translate3d(0, 105%, 0);
  transition: transform .56s cubic-bezier(.3, 1, .3, 1);
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-close:is(:hover, :focus-visible) { border-color: #000; outline: none; background: transparent; color: #fff; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-close:is(:hover, :focus-visible)::before { transform: none; }

/* Plugin wrappers (Bootstrap panel, rows, columns) become plain blocks. */
body :is(.cwg-modal-overlay, .mac-restock-swal) :is(.cwg-modal-content, .swal2-content, .swal2-html-container, .cwginstock-subscribe-form, .cwginstock-panel-primary, .cwginstock-panel-body, .row, [class*="col-md-"]) {
  float: none;
  width: auto;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  color: #000;
  font-family: "Montserrat", Arial, sans-serif;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-box .cwginstock-subscribe-form { display: block; }

/* Header: bell, title and a short line, separated like the cart drawer header. */
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .panel-heading.cwginstock-panel-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 16px;
  row-gap: 6px;
  align-items: center;
  padding: 30px 86px 24px 30px;
  border: 0;
  border-bottom: 1px solid #e5dedf;
  border-radius: 0;
  background: transparent !important;
  color: #000;
  text-align: left;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwginstock-panel-heading h4 {
  grid-column: 2;
  margin: 0;
  color: #000 !important;
  font: 900 clamp(19px, 2vw, 23px)/1.12 "Montserrat", Arial, sans-serif;
  letter-spacing: -.04em;
  text-align: left !important;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__icon {
  grid-row: 1 / span 2;
  grid-column: 1;
  position: relative;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .06);
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__icon svg { width: 34px; height: 34px; overflow: visible; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__icon svg * { stroke: #000; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__bell { transform-box: view-box; transform-origin: 20px 7px; animation: mac-restock-ring 2.6s ease-in-out infinite; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__bell-body { fill: #EDA5C8; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__clapper { fill: #000; stroke: none !important; transform-box: view-box; transform-origin: 20px 28px; animation: mac-restock-clapper 2.6s ease-in-out infinite; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__wave { fill: none; opacity: 0; animation: mac-restock-wave 2.6s ease-out infinite; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__wave--right { animation-delay: .08s; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__check { fill: none; stroke-width: 2.4 !important; stroke-dasharray: 26; stroke-dashoffset: 26; opacity: 0; }
@keyframes mac-restock-ring {
  0%, 52%, 100% { transform: rotate(0); }
  6% { transform: rotate(16deg); }
  14% { transform: rotate(-13deg); }
  22% { transform: rotate(9deg); }
  30% { transform: rotate(-6deg); }
  38% { transform: rotate(3deg); }
  46% { transform: rotate(-1deg); }
}
@keyframes mac-restock-clapper {
  0%, 52%, 100% { transform: translateX(0); }
  6% { transform: translateX(-2.4px); }
  14% { transform: translateX(2px); }
  22% { transform: translateX(-1.4px); }
  30% { transform: translateX(1px); }
}
@keyframes mac-restock-wave {
  0%, 4% { opacity: 0; transform: scale(.7); }
  12% { opacity: 1; }
  36%, 100% { opacity: 0; transform: scale(1.15); }
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__wave { transform-box: view-box; transform-origin: 20px 18px; }

/* After a successful sign-up the bell gives way to a drawn check mark. */
body :is(.cwg-modal-overlay, .mac-restock-swal).is-done .mac-restock__icon { background: #EDA5C8; transition: background-color .4s ease; }
body :is(.cwg-modal-overlay, .mac-restock-swal).is-done :is(.mac-restock__bell, .mac-restock__wave) { opacity: 0; animation: none; transition: opacity .2s ease; }
body :is(.cwg-modal-overlay, .mac-restock-swal).is-done .mac-restock__check { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .5s .15s cubic-bezier(.3, 1, .3, 1), opacity .1s .15s; }

body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__sub {
  grid-column: 2;
  margin: 0;
  color: #5f5559;
  font: 500 13px/1.45 "Montserrat", Arial, sans-serif;
}

body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-panel-body { padding: 22px 30px 28px !important; }

/* Product preview: the item the shopper is waiting for. */
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__product {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin: 0 0 16px;
  padding: 9px 16px 9px 9px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .62);
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__product img { display: block; width: 58px; height: 58px; border-radius: 14px; background: #fff; object-fit: contain; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__product-text { min-width: 0; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__brand {
  display: block;
  overflow: hidden;
  margin: 0 0 3px;
  color: #b2477d;
  font: 700 11px/1.2 "Montserrat", Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__name {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #000;
  font: 700 13px/1.3 "Montserrat", Arial, sans-serif;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* Fields: white pills with a person / envelope icon, as calm as the cart note field. */
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form__form .form-group { margin: 0 0 12px; text-align: center; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email) {
  box-sizing: border-box;
  display: block;
  width: 100% !important;
  height: 56px;
  min-height: 56px;
  margin: 0;
  padding: 0 20px 0 52px;
  border: 1.5px solid #fff;
  border-radius: 999px;
  background: #fff no-repeat 20px center / 20px 20px;
  color: #000;
  font: 500 15px/1.2 "Montserrat", Arial, sans-serif;
  text-align: left !important;
  box-shadow: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form input.cwgstock_name {
  margin-bottom: 10px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4' fill='%23F8E9EE'/%3E%3Cpath d='M4.5 20c1.2-3.6 4-5.5 7.5-5.5s6.3 1.9 7.5 5.5'/%3E%3C/svg%3E");
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form input.cwgstock_email {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5.5' width='18' height='13' rx='2.5' fill='%23F8E9EE'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email)::placeholder { color: #8a8186; opacity: 1; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email):focus {
  border-color: #EDA5C8;
  outline: none;
  box-shadow: 0 0 0 4px rgba(237, 165, 200, .3);
}

/* Submit: pink pill like "КЪМ ПОРЪЧКА"; a white layer rises from below on hover. */
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwgstock_button {
  position: relative;
  box-sizing: border-box;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  margin: 4px 0 0;
  padding: 12px 20px;
  overflow: hidden;
  isolation: isolate;
  border: 1.5px solid #EDA5C8;
  border-radius: 999px;
  background: #EDA5C8;
  box-shadow: none;
  color: #000;
  font: 800 13px/1.2 "Montserrat", Arial, sans-serif;
  letter-spacing: .02em;
  text-align: center;
  text-transform: uppercase;
  cursor: pointer;
  transform: none;
  transition: color .32s ease, border-color .32s ease;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwgstock_button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: #fff;
  transform: translate3d(0, 105%, 0);
  pointer-events: none;
  transition: transform .56s cubic-bezier(.3, 1, .3, 1);
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwgstock_button:is(:hover, :focus-visible) {
  border-color: #EDA5C8;
  outline: none;
  background: #EDA5C8;
  color: #000;
  transform: none;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwgstock_button:is(:hover, :focus-visible)::before { transform: none; }

body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__note {
  margin: 14px 0 0;
  color: #777;
  font: 500 12px/1.4 "Montserrat", Arial, sans-serif;
  text-align: center;
}

/* Plugin messages (inline colors replaced): green for success, brand red for errors. */
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwgstock_output { margin-top: 12px; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwgstock_output:empty { display: none !important; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwgstock_output > div {
  padding: 12px 16px;
  border-radius: 16px;
  font: 600 13px/1.45 "Montserrat", Arial, sans-serif;
  text-align: center;
}
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwgstock_output .cwginstocksuccess { background: #def1e9; color: #1f5b45 !important; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwgstock_output .cwginstockerror { background: #FCE4EF; color: #B0306A !important; }

/* Phones: a sheet that slides up from the bottom, with a grab handle. */
@media (max-width: 600px) {
  body :is(.cwg-modal-overlay, .mac-restock-swal) { align-items: flex-end; padding: 0; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: calc(100dvh - 24px);
    margin: 0;
    padding-bottom: env(safe-area-inset-bottom) !important;
    border-radius: 28px 28px 0 0 !important;
    transform: translate3d(0, 102%, 0) !important;
  }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-box::before {
    content: "";
    position: absolute;
    top: 9px;
    left: 50%;
    width: 42px;
    height: 4px;
    margin-left: -21px;
    border-radius: 4px;
    background: #cfc7ca;
  }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-close { top: 22px; right: 18px; width: 39px; height: 39px; font-size: 21px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .panel-heading.cwginstock-panel-heading { column-gap: 13px; padding: 28px 70px 20px 20px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__icon { width: 50px; height: 50px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__icon svg { width: 30px; height: 30px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwginstock-panel-heading h4 { font-size: 18px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock__sub { font-size: 12px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-panel-body { padding: 18px 20px 24px !important; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email) { height: 52px; min-height: 52px; font-size: 16px; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .cwgstock_button { min-height: 54px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  body :is(.cwg-modal-overlay, .mac-restock-swal) .mac-restock-box { transition: none !important; }
  body :is(.cwg-modal-overlay, .mac-restock-swal) :is(.mac-restock__bell, .mac-restock__clapper, .mac-restock__wave) { animation: none !important; }
}

/* Back In Stock popup: override Bootstrap panel-primary heading colors (moved here from Customizer → Additional CSS). */
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .panel-primary > .panel-heading { background-color:#faf5f8; border-color:#f0e7ed; color:#241a22; }
body :is(.cwg-modal-overlay, .mac-restock-swal) .cwginstock-subscribe-form .panel-primary > .panel-heading h4 { color:#241a22; }

/* SweetAlert2 mode: drop its empty header parts, padding, fixed width and animation so the panel above takes over. */
body .mac-restock-swal { z-index: 100000; }
body .mac-restock-swal .swal2-popup.mac-restock-box { display: block !important; grid-template-columns: none; font-size: inherit; }
body .mac-restock-swal :is(.swal2-progress-steps, .swal2-icon, .swal2-image, .swal2-title, .swal2-actions, .swal2-footer, .swal2-timer-progress-bar-container, .swal2-validation-message) { display: none !important; }
body .mac-restock-swal :is(.swal2-header, .swal2-content, .swal2-html-container) { display: block; margin: 0 !important; padding: 0 !important; text-align: left; font-size: inherit; overflow: visible; }
body .mac-restock-swal .swal2-close.mac-restock-close { display: grid; margin: 0; line-height: 1; justify-self: auto; box-shadow: none; }

/* The plugin's inline form on an out-of-stock product page: the same panel, fields and button as the dialog. */
body .mac-product-purchase .cwginstock-subscribe-form { display: block; margin: 8px 0 0; padding: 0; border: 0; border-radius: 28px; background: #E9E7E7; color: #000; font-family: "Montserrat", Arial, sans-serif; }
body .mac-product-purchase .cwginstock-subscribe-form :is(.cwginstock-panel-primary, .cwginstock-panel-body, .row, [class*="col-md-"]) { float: none; width: auto; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0; background: transparent !important; box-shadow: none !important; }
body .mac-product-purchase .cwginstock-subscribe-form .panel-heading.cwginstock-panel-heading { padding: 24px 26px 18px; border: 0; border-bottom: 1px solid #ddd3d5; border-radius: 0; background: transparent !important; color: #000; text-align: left; }
body .mac-product-purchase .cwginstock-subscribe-form .cwginstock-panel-heading h4 { margin: 0; color: #000 !important; font: 900 20px/1.15 "Montserrat", Arial, sans-serif; letter-spacing: -.03em; text-align: left !important; }
body .mac-product-purchase .cwginstock-subscribe-form .cwginstock-panel-body { padding: 18px 26px 24px !important; }
body .mac-product-purchase .cwginstock-subscribe-form .form-group { margin: 0 0 10px; text-align: center; }
body .mac-product-purchase .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email) { box-sizing: border-box; display: block; width: 100% !important; height: 54px; margin: 0 0 10px; padding: 0 20px; border: 1.5px solid #fff; border-radius: 999px; background: #fff; color: #000; font: 500 15px/1.2 "Montserrat", Arial, sans-serif; text-align: left !important; box-shadow: none; }
body .mac-product-purchase .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email)::placeholder { color: #8a8186; opacity: 1; }
body .mac-product-purchase .cwginstock-subscribe-form :is(input.cwgstock_name, input.cwgstock_email):focus { border-color: #EDA5C8; outline: none; box-shadow: 0 0 0 4px rgba(237, 165, 200, .3); }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_button { position: relative; box-sizing: border-box; display: flex; width: 100%; min-height: 56px; align-items: center; justify-content: center; margin: 2px 0 0; padding: 12px 20px; overflow: hidden; isolation: isolate; border: 1.5px solid #EDA5C8; border-radius: 999px; background: #EDA5C8; box-shadow: none; color: #000; font: 800 13px/1.2 "Montserrat", Arial, sans-serif; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_button::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: #fff; transform: translate3d(0, 105%, 0); pointer-events: none; transition: transform .56s cubic-bezier(.3, 1, .3, 1); }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_button:is(:hover, :focus-visible) { outline: none; background: #EDA5C8; color: #000; }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_button:is(:hover, :focus-visible)::before { transform: none; }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_output:empty { display: none !important; }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_output > div { margin-top: 10px; padding: 12px 16px; border-radius: 16px; font: 600 13px/1.45 "Montserrat", Arial, sans-serif; text-align: center; }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_output .cwginstocksuccess { background: #def1e9; color: #1f5b45 !important; }
body .mac-product-purchase .cwginstock-subscribe-form .cwgstock_output .cwginstockerror { background: #FCE4EF; color: #B0306A !important; }
