/* =============================================================================
   Site Modal Manager — Frontend Styles
   Author: Juan Vasquez
   ============================================================================= */

/* ── Reset ───────────────────────────────────────────────────────────────────── */
.smm-overlay,
.smm-modal,
.smm-modal *,
.smm-modal *::before,
.smm-modal *::after {
  box-sizing: border-box;
}

/* ── Overlay ─────────────────────────────────────────────────────────────────── */
.smm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}

.smm-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

/* ── Modal ───────────────────────────────────────────────────────────────────── */
.smm-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -44%);
  z-index: 99991;
  /* width / max-width are set directly via inline style from PHP renderer.
     These act as safe fallbacks when no setting is saved yet. */
  width: 560px;
  max-width: 94vw;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: var(--smm-radius, 0);
  padding: var(--smm-padding, 36px 40px 32px);

  /* CSS custom props supplied inline from PHP */
  background: var(--smm-bg, #ffffff);
  color: var(--smm-text, #1a1a2e);
  border: var(--smm-border, none);

  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease;
}

.smm-modal.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
}

/* ── Close Button ────────────────────────────────────────────────────────────── */
.smm-modal__close {
  position: absolute;
  /* top / right / bottom / left are set via inline style by the PHP renderer */
  z-index: 10;
  background: none;
  border: none;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: var(--smm-close-color, inherit);
  opacity: 0.5;
  padding: 4px 6px;
  border-radius: 4px;
  transition: opacity .15s ease, background .15s ease;
}

.smm-modal__close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.smm-modal__close:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
  opacity: 1;
}

/* ── Body Content ────────────────────────────────────────────────────────────── */
.smm-modal__body {
  font-size: 15px;
  line-height: 1.65;
}

.smm-modal__body > *:first-child {
  margin-top: 0;
}

.smm-modal__body > *:last-child {
  margin-bottom: 0;
}

/* Gutenberg block base resets */
.smm-modal__body p         { margin: 0 0 1em; }
.smm-modal__body h1,
.smm-modal__body h2,
.smm-modal__body h3,
.smm-modal__body h4,
.smm-modal__body h5,
.smm-modal__body h6 { margin: 0 0 .6em; line-height: 1.3; }
.smm-modal__body ul,
.smm-modal__body ol        { padding-left: 1.4em; margin: 0 0 1em; }
.smm-modal__body img       { max-width: 100%; height: auto; }
.smm-modal__body a         { color: inherit; text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .smm-modal {
 
    width: 560px !important;
  }
}
