.smoothh-popup-modal[hidden] {
  display: none !important;
}

.smoothh-popup-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
}

.smoothh-popup-modal.is-open {
  display: block;
}

.smoothh-popup-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(22, 22, 22, 0.6);
  backdrop-filter: blur(4px);
}

.smoothh-popup-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  margin: 16px auto;
  padding: 32px;
  overflow-y: auto;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(22, 22, 22, 0.18);
}

.smoothh-popup-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(22, 22, 22, 0.08);
  color: #161616;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.smoothh-popup-modal__close:hover {
  transform: scale(1.04);
  background: rgba(22, 22, 22, 0.14);
}

.smoothh-popup-modal__title {
  margin: 0 48px 12px 0;
}

.smoothh-popup-modal__content {
  margin-bottom: 24px;
}

.smoothh-popup-modal__content > :first-child {
  margin-top: 0;
}

.smoothh-popup-modal__content > :last-child {
  margin-bottom: 0;
}

.smoothh-popup-modal__form > :first-child {
  margin-top: 0;
}

.smoothh-popup-modal__preview {
  padding: 16px;
  border: 1px dashed var(--wp--preset--color--fiolet, #41148c);
  border-radius: 16px;
  color: var(--wp--preset--color--fiolet, #41148c);
  background: rgba(65, 20, 140, 0.05);
}

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

@media (max-width: 781px) {
  .smoothh-popup-modal__dialog {
    width: calc(100vw - 90px);
    max-height: calc(100vh - 100px);
    margin: 24px;
    padding: 24px 20px;
    border-radius: 20px;
  }

  .smoothh-popup-modal__title {
    margin-right: 40px;
  }
}
