/* ============================================================
   TIOSAM SCRIPTS — POP-UP OFICIAL DE ATIVAÇÃO MTAX
   ============================================================ */

/* TRAVA TOTAL DE ROLAGEM DO SITE (HTML E BODY) QUANDO O MODAL ESTÁ ABERTO */
html.ts-modal-open,
body.ts-modal-open {
  overflow: hidden !important;
  height: 100% !important;
  max-height: 100vh !important;
  touch-action: none !important;
  overscroll-behavior: none !important;
  -webkit-overflow-scrolling: auto !important;
}

#tsMtaxModal {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  font-family: 'Poppins', sans-serif !important;
  box-sizing: border-box;
  overscroll-behavior: contain;
}

#tsMtaxModal.show {
  opacity: 1 !important;
  visibility: visible !important;
}

/* OVERLAY ESCURECIDO LIMPO — SEM BLUR (ZERO LAG NA GPU, FUNDO NÍTIDO SEM EMBAÇAR) */
.ts-mtax-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.82) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  pointer-events: auto;
  z-index: 1;
}

/* CARD TOTALMENTE SÓLIDO PREMIUM COM MÁXIMO CONTRASTE (ZERO VAZAMENTO DE TEXTO DO SITE) */
.ts-mtax-card {
  position: relative;
  background: #111726 !important;
  background: linear-gradient(160deg, #151e30 0%, #0d131f 100%) !important;
  border-radius: 1.25rem;
  max-width: 440px;
  width: 100%;
  box-shadow:
    0 25px 70px -15px rgba(0, 0, 0, 0.95),
    0 0 0 1px rgba(255, 255, 255, 0.14),
    0 0 45px -10px rgba(246, 95, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.14);
  animation: tsMtaxSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  z-index: 10;
  box-sizing: border-box;
}

@keyframes tsMtaxSlideUp {
  from { transform: translateY(20px) scale(0.97); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* HEADER DO MODAL */
.ts-mtax-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(255, 255, 255, 0.03) !important;
  box-sizing: border-box;
}

.ts-mtax-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ts-mtax-title::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 1.1em;
  background: linear-gradient(180deg, #F65F00, #FF9A00);
  border-radius: 2px;
}

.ts-mtax-close {
  color: #9ca3af;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.25rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
  line-height: 1;
}

.ts-mtax-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: scale(1.05);
}

/* BANNER COM ENQUADRAMENTO PERFEITO DO X */
.ts-mtax-media {
  width: 100%;
  height: 180px;
  background: transparent;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ts-mtax-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.ts-mtax-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 65%, rgba(16, 23, 38, 0.5) 100%);
  pointer-events: none;
}

/* CORPO DO MODAL */
.ts-mtax-body {
  padding: 1.25rem 1.5rem 1.5rem;
  box-sizing: border-box;
}

.ts-mtax-main-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.4rem;
}

.ts-mtax-main-desc {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.5;
  margin-bottom: 1rem;
}

.ts-mtax-main-desc strong {
  color: #fff;
}

/* LISTA DE BENEFÍCIOS */
.ts-mtax-features {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-bottom: 1.1rem;
}

.ts-mtax-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.8rem;
  color: #d1d5db;
  line-height: 1.4;
}

.ts-mtax-feature i {
  color: #F65F00;
  font-size: 0.85rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.ts-mtax-feature strong {
  color: #fff;
  font-weight: 600;
}

/* BOX DE TRANQUILIDADE */
.ts-mtax-trust {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(16, 185, 129, 0.09);
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: 0.5rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.76rem;
  color: #34d399;
  line-height: 1.35;
  margin-bottom: 1.25rem;
}

.ts-mtax-trust i {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* BOTÃO PRIMÁRIO ÚNICO */
.ts-mtax-btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #F65F00 0%, #FF8C00 50%, #FF9A00 100%);
  color: #fff !important;
  font-weight: 600;
  padding: 0.78rem 1.25rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px -3px rgba(246, 95, 0, 0.48);
  transition: all 0.25s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.ts-mtax-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px -4px rgba(246, 95, 0, 0.65);
  background: linear-gradient(135deg, rgba(246, 95, 0, 0.95) 0%, rgba(255, 140, 0, 0.9) 50%, rgba(255, 154, 0, 0.95) 100%);
  color: #fff !important;
}

@media (max-width: 520px) {
  #tsMtaxModal {
    padding: 10px;
  }
  .ts-mtax-card {
    max-width: 100%;
    max-height: 95vh;
    overflow-y: auto;
  }
  .ts-mtax-media {
    height: 135px;
  }
  .ts-mtax-body {
    padding: 1rem 1.15rem 1.25rem;
  }
  .ts-mtax-main-title {
    font-size: 1.18rem;
  }
}


/* Enquanto o popup MTAX estiver aberto, o modal de idioma fica oculto (volta quando o MTAX sair) */
html.ts-modal-open .ts-language-modal {
  display: none !important;
}

