/* Isolated styles. No modifications to theme typography or global buttons. */
.spm-overlay { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; box-sizing: border-box; padding: max(22px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); overflow-y: auto; overscroll-behavior: contain; }
.spm-overlay::before { content: ''; position: fixed; inset: 0; background: var(--spm-dim, #111827); opacity: var(--spm-opacity, .76); pointer-events: none; }
.spm-dialog { position: relative; flex: 0 1 var(--spm-width, 680px); max-width: min(100%, var(--spm-width, 680px)); max-height: calc(100dvh - 48px); margin: auto; outline: none; isolation: isolate; line-height: 1; filter: drop-shadow(0 24px 48px rgba(0,0,0,.32)); }
.spm-dialog picture, .spm-dialog .spm-image-link { display: block; line-height: 0; }
.spm-dialog .spm-image-link:focus-visible { outline: 3px solid #fff; outline-offset: 5px; border-radius: var(--spm-radius, 14px); }
.spm-dialog .spm-picture { display: block; width: 100%; max-height: calc(100dvh - 48px); height: auto; object-fit: contain; border-radius: var(--spm-radius, 14px); border: 0; box-shadow: 0 0 0 1px rgba(255,255,255,.12); background: rgba(255,255,255,.06); }
/* v1.1.3: preset styles and encapsulated close control.
   JS also applies critical inline values to withstand aggressive theme button CSS. */
.spm-overlay.spm-style-minimal .spm-dialog { filter: none; }
.spm-overlay.spm-style-minimal .spm-picture { box-shadow: none; }
.spm-overlay.spm-style-classic .spm-dialog { filter: drop-shadow(0 16px 32px rgba(0,0,0,.23)); }
.spm-overlay.spm-style-classic .spm-picture { box-shadow: 0 0 0 1px rgba(255,255,255,.28); }
.spm-overlay.spm-style-editorial .spm-dialog { filter: drop-shadow(0 10px 24px rgba(0,0,0,.13)); }
.spm-overlay.spm-style-editorial .spm-picture { outline: 1px solid rgba(209,218,229,.9); outline-offset: -1px; }
.spm-overlay.spm-style-promotional .spm-dialog { filter: drop-shadow(0 20px 46px rgba(0,0,0,.28)); }
.spm-overlay.spm-style-promotional .spm-picture { box-shadow: 0 0 0 2px rgba(255,255,255,.72); }
.spm-overlay.spm-style-promotional .spm-content { background: linear-gradient(165deg,#fff 0%,#f0f6ff 100%); }
.spm-overlay .spm-dialog > button.spm-close {
  -webkit-appearance: none !important;
  appearance: none !important;
  position: absolute !important;
  top: 14px !important;
  right: 14px !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 100 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  max-width: 40px !important;
  min-height: 40px !important;
  max-height: 40px !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--spm-close-color,#243447) !important;
  opacity: .96 !important;
  visibility: visible !important;
  line-height: 0 !important;
  font-size: 0 !important;
  text-decoration: none !important;
  text-align: center !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  box-shadow: none !important;
  transition: opacity .14s ease, transform .14s ease !important;
}
.spm-overlay .spm-dialog > button.spm-close:hover { opacity: 1 !important; }
.spm-overlay .spm-dialog > button.spm-close:focus-visible { outline: 2px solid rgba(47,101,170,.65) !important; outline-offset: 2px !important; }
.spm-overlay .spm-dialog > button.spm-close svg {
  display: block !important;
  flex: none !important;
  width: var(--spm-close-icon-size,18px) !important;
  height: var(--spm-close-icon-size,18px) !important;
  margin: 0 !important;
  padding: 0 !important;
  stroke: var(--spm-close-color,#243447) !important;
  fill: none !important;
  pointer-events: none !important;
}
.spm-overlay .spm-dialog > button.spm-close svg path {
  stroke: var(--spm-close-color,#243447) !important;
  fill: none !important;
  stroke-width: 2.2 !important;
  stroke-linecap: round !important;
}
.spm-open-button { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; padding: 12px 18px; background: #16273d; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.spm-open-button:focus-visible { outline: 3px solid #e89939; outline-offset: 3px; }
@keyframes spm-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spm-zoom { from { opacity: 0; transform: scale(.94) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes spm-slide { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
.spm-overlay.spm-animation-fade { animation: spm-fade .23s ease-out both; }
.spm-animation-zoom .spm-dialog { animation: spm-zoom .28s cubic-bezier(.18,.9,.21,1) both; }
.spm-animation-slide .spm-dialog { animation: spm-slide .30s cubic-bezier(.18,.9,.21,1) both; }
.spm-overlay.spm-no-motion, .spm-overlay.spm-no-motion .spm-dialog { animation: none !important; transition: none !important; }
@media(max-width:767px) { .spm-overlay { padding: 30px 12px; } .spm-dialog { flex-basis: min(92vw, var(--spm-width, 680px)); max-height: calc(100dvh - 60px); } .spm-dialog .spm-picture { max-height: calc(100dvh - 60px); }  }
@media(prefers-reduced-motion:reduce) { .spm-overlay, .spm-overlay .spm-dialog, .spm-close { animation: none !important; transition: none !important; } }
/* v1.1.1 Premium — opt-in editorial layouts, without changing WooCommerce/theme controls */
.spm-overlay.spm-position-bottom-right { align-items: flex-end; justify-content: flex-end; }
.spm-overlay.spm-position-bottom-left { align-items: flex-end; justify-content: flex-start; }
.spm-position-bottom-right .spm-dialog,.spm-position-bottom-left .spm-dialog { flex-grow: 0; margin: 0 5px 7px; }
.spm-content { background: #fff; border-radius: 0 0 var(--spm-radius,14px) var(--spm-radius,14px); padding: clamp(16px,3vw,28px); color:#1b2938; font: 400 15px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; box-shadow: 0 18px 40px rgba(0,0,0,.16); text-align: center; }
.spm-content .spm-headline { font: 750 clamp(20px,3vw,29px)/1.2 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; margin: 0 0 9px; color:#152c42; }
.spm-content .spm-copy { white-space: pre-line; margin: 0 0 14px; color:#465567; }
.spm-content .spm-coupon { font: 750 18px/1.4 ui-monospace,SFMono-Regular,Consolas,monospace; color:#113f74; background:#edf6ff; border:2px dashed #87b7e4; padding:11px 18px; border-radius:10px; cursor:pointer; margin: 0 0 14px; max-width:100%; overflow-wrap:anywhere; }
.spm-content .spm-cta { display: inline-flex; justify-content:center; align-items:center; gap:8px; min-height:44px; border-radius:10px; padding:10px 23px; background: var(--spm-cta-color,#1f6feb); color:#fff !important; text-decoration:none !important; font-weight:700; box-sizing:border-box; }
.spm-content .spm-cta:hover { filter:brightness(.91); }
.spm-content .spm-cta:focus-visible,.spm-coupon:focus-visible { outline:3px solid #ffb446; outline-offset:3px; }
.spm-dialog:has(.spm-content) .spm-picture { border-radius: var(--spm-radius,14px) var(--spm-radius,14px) 0 0; }

@media(max-width:767px) {
 .spm-dialog { flex-basis: min(92vw,var(--spm-mobile-width,360px)); max-width: min(92vw,var(--spm-mobile-width,360px)); }
 .spm-position-bottom-right .spm-dialog,.spm-position-bottom-left .spm-dialog { margin:0 auto 4px; }
 .spm-content { padding:14px 15px; }
 .spm-content .spm-headline { font-size:20px; }
}
