.hsdm-gateway{display:flex;flex-direction:column;align-items:center;gap:16px;text-align:center;padding:24px;border:1px solid #e3e3e3;border-radius:12px}
.hsdm-gateway__title{font-size:1.15em;font-weight:700}
.hsdm-gateway__countdown{font-size:3rem;font-weight:800;line-height:1}
.hsdm-gateway__countdown[hidden]{display:none!important}
.hsdm-gateway__button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:min(320px,100%);min-height:46px;text-align:center;text-decoration:none!important;padding:11px 24px;border:1px solid #10733b;border-radius:10px;background:#168447;color:#fff!important;font-weight:700;box-shadow:0 6px 18px rgba(22,132,71,.18);transition:background .15s ease,box-shadow .15s ease,transform .15s ease}
.hsdm-gateway__button:hover,.hsdm-gateway__button:focus{background:#10733b;color:#fff!important;box-shadow:0 8px 22px rgba(22,132,71,.24);transform:translateY(-1px)}
.hsdm-gateway__button.is-disabled,.hsdm-gateway__button[aria-disabled="true"]{opacity:.45;pointer-events:none}
.hsdm-history__button{display:inline-block;text-decoration:none;padding:10px 18px;border-radius:8px;background:#222;color:#fff}
.hsdm-history-wrap{overflow-x:auto}
.hsdm-history{width:100%;border-collapse:collapse}
.hsdm-history th,.hsdm-history td{padding:12px;border-bottom:1px solid #e8e8e8;text-align:start}
.hsdm-message{padding:14px 16px;border:1px solid #ddd;border-radius:8px}
.hsdm-error{border-color:#d63638}

/* Popup gateway - v1.4.1: early click interception + policy-aware download badge. */
html.hsdm-popup-open,body.hsdm-popup-open{overflow:hidden!important}
.hsdm-popup-style-scope{display:contents}
.hsdm-popup-overlay{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.68);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.hsdm-popup-overlay.hsdm-popup-is-preparing{visibility:hidden!important;pointer-events:none!important}
.hsdm-popup-dialog{position:relative;display:flex;flex-direction:column;width:min(var(--hsdm-popup-width,900px),calc(100vw - 48px));height:min(var(--hsdm-popup-height,88dvh),calc(100dvh - 48px));max-height:calc(100dvh - 48px);min-height:260px;background:#fff;border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.32);overflow:hidden;isolation:isolate}
.hsdm-popup-content{position:relative;display:flex;flex:1 1 auto;min-height:0;width:100%;overflow:hidden;background:#fff;flex-direction:column;--hsdm-popup-top-spacing:12px;--hsdm-popup-content-gap:0px}

/* The countdown/header is a real flex row with its own opaque background. It never floats over ads. */
.hsdm-popup-live-layer{position:relative;z-index:3;flex:0 0 auto;display:flex;align-items:flex-start;justify-content:center;box-sizing:border-box;width:100%;padding:var(--hsdm-popup-top-spacing,12px) 24px var(--hsdm-popup-content-gap,0px);background:#fff;pointer-events:none}
.hsdm-popup-live-gateway.hsdm-gateway{pointer-events:auto;width:min(620px,calc(100% - 32px));max-width:100%;height:auto;min-height:0;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;text-align:center;gap:10px;padding:0 18px;border:0!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:#30343b;margin:0 auto}
.hsdm-popup-live-gateway__action-slot{display:grid;grid-template-columns:minmax(0,1fr);place-items:center;width:100%;min-height:46px;box-sizing:border-box}
.hsdm-popup-live-gateway__action-slot>*{grid-area:1/1}
.hsdm-popup-live-gateway__spinner{z-index:2;width:38px;height:38px;flex:0 0 38px;border:3px solid #e8e8e8;border-top-color:#444;border-radius:50%;animation:hsdm-spin .8s linear infinite;opacity:1;visibility:visible;transition:opacity .18s ease,visibility .18s ease}
.hsdm-popup-live-gateway__spinner.is-finished{opacity:0;visibility:hidden;animation-play-state:paused;pointer-events:none}
.hsdm-popup-live-gateway__spinner[hidden]{display:none!important}
.hsdm-popup-live-gateway__title{font-size:16px;font-weight:700;max-width:680px;height:auto;min-height:0;line-height:1.5;white-space:normal;overflow:visible;text-overflow:clip}
.hsdm-popup-live-gateway__status{font-size:14px;line-height:1.7;height:auto;min-height:0;color:#555;white-space:normal;overflow:visible;text-overflow:clip}
.hsdm-popup-live-gateway__countdown{font-size:54px;line-height:1;font-weight:800;font-variant-numeric:tabular-nums;margin:0;height:auto;min-height:0}
.hsdm-popup-live-gateway__countdown.is-finished{visibility:hidden}
.hsdm-popup-live-gateway__countdown[hidden]{display:none!important}
.hsdm-popup-live-gateway__button-slot{display:none;height:auto;min-height:0;align-items:center;justify-content:center;width:100%}
.hsdm-popup-live-gateway.is-ready .hsdm-popup-live-gateway__button-slot{display:flex}
.hsdm-popup-live-gateway__button{z-index:1;width:min(340px,100%);min-width:240px;min-height:46px;border:1px solid #10733b;border-radius:10px;background:#168447;color:#fff!important;padding:11px 28px;font:700 14px/1.4 inherit;text-decoration:none!important;cursor:pointer;box-shadow:0 7px 20px rgba(22,132,71,.22);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .18s ease,visibility .18s ease,background .15s ease,box-shadow .15s ease,transform .15s ease}
.hsdm-popup-live-gateway__button.is-ready{z-index:3;opacity:1;visibility:visible;pointer-events:auto}
.hsdm-popup-live-gateway__button:hover,.hsdm-popup-live-gateway__button:focus{background:#10733b;color:#fff!important;box-shadow:0 9px 24px rgba(22,132,71,.28);transform:translateY(-1px);outline:2px solid rgba(22,132,71,.20);outline-offset:2px}
.hsdm-popup-live-gateway__hint{display:none!important}
.hsdm-popup-live-gateway__title.is-placeholder,.hsdm-popup-live-gateway__countdown.is-placeholder,.hsdm-popup-live-gateway__hint.is-placeholder{visibility:hidden}
.hsdm-popup-live-gateway.is-error .hsdm-popup-live-gateway__status{display:flex;flex-direction:column;align-items:center;gap:14px;height:auto;min-height:24px;white-space:normal}
.hsdm-popup-error__icon{display:grid;place-items:center;width:50px;height:50px;border-radius:50%;background:#fff1f1;color:#c62828;font-size:28px;font-weight:800}
.hsdm-popup-error__text{max-width:620px;line-height:1.9}
.hsdm-popup-error__button{display:inline-block;padding:10px 18px;border-radius:9px;background:#222;color:#fff;text-decoration:none}

.hsdm-popup-download-count{--hsdm-download-count-x:14px;--hsdm-download-count-y:14px;position:absolute;z-index:12;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:48px;min-height:30px;box-sizing:border-box;padding:5px 10px;border-radius:999px;background:rgba(20,20,20,.82);color:#fff;font:700 13px/1.2 inherit;font-variant-numeric:tabular-nums;direction:rtl;box-shadow:0 4px 14px rgba(0,0,0,.16);pointer-events:none}
.hsdm-popup-download-count[hidden]{display:none!important}
.hsdm-popup-download-count__label[hidden]{display:none!important}
.hsdm-popup-download-count__value{direction:ltr;unicode-bidi:isolate}
.hsdm-popup-download-count.is-top-right{top:var(--hsdm-download-count-y);right:var(--hsdm-download-count-x)}
.hsdm-popup-download-count.is-top-left{top:var(--hsdm-download-count-y);left:var(--hsdm-download-count-x)}
.hsdm-popup-download-count.is-bottom-right{bottom:var(--hsdm-download-count-y);right:var(--hsdm-download-count-x)}
.hsdm-popup-download-count.is-bottom-left{bottom:var(--hsdm-download-count-y);left:var(--hsdm-download-count-x)}

/* Only the Elementor/ad area scrolls, and only when its content really needs it. */
.hsdm-popup-fragment{position:relative;z-index:1;flex:1 1 auto;min-height:0;width:100%;overflow:auto;overscroll-behavior:contain;background:#fff;padding:0 0 4px;box-sizing:border-box;-webkit-overflow-scrolling:touch;opacity:0;transition:opacity .18s ease}
.hsdm-popup-fragment.is-ready{opacity:1}
.hsdm-popup-fragment-warning{max-width:620px;margin:12px auto;padding:10px 14px;text-align:center;color:#777;font-size:12px}

/* Close control is intentionally plain text, not a visual button. */
.hsdm-popup-close{position:relative;z-index:8;flex:0 0 auto;align-self:center;display:inline-block;min-width:0;height:auto;margin:8px auto 12px;padding:4px 8px;border:0;border-radius:0;background:transparent;color:#666;cursor:pointer;box-shadow:none;appearance:none;-webkit-appearance:none;font:500 13px/1.5 inherit;text-decoration:none;transition:color .15s ease}
.hsdm-popup-close:hover,.hsdm-popup-close:focus{background:transparent;color:#111;box-shadow:none;transform:none;text-decoration:underline;text-underline-offset:3px;outline:0}
.hsdm-popup-download-frame{position:fixed!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;border:0!important;inset:auto!important}
.hsdm-popup-gateway-placeholder{display:none!important}
.hsdm-popup-editor-preview{position:relative;display:flex;align-items:center;justify-content:center;width:100%;padding:16px;box-sizing:border-box;background:#f3f4f6;border:1px dashed #c8cdd4;border-radius:10px;overflow:auto}
.hsdm-popup-editor-preview .hsdm-popup-dialog{position:relative;max-width:100%;max-height:none;min-height:260px}
.hsdm-popup-editor-preview .hsdm-popup-fragment{min-height:80px}
.hsdm-popup-editor-preview .hsdm-popup-live-gateway__button-slot.is-editor-visible{display:flex}
.hsdm-popup-editor-preview .hsdm-popup-live-gateway__action-slot.is-editor-visible .hsdm-popup-live-gateway__spinner{opacity:0;visibility:hidden;animation-play-state:paused}
.hsdm-popup-editor-preview .hsdm-popup-live-gateway__button{opacity:1;visibility:visible;pointer-events:auto}
@keyframes hsdm-spin{to{transform:rotate(360deg)}}

@media (max-width:1024px){
  .hsdm-popup-overlay{padding:16px}
  .hsdm-popup-dialog{width:min(var(--hsdm-popup-width,900px),calc(100vw - 32px));height:min(var(--hsdm-popup-height,88dvh),calc(100dvh - 32px));max-height:calc(100dvh - 32px)}
  .hsdm-popup-live-layer{padding-left:18px;padding-right:18px}
}
@media (max-width:767px){
  .hsdm-popup-overlay{padding:8px}
  .hsdm-popup-dialog{width:calc(100vw - 16px);height:min(var(--hsdm-popup-mobile-height,72dvh),calc(100dvh - 16px));max-height:calc(100dvh - 16px);min-height:230px;border-radius:14px}
  .hsdm-popup-live-layer{padding-left:10px;padding-right:10px}
  .hsdm-popup-live-gateway.hsdm-gateway{width:min(520px,calc(100% - 8px));padding:0 8px;gap:8px}
  .hsdm-popup-close{height:auto;min-width:0;margin:6px auto max(8px,env(safe-area-inset-bottom));padding:4px 8px}
}
