.shopacc-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.shopacc-popup.is-open,
.shopacc-popup.is-preview {
  display: flex;
}

.shopacc-popup-overlay {
  position: absolute;
  inset: 0;
  background: var(--pb-overlay, #000);
  opacity: var(--pb-overlay-opacity, 0.5);
}

.shopacc-popup-box {
  position: relative;
  z-index: 1;
  width: var(--pb-w, 400px);
  height: var(--pb-h, 550px);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  background: var(--pb-bg, #fff);
  border: var(--pb-bw, 5px) var(--pb-bs, solid) var(--pb-bc, #0573ff);
  border-radius: var(--pb-br, 15px);
  box-sizing: border-box;
  overflow: auto;
  text-align: center;
  /* Popup is tenant-authored content: its palette must not inherit the site's
     light/dark theme. Authors can still override this with popup custom CSS. */
  color: #222;
  font-family: Lexend, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
}

.shopacc-popup-legacy-theme .shopacc-popup-box {
  color: #000;
}

.shopacc-popup-content {
  padding: var(--pb-pad, 20px);
  box-sizing: border-box;
}

.shopacc-popup-content,
.shopacc-popup-content * {
  font-family: inherit;
}

/* Restore the browser defaults used by the public theme. DaisyUI/Tailwind
   removes these defaults in the admin, so they must live with the popup. */
.shopacc-popup-content h1,
.shopacc-popup-content h2,
.shopacc-popup-content h3,
.shopacc-popup-content h4,
.shopacc-popup-content h5,
.shopacc-popup-content h6 {
  display: block;
  font-family: inherit;
  font-weight: bold;
}

.shopacc-popup-content h1 { margin: 0.67em 0; font-size: 2em; }
.shopacc-popup-content h2 { margin: 0.83em 0; font-size: 1.5em; }
.shopacc-popup-content h3 { margin: 1em 0; font-size: 1.17em; }
.shopacc-popup-content h4 { margin: 1.33em 0; font-size: 1em; }
.shopacc-popup-content h5 { margin: 1.67em 0; font-size: 0.83em; }
.shopacc-popup-content h6 { margin: 2.33em 0; font-size: 0.67em; }

.shopacc-popup-content p {
  display: block;
  margin: 1em 0;
}

.shopacc-popup-content ul,
.shopacc-popup-content ol {
  display: block;
  margin: 1em 0;
  padding-left: 40px;
}

.shopacc-popup-content ul { list-style-type: disc; }
.shopacc-popup-content ol { list-style-type: decimal; }
.shopacc-popup-content li { display: list-item; }

.shopacc-popup-content a {
  color: inherit;
  text-decoration: none;
}

.shopacc-popup-content strong,
.shopacc-popup-content b { font-weight: bold; }
.shopacc-popup-content em,
.shopacc-popup-content i { font-style: italic; }
.shopacc-popup-content u { text-decoration: underline; }

.shopacc-popup-content img {
  max-width: 100%;
  height: auto;
  border: 0;
}

.shopacc-popup-close {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: #000;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.shopacc-popup-close:hover {
  opacity: 0.7;
}

@media (max-width: 768px) {
  .shopacc-popup-box {
    width: var(--pb-mw, 90%);
    height: var(--pb-mh, 450px);
  }
}

body.shopacc-popup-open {
  overflow: hidden;
}

.shopacc-popup-editor-canvas {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
  border-radius: 12px;
  background: #f7f7f7;
}

.shopacc-popup-editor-canvas .shopacc-popup {
  position: absolute;
  z-index: 1;
}

.shopacc-popup-editor-canvas .shopacc-popup-close {
  pointer-events: none;
}

.popup-editor-toolbar .tox-tinymce-inline {
  margin-bottom: 0.75rem;
}
