/* ===========================================================================
 * Popup promocional — modal centralizado sobre overlay escuro com blur.
 * Layout vertical: imagem horizontal no topo + conteúdo abaixo.
 * Paleta: azul + preto (base), badge vermelho, CTA amarelo.
 * Conteúdo editável via Options Page "Popups" (ver inc/acf.php).
 * ======================================================================== */

.rvb-popup-overlay {
  --rvb-pop-blue: #1533A3;
  --rvb-pop-blue-deep: #0c1f6b;
  --rvb-pop-red: #EE003B;
  --rvb-pop-yellow: #FFB100;
  --rvb-pop-ink: #17171D;

  position: fixed;
  inset: 0;
  z-index: 1090;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(8, 14, 40, 0.62);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  opacity: 0;
  transition: opacity .35s ease;
  pointer-events: none;
}

.rvb-popup-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Card ---------- */
.rvb-popup-balao {
  width: 440px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  transform: translateY(24px) scale(0.96);
  transition: transform .4s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.rvb-popup-overlay.is-visible .rvb-popup-balao {
  transform: translateY(0) scale(1);
}

.rvb-popup-balao__card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(8, 14, 40, 0.5);
}

/* ---------- Botão fechar ---------- */
.rvb-popup-balao__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 23, 29, 0.55);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: background .2s ease, transform .2s ease;
}

.rvb-popup-balao__close:hover {
  background: var(--rvb-pop-ink);
  transform: rotate(90deg);
}

/* ---------- Mídia (imagem horizontal no topo) ---------- */
.rvb-popup-balao__media {
  position: relative;
  background: linear-gradient(160deg, #eef3ff 0%, #d4e0ff 100%);
  padding: 20px;
}

.rvb-popup-balao__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(12, 31, 107, 0.28));
}

/* ---------- Corpo ---------- */
.rvb-popup-balao__body {
  padding: 22px 24px 24px;
}

.rvb-popup-balao__title {
  font-size: 26px;
  line-height: 1.12;
  font-weight: 800;
  margin: 0 0 7px;
  color: var(--rvb-pop-ink);
}

.rvb-popup-balao__title span {
  color: var(--rvb-pop-blue);
}

.rvb-popup-balao__desc {
  font-size: 14px;
  line-height: 1.4;
  color: #4b4b5e;
  margin: 0 0 18px;
}

/* ---------- Diferenciais ---------- */
.rvb-popup-balao__feats {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rvb-popup-balao__feats li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--rvb-pop-ink);
}

.rvb-popup-balao__feat-ico {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(21, 51, 163, 0.12);
  color: var(--rvb-pop-blue);
  font-size: 13px;
}

/* ---------- Tamanhos ---------- */
.rvb-popup-balao__sizes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.rvb-popup-balao__size {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  background: var(--rvb-pop-blue);
  padding: 5px 14px;
  border-radius: 999px;
}

/* ---------- Preço ---------- */
.rvb-popup-balao__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 20px;
}

.rvb-popup-balao__price-from {
  font-size: 13.5px;
  color: #4b4b5e;
}

.rvb-popup-balao__price-value {
  font-size: 34px;
  font-weight: 800;
  color: var(--rvb-pop-blue);
  line-height: 1;
}

/* ---------- CTA (amarelo, texto preto) ---------- */
.rvb-popup-balao__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--rvb-pop-yellow);
  color: var(--rvb-pop-ink);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  padding: 15px 18px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(255, 177, 0, 0.45);
  transition: background .25s ease, transform .2s ease, box-shadow .25s ease;
}

.rvb-popup-balao__cta:hover,
.rvb-popup-balao__cta:focus-visible {
  background: #f0a500;
  color: var(--rvb-pop-ink);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255, 177, 0, 0.55);
}

.rvb-popup-balao__cta .fa-whatsapp {
  font-size: 21px;
}

/* ===========================================================================
 * Responsivo.
 * ======================================================================== */
@media (max-width: 575.98px) {
  .rvb-popup-overlay {
    padding: 16px;
  }

  .rvb-popup-balao__media {
    padding: 16px;
  }

  .rvb-popup-balao__body {
    padding: 18px 18px 20px;
  }

  .rvb-popup-balao__title {
    font-size: 22px;
  }

  .rvb-popup-balao__price-value {
    font-size: 30px;
  }
}

/* Acessibilidade — sem animação para quem prefere movimento reduzido. */
@media (prefers-reduced-motion: reduce) {
  .rvb-popup-overlay {
    transition: opacity .2s ease;
  }
  .rvb-popup-balao,
  .rvb-popup-overlay.is-visible .rvb-popup-balao {
    transform: none;
    transition: none;
  }
  .rvb-popup-balao__close:hover {
    transform: none;
  }
}

/* Trava o scroll do fundo quando o popup está aberto. */
body.rvb-popup-open {
  overflow: hidden;
}
