.cms-builder-page .first-visit-modal,
.cms-builder-page .site[data-welcome-modal-editing="true"] {
  --welcome-modal-width: 680px;
}

.cms-builder-page .first-visit-modal[data-welcome-modal-size="small"],
.cms-builder-page .site[data-welcome-modal-editing="true"][data-welcome-modal-size="small"] {
  --welcome-modal-width: 480px;
}

.cms-builder-page .first-visit-modal[data-welcome-modal-size="large"],
.cms-builder-page .site[data-welcome-modal-editing="true"][data-welcome-modal-size="large"] {
  --welcome-modal-width: 900px;
}

.cms-builder-page .first-visit-modal {
  --site-pad: 0px;
  position: fixed;
  width: min(var(--welcome-modal-width), calc(100vw - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  box-sizing: border-box;
  padding: 56px 32px 32px;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: #fff;
  color: #183149;
  box-shadow: 0 24px 80px rgba(13, 30, 48, .3);
}

.cms-builder-page .first-visit-modal::backdrop {
  background: rgba(15, 30, 45, .68);
  backdrop-filter: blur(3px);
}

.cms-builder-page .first-visit-modal-close {
  position: sticky;
  z-index: 20;
  top: -44px;
  display: grid;
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  box-sizing: border-box;
  margin: -44px -20px 12px auto;
  padding: 0;
  place-items: center;
  appearance: none;
  border: 1px solid #e2e8ee;
  border-radius: 50%;
  background: #f7f9fb;
  color: #526477;
  box-shadow: none;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.cms-builder-page .first-visit-modal-close:hover {
  background: #eaf0f5;
  color: #183149;
  transform: none;
}

.cms-builder-page .first-visit-modal-close:focus:not(:focus-visible) {
  outline: none;
}

.cms-builder-page .first-visit-modal-close:focus-visible {
  outline: 2px solid #526477;
  outline-offset: 2px;
}

.cms-builder-page .first-visit-modal-close-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.cms-builder-page .first-visit-modal-close-icon::before,
.cms-builder-page .first-visit-modal-close-icon::after {
  position: absolute;
  top: 7px;
  left: 0;
  width: 16px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  content: "";
  transform: rotate(45deg);
}

.cms-builder-page .first-visit-modal-close-icon::after {
  transform: rotate(-45deg);
}

.cms-builder-page .site[data-welcome-modal-editing="true"] {
  position: relative;
  z-index: 1;
  display: flex;
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 100dvh;
  box-sizing: border-box;
  margin: 0;
  border: 0;
  box-shadow: none;
  flex-direction: column;
  justify-content: center;
  padding: 176px 20px 24px;
  overflow: visible;
  background: rgba(15, 30, 45, .72);
}

.cms-builder-page .site[data-welcome-modal-editing="true"] .site-content {
  --site-pad: 0px;
  flex: 0 0 auto;
  width: min(var(--welcome-modal-width), calc(100vw - 40px));
  max-width: none;
  max-height: none;
  min-height: 0;
  box-sizing: border-box;
  margin: auto;
  padding: 88px 24px;
  overflow: visible;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(13, 30, 48, .3);
}

.cms-builder-page .site[data-welcome-modal-editing="true"] .container-controls {
  width: max-content;
  max-width: 100%;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 4px;
  padding: 6px;
  border: 1px solid #d6e5ec;
  border-radius: 12px;
  background: #f5f9fc;
  box-shadow: 0 4px 12px rgba(13, 30, 48, .12);
}

.cms-builder-page .site[data-welcome-modal-editing="true"] .container-controls .section-insert-btn {
  display: inline-flex;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0;
}

.cms-builder-page .site[data-welcome-modal-editing="true"] .empty-section {
  min-height: 120px;
}

.cms-builder-page .first-visit-modal .section-divider,
.cms-builder-page .site[data-welcome-modal-editing="true"] .section-divider {
  left: 0;
  width: 100%;
}

.cms-builder-page .welcome-modal-editor-notice {
  position: fixed;
  z-index: 1200;
  top: 76px;
  left: 50%;
  display: grid;
  width: min(460px, calc(100vw - 24px));
  gap: 4px;
  box-sizing: border-box;
  padding: 12px 16px;
  transform: translateX(-50%);
  border: 1px solid #d6e5ec;
  border-radius: 12px;
  background: #fff;
  color: #183149;
  box-shadow: 0 6px 24px rgba(13, 30, 48, .14);
  font: 400 13px/1.45 system-ui, sans-serif;
}

.cms-builder-page .welcome-modal-editor-notice strong {
  font-size: 14px;
}

.cms-builder-page .welcome-modal-editor-notice a {
  color: #0875d1;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 640px) {
  .cms-builder-page .first-visit-modal {
    width: min(var(--welcome-modal-width), calc(100vw - 20px));
    max-height: calc(100dvh - 20px);
    padding: 56px 16px 20px;
    border-radius: 14px;
  }

  .cms-builder-page .first-visit-modal-close {
    margin-right: -4px;
  }

  .cms-builder-page .site[data-welcome-modal-editing="true"] {
    padding: 200px 10px 20px;
  }

  .cms-builder-page .site[data-welcome-modal-editing="true"] .site-content {
    width: min(var(--welcome-modal-width), calc(100vw - 20px));
    padding: 104px 16px;
    border-radius: 14px;
  }

  .cms-builder-page .welcome-modal-editor-notice {
    top: 72px;
  }
}
