/* ePower Sense Samples Giveaway — v1.0 (mesma identidade do redesign 15% OFF)
   Paleta do site: #00669E (azul) · #00CEAB (teal) · fundos #F4F7F9
   Tipografia do tema: 'Made Mirage' (títulos) · 'Neue Montreal' (texto) */

.ESCPSM { display: none; }

.escpg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3, 28, 44, 0.55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  padding: 16px;
}

.escpg-overlay.is-visible {
  display: flex;
}

.escpg-popup {
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 22px;
  padding: 0 26px 24px;
  position: relative;
  box-shadow: 0 30px 80px rgba(2, 24, 38, 0.35), 0 4px 18px rgba(0, 102, 158, 0.18);
  font-family: 'Neue Montreal', 'Inter', -apple-system, 'Segoe UI', Arial, sans-serif;
  animation: escpg-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  overscroll-behavior: contain;
}

@keyframes escpg-in {
  from { opacity: 0; transform: translateY(26px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.escpg-popup::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 7px;
  border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, #00669E 0%, #00CEAB 55%, #7FD9C2 100%);
}

.escpg-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  font-size: 20px;
  line-height: 0;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 3;
}

.escpg-close:hover {
  background: rgba(255, 255, 255, 0.32);
  transform: rotate(90deg);
}

.escp-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00669E, #00939E);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 18px 0 0;
}

.escp-badge-row {
  display: flex;
  justify-content: center;
}

.escpg-off {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  margin: 14px 0 4px;
}

.escpg-off-pct {
  font-family: 'Made Mirage', 'Poppins', 'Segoe UI', sans-serif;
  font-size: 62px;
  line-height: 0.9;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #00669E, #00CEAB);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.escpg-off-txt {
  display: block;
  color: #3d5a6b;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  max-width: 130px;
}

.escpg-popup h2 {
  margin: 16px 0 8px;
  font-family: 'Made Mirage', 'Poppins', 'Segoe UI', sans-serif;
  font-size: 24px;
  line-height: 1.18;
  font-weight: 600;
  color: #10344a;
  text-align: center;
}

.escpg-popup h2::after {
  content: "";
  display: block;
  width: 46px;
  height: 3px;
  border-radius: 3px;
  margin: 12px auto 0;
  background: linear-gradient(90deg, #00669E, #00CEAB);
}

.escpg-popup p {
  margin: 0 0 8px;
  color: #5b7180;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}

.escpg-form {
  margin-top: 14px;
}

.escpg-inline {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 12px;
}

.escp-field {
  margin-bottom: 12px;
}

.escp-field label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #47657a;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.escp-field input {
  width: 100%;
  border: 1.5px solid #d9e4eb;
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 15px;
  font-family: inherit;
  background: #f6f9fb;
  color: #10344a;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.escp-field input:focus {
  outline: none;
  border-color: #00CEAB;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(0, 206, 171, 0.16);
}

.escp-field input::placeholder {
  color: #9db1bd;
}

/* Consentimento */
.escpg-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 2px 0 14px;
  font-size: 12px;
  line-height: 1.5;
  color: #5b7180;
  cursor: pointer;
}

.escpg-consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: #00CEAB;
  cursor: pointer;
}

/* Honeypot */
.escpg-hpf {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.escp-submit {
  width: 100%;
  border: none;
  border-radius: 13px;
  padding: 15px 16px;
  font-size: 15.5px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  color: #ffffff;
  background: linear-gradient(90deg, #00669E, #00939E 55%, #00CEAB);
  box-shadow: 0 10px 24px rgba(0, 174, 178, 0.32);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.escp-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 174, 178, 0.42);
}

.escp-submit:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px rgba(0, 174, 178, 0.3);
}

.escp-submit[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.escpg-message {
  margin-top: 10px;
  font-size: 13px;
  color: #c0392b;
  text-align: center;
}

.escp-trust {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #8299a6;
  font-size: 12.5px;
}

.escp-trust svg { flex: none; }

.escpg-form-state .escpg-form {
  margin-top: 8px;
}

.escpg-form-state .escp-field {
  margin-bottom: 9px;
}

.escpg-form-state .escp-field label {
  font-size: 10px;
}

.escpg-form-state .escp-field input {
  padding: 9px 12px;
  font-size: 14px;
}

.escpg-form-state .escpg-consent {
  margin: 2px 0 10px;
}

.escpg-form-state .escp-submit {
  padding: 12px 22px;
  font-size: 14.5px;
}

/* Estado de sucesso */
.escpg-success-state {
  display: none;
  text-align: center;
}

.escpg-form-state {
  display: none;
}

/* Hero step (etapa 1) */
.escpg-step-hero {
  display: none;
  text-align: center;
}

.escpg-step-hero.is-active {
  display: block;
  animation: escpg-fade 0.35s ease both;
}

.escpg-step-hero.is-hidden {
  display: none;
}

.escpg-step-hero h2 {
  margin: 6px 0 0;
}

.escpg-step-hero p {
  max-width: 300px;
  margin: 8px auto 14px;
  color: #5b7482;
  font-size: 14px;
  line-height: 1.5;
}

.escpg-claim {
  width: 100%;
  padding: 14px 24px;
  font-size: 15px;
}

/* Thumbs de best-sellers */
.escpg-thumbs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 16px 0 4px;
}

.escpg-thumb {
  margin: 0;
  min-width: 0;
  opacity: 0;
  animation: escpg-tile 0.45s cubic-bezier(0.22, 0.9, 0.3, 1.4) both;
}

.escpg-thumbs .escpg-thumb:nth-child(2) { animation-delay: 0.06s; }
.escpg-thumbs .escpg-thumb:nth-child(3) { animation-delay: 0.12s; }
.escpg-thumbs .escpg-thumb:nth-child(4) { animation-delay: 0.18s; }

.escpg-thumb-img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: #f6f9fb center / cover no-repeat;
  box-shadow: inset 0 0 0 1px rgba(0, 102, 158, 0.14), 0 4px 12px rgba(9, 50, 84, 0.1);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.escpg-thumb:hover .escpg-thumb-img {
  transform: translateY(-3px) scale(1.04);
  box-shadow: inset 0 0 0 2px rgba(0, 206, 171, 0.75), 0 8px 18px rgba(9, 50, 84, 0.16);
}

.escpg-thumb figcaption {
  margin-top: 6px;
  font-size: 10px;
  line-height: 1.25;
  color: #66808f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

@keyframes escpg-tile {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Form step compacto (sem scroll em desktops) */
.escpg-form-state h2 {
  margin: 14px 0 0;
  font-size: 21px;
}

.escpg-form-state h2::after {
  margin: 8px auto 0;
}

.escpg-success-state {
  display: none;
  text-align: center;
}

.escpg-success-state.is-active,
.escpg-form-state.is-active {
  display: block;
}

.escpg-form-state.is-hidden,
.escpg-success-state.is-hidden {
  display: none;
}

.escpg-success-state.is-active {
  animation: escpg-fade 0.35s ease both;
}

@keyframes escpg-fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.escp-check {
  width: 74px;
  height: 74px;
  margin: 24px auto 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #00CEAB, #01876E);
  box-shadow: 0 12px 30px rgba(0, 206, 171, 0.4);
  animation: escpg-pop 0.55s cubic-bezier(0.24, 1.6, 0.42, 1) both;
  position: relative;
}

.escp-check svg {
  width: 36px;
  height: 36px;
  display: block;
}

.escp-check::before,
.escp-check::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: -6px;
}

.escp-check::before {
  left: 50%;
  margin-left: -34px;
  background: #00CEAB;
  animation: escpg-dot 1.1s ease-in-out 0.3s infinite alternate;
}

.escp-check::after {
  left: 50%;
  margin-left: 22px;
  width: 6px;
  height: 6px;
  background: #00669E;
  animation: escpg-dot 1.3s ease-in-out 0.55s infinite alternate;
}

@keyframes escpg-pop {
  0%   { transform: scale(0.3); opacity: 0; }
  70%  { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes escpg-dot {
  from { transform: translateY(0); opacity: 0.5; }
  to   { transform: translateY(-9px); opacity: 1; }
}

.escp-badge-success {
  background: linear-gradient(90deg, #00A98E, #00CEAB);
}

.escpg-success-state h2 {
  margin-top: 14px;
}

.escpg-success-state small {
  display: block;
  margin-top: 8px;
  color: #66808f;
  font-size: 12.5px;
  line-height: 1.5;
}

/* Mobile: bottom-sheet */
@media (max-width: 600px) {
  .escpg-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .escpg-popup {
    max-width: none;
    border-radius: 24px 24px 0 0;
    padding: 0 20px 20px;
    max-height: 92vh;
    animation: escpg-sheet 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .escpg-popup::before { border-radius: 24px 24px 0 0; }

  .escpg-popup h2 { font-size: 21px; }

  .escpg-off-pct { font-size: 50px; }

  .escpg-inline { gap: 0 8px; }

  .escpg-close {
    background: rgba(0, 0, 0, 0.06);
    color: #10344a;
  }

  .escpg-close:hover { background: rgba(0, 0, 0, 0.12); }

  .escp-check { width: 62px; height: 62px; margin-top: 18px; }

  .escp-check svg { width: 30px; height: 30px; }

  .escpg-thumbs { gap: 7px; margin-top: 14px; }

  .escpg-thumb-img { border-radius: 12px; }

  .escpg-thumb figcaption { font-size: 9px; margin-top: 4px; }

  .escpg-claim { font-size: 14px; padding: 13px 20px; }
}

@keyframes escpg-sheet {
  from { opacity: 0; transform: translateY(60px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .escpg-popup,
  .escp-check,
  .escpg-success-state.is-active {
    animation: none !important;
  }

  .escp-check::before,
  .escp-check::after {
    animation: none !important;
  }

  .escp-submit,
  .escpg-close,
  .escp-field input {
    transition: none !important;
  }
}