/* sv-vsl-modal — VSL premium isolado (não afecta styles.css / app.js) */
.sv-vsl-modal {
  --sv-vsl-bg-deep: #04142f;
  --sv-vsl-bg-panel: #061f49;
  --sv-vsl-blue: #1558e8;
  --sv-vsl-orange: #ff8200;
  --sv-vsl-orange-light: #ff9a00;
  --sv-vsl-white: #ffffff;
  --sv-vsl-muted: rgba(255, 255, 255, 0.72);
  --sv-vsl-line: rgba(255, 255, 255, 0.14);

  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.sv-vsl-modal.sv-vsl-modal--is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.sv-vsl-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(1, 10, 27, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sv-vsl-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  height: calc(100vh - 44px);
  height: calc(100dvh - 44px);
  max-height: calc(100dvh - 44px);
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(21, 88, 232, 0.28), transparent 55%),
    radial-gradient(700px 320px at 10% 100%, rgba(255, 130, 0, 0.16), transparent 50%),
    linear-gradient(165deg, var(--sv-vsl-bg-panel) 0%, var(--sv-vsl-bg-deep) 100%);
  border: 1px solid var(--sv-vsl-line);
  border-radius: 20px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transform: translateY(12px) scale(0.985);
  transition: transform 0.24s ease;
}

.sv-vsl-modal.sv-vsl-modal--is-open .sv-vsl-modal__dialog {
  transform: translateY(0) scale(1);
}

/* Isolar do CSS global do site: `header { background:#fff; height; border-radius… }` */
.sv-vsl-modal .sv-vsl-modal__header,
.sv-vsl-modal header.sv-vsl-modal__header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  flex: 0 0 auto;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  pointer-events: auto !important;
  box-sizing: border-box;
  animation: none !important;
  transform: none !important;
}

.sv-vsl-modal .sv-vsl-modal__footer,
.sv-vsl-modal footer.sv-vsl-modal__footer {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  max-width: none !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  box-sizing: border-box;
}

.sv-vsl-modal__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sv-vsl-modal__logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}

.sv-vsl-modal__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}

.sv-vsl-modal__product {
  font-family: "Sora", "Manrope", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sv-vsl-white);
  letter-spacing: -0.02em;
}

.sv-vsl-modal__cloud {
  color: var(--sv-vsl-orange);
}

.sv-vsl-modal__tag {
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.sv-vsl-modal__close {
  width: 44px;
  height: 44px;
  border: 1px solid var(--sv-vsl-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--sv-vsl-white);
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sv-vsl-modal__close:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.sv-vsl-modal__close:focus-visible {
  outline: 2px solid var(--sv-vsl-orange);
  outline-offset: 2px;
}

.sv-vsl-modal__intro {
  text-align: center;
  padding: 0 20px 12px;
  flex: 0 0 auto;
}

.sv-vsl-modal__title {
  margin: 0;
  font-family: "Sora", "Manrope", "Segoe UI", sans-serif;
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--sv-vsl-white);
  line-height: 1.25;
}

.sv-vsl-modal__desc {
  margin: 8px auto 0;
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--sv-vsl-muted);
}

.sv-vsl-modal__stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
}

.sv-vsl-modal__player {
  width: 100%;
  height: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 12px;
  min-height: 0;
}

.sv-vsl-modal__frame {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  max-width: min(100%, calc((100% - 0px) * 16 / 9));
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(ellipse 55% 70% at 18% 45%, rgba(21, 88, 232, 0.32), transparent 62%),
    radial-gradient(ellipse 50% 65% at 82% 55%, rgba(255, 130, 0, 0.18), transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.04) 0 1px, transparent 1.5px),
    linear-gradient(155deg, #071a38 0%, #04142f 42%, #0a2250 100%);
  background-size: auto, auto, 28px 28px, auto;
}

.sv-vsl-modal__frame::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    radial-gradient(120% 80% at 50% -20%, rgba(126, 182, 255, 0.12), transparent 50%),
    radial-gradient(90% 70% at 50% 120%, rgba(255, 130, 0, 0.08), transparent 45%);
  z-index: 0;
}

.sv-vsl-modal__video {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  vertical-align: middle;
}

/* ——— Progresso + slide controller ——— */
.sv-vsl-modal__progress-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-width: min(100%, calc((100vh - 44px) * 16 / 9));
  margin: 0 auto;
  padding: 0 2px;
}

.sv-vsl-modal__progress-track {
  display: flex;
  gap: 5px;
  width: 100%;
  height: 3px;
  margin-bottom: 10px;
}

.sv-vsl-modal__progress-seg {
  flex: 1;
  min-width: 0;
  height: 100%;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
  cursor: pointer;
  transition: background 0.15s ease;
}

.sv-vsl-modal__progress-seg:hover {
  background: rgba(255, 255, 255, 0.22);
}

.sv-vsl-modal__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--sv-vsl-orange-light), var(--sv-vsl-orange));
  box-shadow: 0 0 8px rgba(255, 130, 0, 0.45);
  transition: width 0.12s linear;
}

.sv-vsl-modal__slides {
  display: none; /* ocultos por agora; progresso + sequência continuam activos */
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
}

.sv-vsl-modal--single .sv-vsl-modal__slides {
  display: none;
}

.sv-vsl-modal--many .sv-vsl-modal__slide {
  max-width: 112px;
  min-height: 36px;
  padding: 5px 10px;
  font-size: 0.72rem;
  gap: 5px;
}

.sv-vsl-modal--many .sv-vsl-modal__slide-num {
  width: 18px;
  height: 18px;
  font-size: 0.64rem;
}

.sv-vsl-modal--many .sv-vsl-modal__slide-label {
  font-size: 0.72rem;
}

.sv-vsl-modal__slide {
  flex: 1;
  max-width: 136px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sv-vsl-modal__slide:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.sv-vsl-modal__slide.is-active {
  background: rgba(255, 130, 0, 0.14);
  border-color: rgba(255, 154, 0, 0.55);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 130, 0, 0.2), 0 6px 18px rgba(255, 130, 0, 0.12);
}

.sv-vsl-modal__slide:focus-visible {
  outline: 2px solid var(--sv-vsl-orange-light);
  outline-offset: 2px;
}

.sv-vsl-modal__slide-num {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.1);
  color: inherit;
  flex: 0 0 auto;
}

.sv-vsl-modal__slide.is-active .sv-vsl-modal__slide-num {
  background: linear-gradient(135deg, var(--sv-vsl-orange-light), var(--sv-vsl-orange));
  color: #fff;
}

.sv-vsl-modal__slide-label {
  letter-spacing: 0.01em;
}

.sv-vsl-modal__footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom, 0px));
  flex: 0 0 auto;
}

.sv-vsl-modal__btn--ghost[hidden],
.sv-vsl-modal__btn--ghost[data-sv-vsl-close="later"] {
  display: none !important; /* mantido no DOM; repor display quando quiser ativar */
}

.sv-vsl-modal__btn {
  min-height: 44px;
  padding: 12px 20px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.sv-vsl-modal__btn-ico {
  flex: 0 0 auto;
  display: block;
}

.sv-vsl-modal__btn-ico-circle {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.sv-vsl-modal__btn:focus-visible {
  outline: 2px solid var(--sv-vsl-orange-light);
  outline-offset: 2px;
}

.sv-vsl-modal__btn--ghost {
  background: transparent;
  color: var(--sv-vsl-white);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.sv-vsl-modal__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

.sv-vsl-modal__btn--primary {
  border: 0;
  color: var(--sv-vsl-white);
  background: linear-gradient(135deg, var(--sv-vsl-orange-light) 0%, var(--sv-vsl-orange) 55%, #e86f00 100%);
  box-shadow: 0 10px 24px rgba(255, 130, 0, 0.3);
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
}

.sv-vsl-modal__btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(255, 130, 0, 0.38);
}

body.sv-vsl-lock {
  overflow: hidden;
}

@media (max-width: 768px) {
  .sv-vsl-modal {
    padding: 0;
  }

  .sv-vsl-modal__dialog {
    width: 100%;
    height: 100%;
    height: 100dvh;
    max-height: 100dvh;
    min-height: 100dvh;
    border-radius: 0;
    border: 0;
    padding-top: env(safe-area-inset-top, 0px);
  }

  .sv-vsl-modal__header {
    padding: 10px 12px 6px;
  }

  .sv-vsl-modal__intro {
    padding: 0 14px 8px;
  }

  .sv-vsl-modal__title {
    font-size: 20px;
  }

  .sv-vsl-modal__desc {
    display: none;
  }

  .sv-vsl-modal__stage {
    padding: 0 12px;
  }

  .sv-vsl-modal__progress-wrap {
    max-width: 100%;
  }

  .sv-vsl-modal__slide {
    max-width: none;
    padding: 6px 10px;
  }

  .sv-vsl-modal__slide-label {
    font-size: 0.74rem;
  }

  .sv-vsl-modal__frame {
    border-radius: 12px;
  }

  .sv-vsl-modal__footer {
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom, 0px));
  }

  .sv-vsl-modal__btn--primary {
    flex: 1 1 100%;
    width: 100%;
  }
}

@media (max-width: 768px) and (orientation: landscape) {
  .sv-vsl-modal__intro,
  .sv-vsl-modal__footer {
    display: none;
  }

  .sv-vsl-modal__header {
    padding: 6px 10px;
  }

  .sv-vsl-modal__stage {
    padding: 0 10px 10px;
  }

  .sv-vsl-modal__progress-wrap {
    margin-bottom: 4px;
  }

  .sv-vsl-modal__slides {
    display: none;
  }

  .sv-vsl-modal__frame {
    border-radius: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-vsl-modal,
  .sv-vsl-modal__dialog {
    transition: none;
  }

  .sv-vsl-modal__dialog {
    transform: none;
  }

  .sv-vsl-modal.sv-vsl-modal--is-open .sv-vsl-modal__dialog {
    transform: none;
  }

  .sv-vsl-modal__btn--primary:hover {
    transform: none;
  }
}

/* ——— Homepage (#svVslHomeModal): acima do topbar + esconder header do site ——— */
#svVslHomeModal.sv-vsl-modal {
  z-index: 2147483000 !important;
}

body.sv-vsl-lock > .header-shell,
html.sv-vsl-lock > body > .header-shell,
body.sv-vsl-lock .header-shell,
body.sv-vsl-lock #header,
body.sv-vsl-lock .nav-backdrop,
body.sv-vsl-lock .scroll-top,
html.sv-vsl-lock .header-shell,
html.sv-vsl-lock #header {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  animation: none !important;
  z-index: -1 !important;
}

#svVslHomeModal .sv-vsl-modal__progress-wrap,
#svVslHomeModal .sv-vsl-modal__slides {
  display: none !important;
}

#svVslHomeModal .sv-vsl-modal__btn--ghost {
  display: none !important;
}

@media (min-width: 769px) {
  #svVslHomeModal.sv-vsl-modal {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}
