
.lenis-spin {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.lenis-content {
  min-height: 200vh;
  position: relative;
  will-change: transform;
}

.lenis-content {
  background: linear-gradient(#500DAD, #324CCD); /* só pra ver o scroll */
}

:root {
  /* ajuste estes valores conforme o seu design */
  --tm-header-height: 60px;
  --tm-footer-height: 72px;
  --tm-body-padding: 24px;
}
#modal-scroll {
  overflow-y: auto;
  max-height: calc(100vh - var(--tm-header-height) - var(--tm-footer-height));
  will-change: transform;

  /* ESSENCIAIS para scroll na extrema direita */
  width: 100vw;
  margin-left: calc((100vw - 100%) / -2); /* puxa pra esquerda */
  padding-right: 1rem; /* evita que conteúdo fique colado na barra */
  box-sizing: border-box;
}


.tm-success-content {
      margin-left: calc((100vw - 100%) / 2) !important; /* puxa pra esquerda */

}


/* ---- Overlay ---- */
.tm-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;  /* cola o modal no topo */
  justify-content: center;
  overflow-y: auto;         /* scroll na lateral da tela */
  overflow-x: hidden;
  padding: 0;               /* sem padding extra */
  background: rgba(255,255,255,1);
  z-index: 10000;
  
}

.tm-modal-close {
  background: white;
  color: #1f1f1f;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 50px;
  transition: background-color 0.5s ease, color 1s ease;
}

.tm-modal-close:hover {
  background: white;
  color: red; /* só o que muda */
}

.tm-progress-wrapper {
  flex: 1;
  padding: 0 1rem;
}
/* Ajustes finos para os elementos internos */
.tm-progress-bar {
  height: 10px;
  border-radius: 5px;
    background: #e5e5e5;

  margin: 0 auto;
}
.tm-progress-fill {
  width: 0%;
  height: 100%;
  background: #324ccd;
  transition: width 0.3s ease;
}


/* ---- Body ---- */
/* BODY: preenche o espaço */
.tm-modal-body {
   overflow: visible !important;
     box-sizing: border-box;
  padding: var(--tm-body-padding);
  flex: 1 1 auto;
  max-height: calc(
    100vh 
    - var(--tm-header-height) 
    - var(--tm-footer-height)
     );
  

}
.tm-modal-body h2 {
  margin-bottom: 1rem;
}
.tm-modal-body .tm-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}
.tm-modal-body .tm-options .tm-option {
  flex: 1 1 30%;
  background: #fff;
  border: 2px solid #e2e2e8;
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  transition: border-color 0.2s;
}
.tm-modal-body .tm-options .tm-option:hover {
  border-color: #7b61ff;
}


.tm-btn {
  padding: 0.75rem 1.25rem;
  margin-left: 0.5rem;
  -webkit-tap-highlight-color: transparent;
}
.tm-btn:focus,
.tm-btn:active {
  outline: none;
  box-shadow: none;
}

#tm-next-btn {
  margin-left: auto;
}

/* animação de sucesso */
@keyframes tm-success-pulse {
/*  0%   { transform: scale(1); opacity: 1; } */
/*  50%  { transform: scale(1.2); opacity: 0.8; } */
 /* 100% { transform: scale(1); opacity: 1; } */
}

/* estilo do container de sucesso */
.tm-modal-success .tm-modal-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #1f1f1f;
}

/* aplica a animação ao body */
.tm-modal-success .tm-modal-body {
  animation: tm-success-pulse 0.6s ease-out 2;
}


.tm-modal-container.tm-modal-success {
  display: flex;
  flex-direction: column;
  justify-content: center;     /* Centraliza verticalmente */
  align-items: center;         /* Centraliza horizontalmente */
  min-height: 100vh;           /* Altura total da tela */
  text-align: center;
  padding: 2rem;
  box-sizing: border-box;
}

.tm-success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.tm-modal-container.tm-modal-success .tm-success-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tm-modal-container.tm-modal-success {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

:root {
  --tm-color-primary:         #324ccd !important;
  --tm-color-primary-hover:   #142887 !important;
  --tm-color-outline:         #324ccd !important;
  --tm-color-outline-hover:   #324ccd !important;
  --tm-color-text:            #ffffff !important;
  --tm-font:                  'Inter', sans-serif !important;
}

/* Base de todos os botões */
.tm-btn {
  font-family: var(--tm-font) !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  border-radius: 9999px !important;
  padding: 0.75rem 1.5rem !important;
  border: 2px solid transparent !important;
  cursor: pointer !important;
  transition: 
    background-color 0.2s ease !important, 
    border-color     0.2s ease !important,
    transform        0.1s ease !important;
  display: inline-flex;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  -webkit-tap-highlight-color: transparent !important;
  outline: none !important;
}

/* Remove qualquer outline ou box-shadow no foco */
.tm-btn:focus,
.tm-btn:active {
  outline: none !important;
  box-shadow: none !important;
}

/* Botão principal (Próximo / Concluir) */
.tm-btn-primary {
  background-color: var(--tm-color-primary) !important;
  color:            var(--tm-color-text)    !important;
  border-color:     var(--tm-color-primary) !important;
  transition: 
    background-color 0.5s ease !important;
}
.tm-btn-primary:hover {
  background-color: var(--tm-color-primary-hover) !important;
  transform: translateY(-1px) !important;
}
.tm-btn-primary:active {
  transform: translateY(0) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* Botão outline (Pular / Voltar) */
.tm-btn-outline {
  background-color: transparent              !important;
  color:            var(--tm-color-outline)  !important;
  border-color:     var(--tm-color-outline)  !important;
  transition: 
    background-color 0.5s ease !important;
}
.tm-btn-outline:hover {
  background-color: var(--tm-color-outline-hover) !important;
  color:            var(--tm-color-text)          !important;
}
.tm-btn-outline:active {
  opacity: 0.8 !important;
}

/* Estado desabilitado */
.tm-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
}

/* Se usar ícones SVG dentro do botão */
.tm-btn svg {
  width: 1em !important;
  height: 1em !important;
  margin-right: 0.5em !important;
  fill: currentColor !important;
}



/* 2) Header fixo no topo da viewport */
.tm-modal-header {
  position: fixed !important;
  top: 0px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 980px !important;
  height: var(--tm-header-height) !important;
  display: flex !important;
  align-items: center !important;
  padding: 0 1rem !important;
  background: #f9f9fa !important;
  border-bottom: 1px solid #e0e0e0 !important;
  z-index: 10001 !important;
  border-radius:50px;
}

/* 3) Footer fixo no rodapé da viewport */
.tm-modal-footer {
  position: fixed !important;
  bottom: 0px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 100% !important;
  max-width: 980px !important;
  height: var(--tm-footer-height) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  padding: 0 1rem !important;
  background: #f9f9fa !important;
  border-top: 1px solid #e0e0e0 !important;
  z-index: 10001 !important;
    border-radius:50px;

}

/* 4) Container principal sem margem vertical */
.tm-modal-container {
  /*  espaço que cabe header + footer  */
  padding-top: var(--tm-header-height) !important;
  padding-bottom: var(--tm-footer-height) !important;
  width: 100%;
  max-width: 980px;
  margin: 0 auto;           /* centraliza horizontal */
  display: block;
  box-sizing: border-box;
}

/* 5) Conteúdo flui normalmente, sem scroll interno */
.tm-modal-body {
   /* Retira qualquer flex ou limite de altura */
  flex: none !important;
  max-height: none !important;

  /* Garante que não crie scroll interno */
  overflow: visible !important;

  /* Mantém só o padding que você já definiu */
  padding: var(--tm-body-padding) !important;
    box-sizing: border-box;
}


.tm-modal-body::-webkit-scrollbar {
  width: 8px;
}
.tm-modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.tm-modal-body::-webkit-scrollbar-thumb {
  background-color: rgba(0,0,0,0.2);
  border-radius: 4px;
}
.tm-modal-body {
    /* Retira qualquer flex ou limite de altura */
  flex: none !important;
  max-height: none !important;

  /* Garante que não crie scroll interno */
  overflow: visible !important;

  /* Mantém só o padding que você já definiu */
  padding: var(--tm-body-padding) !important;
    box-sizing: border-box;
}


.swal2-container {
  z-index: 999999999 !important;
}

.ponto-balao {
  position: absolute;
  bottom: 60px; /* pode ajustar com base no botão */
  left: 50%;
  transform: translateX(-50%);
  background-color: #324CCD;
  color: white;
  font-weight: bold;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 1rem;
  opacity: 0;
  pointer-events: none;
    animation: fadeUp 3.6s ease forwards;
    z-index: 9999999999 !important;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ponto-balao img {
  width: 20px;
  height: 20px;
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translate(-50%, 0);
  }
  5% {
    opacity: 1;
    transform: translate(-50%, -20px);
  }
  90% {
    opacity: 1;
    transform: translate(-50%, -20px);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -40px);
  }
}

/* overlay modal */
#tm-lesson-modal.modal-open {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items:center; justify-content:center;
  overflow: hidden;
  z-index: 10000;
}
#tm-lesson-modal.modal-open .tm-modal-container {
  width: 80vw; height: 80vh;
  background: #fff; overflow: auto;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* full-screen page */
#tm-lesson-modal.page-open {
  position: fixed; inset: 0;
  background: #fff;
  display: block; overflow: auto;
  z-index: 10000;
}
#tm-lesson-modal.page-open .tm-modal-container {
  width: 100%; height: auto; max-height: none;
  box-shadow: none;
}
body.page-mode {
  overflow: auto !important;
}


@media (max-width: 600px) {
  :root {
    --tm-body-padding: 16px;
  }

  .tm-modal-header,
  .tm-modal-footer {
    padding: 0 0.5rem !important;
    height: auto !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.5rem;
  }

  .tm-modal-footer .tm-btn {
    flex: 1 1 auto !important;
    min-width: 100px;
  }

  .tm-modal-body {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  #tm-lesson-modal.modal-open .tm-modal-container {
    width: 95vw !important;
    height: 90vh !important;
    border-radius: 1rem !important;
  }

  .tm-modal-body .tm-options {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  .tm-modal-body .tm-options .tm-option {
    flex: 1 1 auto !important;
    padding: 0.75rem !important;
    font-size: 1rem;
  }
}


#tm-lesson-modal.modal-open.modal-mobile .tm-modal-container {
  width: 96vw !important;
  height: 92vh !important;
  border-radius: 1rem !important;
  padding: 1rem !important;
}

#tm-lesson-modal.modal-open.modal-mobile .tm-modal-body,
#tm-lesson-modal.modal-open.modal-mobile .tm-modal-body-wrapper {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 600px) {
  
  
  .tm-modal-container.tm-modal-success {
    padding: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    position: relative !important;
  }
  .tm-success-content {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    padding: 1rem !important;
    width: calc(100% - 2rem) !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .tm-success-content img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
  }
}


