:root{
  --ssp-width: 500px;
  --ssp-max-width: 92vw;
  --ssp-max-height: 85vh;
  --ssp-overlay-bg: rgba(0,0,0,0.55);
  --ssp-radius: 8px;
  --ssp-padding: 32px;
  --ssp-bg: #ffffff;
  --ssp-text: #18181b;
}

@media (max-width: 640px){
  :root{
    --ssp-width: 100%;
    --ssp-max-width: 100vw;
    --ssp-max-height: 100vh;
  }
}

.ssp-overlay{
  position:fixed;
  inset:0;
  background:var(--ssp-overlay-bg);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:1000;
  padding:16px;
}
.ssp-overlay.is-open{display:flex;}

/* fixed-size shell: caps the popup, close button lives here so it never scrolls away */
.ssp-popup{
  position:relative;
  width:var(--ssp-width);
  max-width:var(--ssp-max-width);
  max-height:var(--ssp-max-height);
  background:var(--ssp-bg);
  border-radius:var(--ssp-radius);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}

/* scrollable body: only this part scrolls when content is long */
.ssp-body{
  overflow-y:auto;
  padding:var(--ssp-padding);
  color:var(--ssp-text);
}

.ssp-close{
  position:absolute;
  top:12px; right:12px;
  width:32px; height:32px;
  border-radius:50%;
  border:0;
  background:#f4f4f5;
  font-size:18px;
  line-height:1;
  cursor:pointer;
  z-index:1;
}
.ssp-close:hover{background:#e4e4e7;}
