/* FBT popup modal */
.yayboost-fbt-popup {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  margin: 0;
}

.yayboost-fbt-popup.is-open {
  display: flex;
}

.yayboost-fbt-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.yayboost-fbt-popup.is-open .yayboost-fbt-popup__overlay {
  opacity: 1;
}

.yayboost-fbt-popup__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(90vh, 900px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  padding: 24px;
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.yayboost-fbt-popup.is-open .yayboost-fbt-popup__dialog {
  transform: translateY(0);
  opacity: 1;
}

.yayboost-fbt-popup__close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: #666;
  cursor: pointer;
  padding: 5px 10px;
  z-index: 2;
  transition: color 0.2s ease;
}

.yayboost-fbt-popup__close:hover {
  color: #000;
}

.yayboost-fbt-popup__close:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.yayboost-fbt-popup__slot .yayboost-fbt {
  margin: 0;
}

/* In popup context: drop SP section chrome (top border + vertical padding). */
.yayboost-fbt-popup__slot .yayboost-fbt.fbt-section {
  padding: 0;
  border-top: none;
}

.yayboost-fbt-popup__slot .yayboost-fbt__title {
  padding-right: 48px;
}

@media (max-width: 640px) {
  .yayboost-fbt-popup__dialog {
    padding: 16px;
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yayboost-fbt-popup__overlay,
  .yayboost-fbt-popup__dialog {
    transition: none;
  }
}
