.ai1wpsa-swal {
  z-index: 99999 !important;

  .swal2-close {
    &:focus {
      background: transparent;
      color: inherit;
      box-shadow: none;
    }
  }

  .swal2-deny,
  .swal2-cancel {
    background-color: #f08080 !important;
  }

  .swal2-input {
    width: auto !important;
  }

  // Title
  .swal2-title {
    font-size: 1.2rem;
    font-weight: 500;
    position: absolute;
    top: -55px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  &:not(.eacf7-feedback-swal) {
    .swal2-title {
      color: #333;
    }
  }

  // Text
  .swal2-html-container {
    font-size: 1rem;
    color: #555;
  }

  .swal2-textarea {
    &:focus {
      border-color: #ddd !important;
      box-shadow: none !important;
    }
  }
}

// ─── Pro-feature upgrade modal (showProModal in src/js/includes/ProModal.js) ───
.ai1wpsa-pro-modal {

  &__popup {
    position: relative;
    border-radius: 20px;
    padding: 40px 32px 32px;
    background:
      radial-gradient(120% 90% at 50% 0%, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0) 55%),
      linear-gradient(180deg, #0e1526 0%, #0a0f1c 100%);
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  }

  .swal2-html-container {
    position: relative;
    z-index: 1;
  }

  .swal2-actions {
    position: relative;
    z-index: 1;
  }

  &__close {
    color: $color_black !important;
    position: absolute;
    top: 0;
    right: 0;

    &:hover,
    &:focus {
      color: $color_white !important;
      background: transparent !important;
      box-shadow: none !important;
    }
  }

  // Scattered star/sparkle decoration behind the icon
  &__stars {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;

    span {
      position: absolute;
      font-size: 16px;
      opacity: 0.55;
      filter: drop-shadow(0 0 4px rgba(255, 200, 80, 0.5));

      &:nth-child(1) { top: 18px;  left: 16%;  font-size: 14px; transform: rotate(-10deg); }
      &:nth-child(2) { top: 10px;  left: 32%;  font-size: 20px; transform: rotate(8deg); }
      &:nth-child(3) { top: 14px;  right: 30%; font-size: 22px; transform: rotate(-6deg); }
      &:nth-child(4) { top: 24px;  right: 14%; font-size: 14px; transform: rotate(12deg); }
      &:nth-child(5) { top: 46px;  left: 8%;   font-size: 12px; transform: rotate(4deg); }
    }
  }

  &__icon {
    position: relative;
    z-index: 1;
    width: 84px;
    height: 84px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 38px;
    background: #fff;
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06) inset,
      0 10px 30px rgba(59, 130, 246, 0.45);
  }

  &__title {
    position: relative;
    z-index: 1;
    margin: 0;
    color: $color_black;
    font-size: 1.6rem;
    font-weight: 800;
  }

  &__text {
    position: relative;
    z-index: 1;
    font-size: 1rem;
    color: $color_black;
    margin: 10px 0 0;
    line-height: 1.5;
  }

  &__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 40px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #4d8dff 0%, $color_primary 100%);
    color: $color_white !important;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease;
    box-shadow: 0 10px 24px rgba(0, 75, 203, 0.55);

    &:hover,
    &:focus {
      transform: translateY(-1px);
      box-shadow: 0 12px 28px rgba(0, 75, 203, 0.7);
      color: $color_white !important;
    }
  }
}

// ─── Sticky Class field + "Pick on Page" button (General.js) ───
.ai1wpsa-selector-field {
  display: flex;
  align-items: center;
  gap: 8px;

  .components-text-control__input {
    flex: 1;
  }

  button {
    white-space: nowrap;
    flex-shrink: 0;
  }
}

// ─── Sticky Header Background Image picker (General.js) ───
.ai1wpsa-media-picker {
  display: flex;
  align-items: center;
  gap: 10px;

  &__preview {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
  }
}

// ─── "Pick on Page" element picker modal (pickElementOnPage in src/js/includes/SelectorPicker.js) ───
.ai1wpsa-selector-picker-modal__popup {
  width: 92vw !important;
  max-width: 1100px;
}

.ai1wpsa-selector-picker {
  text-align: left;

  &__hint {
    margin: 0 0 12px;
    color: #555;
    font-size: 0.95rem;
  }

  &__frame-wrap {
    position: relative;
    height: 70vh;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
    background: #f5f5f5;
  }

  &__iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  &__fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: #fff;
    text-align: center;
    padding: 20px;
  }
}

.ai1wpsa-disabled {
  opacity: 0.5;
}

.bg-10 {
  background-color: #e8f0ff;
}

.bg-9 {
  background-color: #bed6ff;
}

.bg-8 {
  background-color: #94bbff;
}

.bg-7 {
  background-color: #6aa1ff;
}

.ai1wpsa-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;

  &.success {
    background-color: #d4edda;
    color: #155724;
  }

  &.error {
    background-color: #f8d7da;
    color: #721c24;
  }

  &.warning {
    background-color: #fff3cd;
    color: #856404;
  }

  &.info {
    background-color: #d1ecf1;
    color: #0c5460;
  }

  i {
    font-size: 20px;
  }

  p {
    margin: 0;
  }
}
