/*
 * Compatibilidade visual com os módulos históricos do portal.
 * Mantém simulados, flashcards, análise e guias utilizáveis no tema LPV Platform.
 */
.lpv-entry-content:has(.lp-card-container),
.lpv-entry-content:has(.lp-quiz-wrapper),
.lpv-entry-content:has(.lp-quiz-container),
.lpv-entry-content:has(.lp-result-container),
.lpv-entry-content:has(.lp-analise-container),
.lpv-entry-content:has(.lp-guia-container),
.lpv-entry-content:has(.lp-compact-container){max-width:980px;margin-inline:auto}

.lpv-entry-content [class^="lp-"],.lpv-entry-content [class*=" lp-"]{box-sizing:border-box}
.lpv-entry-content .lp-card-container{display:grid!important;grid-template-columns:repeat(auto-fit,minmax(260px,1fr))!important;gap:22px!important;margin:0!important}
.lpv-entry-content .flash-card{min-height:250px!important;padding:28px!important;border:1px solid var(--lpv-gray-200)!important;border-radius:20px!important;background:#fff!important;box-shadow:var(--lpv-shadow-sm)!important;text-decoration:none!important}
.lpv-entry-content .flash-card:hover{border-color:var(--lpv-green-600)!important;box-shadow:var(--lpv-shadow-md)!important}
.lpv-entry-content .flash-btn,.lpv-entry-content .lp-next-btn,.lpv-entry-content button[type="submit"]{border:0!important;border-radius:12px!important;background:var(--lpv-green-600)!important;color:#fff!important;font-family:var(--lpv-font-heading)!important;font-weight:800!important}
.lpv-entry-content .lp-res-title{color:var(--lpv-navy-900)!important;font-family:var(--lpv-font-heading)!important}
.lpv-entry-content .lp-res-subtitle{color:var(--lpv-gray-500)!important}
.lpv-entry-content .lp-guia-container,.lpv-entry-content .lp-analise-container{width:100%!important;max-width:900px!important;margin-inline:auto!important}
.lpv-entry-content .lp-compact-container{max-width:760px!important;margin-inline:auto!important}
.lpv-entry-content input,.lpv-entry-content select,.lpv-entry-content textarea{max-width:100%}
.lpv-entry-content table{width:100%}
.lpv-entry-content iframe{max-width:100%}

/* Shortcode de revisão inteligente */
.lpv-smart-review{max-width:760px;margin:0 auto}.lpv-smart-review__head{text-align:center;margin-bottom:24px}.lpv-smart-review__head h2{margin:0 0 6px!important;font-size:28px}.lpv-smart-review__head p{margin:0;color:var(--lpv-gray-500)}.lpv-smart-review__list{display:grid;gap:12px}.lpv-smart-review__item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px;border:1px solid var(--lpv-gray-200);border-radius:18px;background:#fff;box-shadow:var(--lpv-shadow-sm)}.lpv-smart-review__tags{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:7px}.lpv-smart-review__tag{display:inline-flex;padding:5px 10px;border-radius:999px;background:#e8eef5;color:var(--lpv-gray-700);font-size:10px;font-weight:900;text-transform:uppercase}.lpv-smart-review__tag--danger{background:#fff0f0;color:#d33}.lpv-smart-review__tag--warning{background:#fff7e3;color:#a96b00}.lpv-smart-review__item h3{margin:0!important;font-size:17px;text-transform:uppercase}.lpv-smart-review__button{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:0;border-radius:12px;background:var(--lpv-navy-900);color:#fff!important;font-family:var(--lpv-font-heading);font-size:12px;font-weight:800;text-decoration:none!important;cursor:pointer}.lpv-smart-review__button[disabled]{background:var(--lpv-gray-100);color:var(--lpv-gray-500)!important;border:1px dashed var(--lpv-gray-300);cursor:not-allowed}.lpv-smart-review__empty{padding:32px;border:1px dashed var(--lpv-gray-300);border-radius:18px;text-align:center;background:var(--lpv-gray-50)}.lpv-smart-review__back{margin-top:28px;text-align:center}.lpv-smart-review__back a{display:inline-flex;padding:12px 22px;border-radius:12px;background:var(--lpv-navy-900);color:#fff!important;text-decoration:none!important;font-weight:800}
.lpv-flash-modal{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(4,30,73,.94)}.lpv-flash-modal.is-open{display:flex}.lpv-flash-modal__dialog{position:relative;width:min(100%,420px)}.lpv-flash-modal__close{position:absolute;right:0;top:-44px;width:34px;height:34px;border:0;border-radius:50%;background:#fff;font-size:22px;cursor:pointer}.lpv-flash-card{min-height:390px;padding:28px;border-radius:24px;background:#fff;display:flex;flex-direction:column;justify-content:center;text-align:center;box-shadow:0 25px 70px rgba(0,0,0,.3)}.lpv-flash-card small{color:var(--lpv-purple-600);font-weight:900;text-transform:uppercase}.lpv-flash-card h3{font-size:25px}.lpv-flash-card p{font-size:17px}.lpv-flash-card__answer{margin-top:20px;padding:16px;border-radius:14px;background:var(--lpv-green-100)}.lpv-flash-modal__nav{display:flex;justify-content:space-between;align-items:center;margin-top:14px;color:#fff}.lpv-flash-modal__nav button{padding:8px 12px;border:1px solid rgba(255,255,255,.35);border-radius:9px;background:transparent;color:#fff;cursor:pointer}
@media(max-width:700px){.lpv-smart-review__item{align-items:stretch;flex-direction:column}.lpv-smart-review__button{width:100%}.lpv-entry-content{overflow:hidden}.lpv-entry-content .lp-card-container{grid-template-columns:1fr!important}}

/* Sprint 1.2 — preserva a lógica real dos módulos e corrige apenas apresentação */
.lpv-entry-content:has(.lp-result-container),
.lpv-entry-content:has(.lp-analise-container),
.lpv-entry-content:has(.lp-guia-container),
.lpv-entry-content:has(.lp-compact-container){width:100%!important;max-width:none!important;padding-top:0!important}
.lpv-entry-content .lp-result-container{width:min(100%,760px)!important;max-width:760px!important;margin:0 auto!important;padding:28px!important;border-radius:24px!important;background:#fff!important;box-shadow:0 18px 55px rgba(12,35,64,.09)!important}
.lpv-entry-content .lp-result-container *{box-sizing:border-box}
.lpv-entry-content .lp-result-container h1,
.lpv-entry-content .lp-result-container h2,
.lpv-entry-content .lp-result-container h3{font-family:var(--lpv-font-heading)!important}
.lpv-entry-content .lp-result-container .lp-insights-card,
.lpv-entry-content .lp-result-container [class*="insight"]{color:#fff!important}
.lpv-entry-content .lp-result-container .lp-insights-card h2,
.lpv-entry-content .lp-result-container .lp-insights-card h3,
.lpv-entry-content .lp-result-container [class*="insight"] h2,
.lpv-entry-content .lp-result-container [class*="insight"] h3{color:#fff!important}
.lpv-entry-content .lp-result-container img,
.lpv-entry-content .lp-result-container svg{max-width:100%}
.lpv-entry-content .lp-analise-container,
.lpv-entry-content .lp-guia-container{width:min(100%,920px)!important;max-width:920px!important;margin:0 auto!important}
.lpv-entry-content .lp-compact-container{width:min(100%,780px)!important;max-width:780px!important;margin:0 auto!important}
.lpv-entry-content .lp-analise-container button,
.lpv-entry-content .lp-guia-container button,
.lpv-entry-content .lp-compact-container button{font-family:var(--lpv-font-heading)!important}
@media(max-width:700px){.lpv-entry-content .lp-result-container{padding:18px!important}.lpv-entry-content .lp-result-container [class*="stats"],.lpv-entry-content .lp-result-container [class*="cards"]{grid-template-columns:1fr!important}}

/* Sprint 1.3 — vitrines reais de Simulados e Flashcards sem dependência do Tailwind */
.lpv-entry-content .lp-dashboard-header{
  margin:0 0 28px!important;
  padding:0!important;
  text-align:left!important;
}
.lpv-entry-content .lp-dashboard-header .lp-res-title{
  margin:0 0 8px!important;
  color:var(--lpv-navy-900)!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:clamp(30px,4vw,44px)!important;
  line-height:1.05!important;
  letter-spacing:-.03em!important;
}
.lpv-entry-content .lp-dashboard-header .lp-res-subtitle{
  margin:0!important;
  color:var(--lpv-gray-500)!important;
  font-size:16px!important;
}

/* O plugin legado usa classes do Tailwind, mas o tema não carrega Tailwind. */
.lpv-entry-content .grid:has(> .simulado-card),
.lpv-entry-content .grid:has(> .flash-card),
.lpv-entry-content .grid:has(> div button[onclick*="abrirFlashcards"]){
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:22px!important;
  width:100%!important;
  margin:28px 0 0!important;
}

/* Cards da vitrine de simulados */
.lpv-entry-content .simulado-card{
  position:relative!important;
  display:flex!important;
  min-height:310px!important;
  padding:30px!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  overflow:hidden!important;
  border:1px solid #dfe7ef!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 14px 38px rgba(12,35,64,.08)!important;
  color:var(--lpv-navy-900)!important;
  text-align:left!important;
  text-decoration:none!important;
  transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease!important;
}
.lpv-entry-content .simulado-card::after{
  content:"→";
  position:absolute;
  right:26px;
  top:27px;
  display:grid;
  width:42px;
  height:42px;
  place-items:center;
  border-radius:50%;
  background:#e8f7ef;
  color:var(--lpv-green-700);
  font-size:22px;
  font-weight:900;
}
.lpv-entry-content .simulado-card:hover{
  transform:translateY(-5px)!important;
  border-color:var(--lpv-green-600)!important;
  box-shadow:0 22px 50px rgba(12,35,64,.13)!important;
}
.lpv-entry-content .simulado-card > div:first-child{
  display:grid!important;
  width:58px!important;
  height:58px!important;
  margin:0 0 42px!important;
  place-items:center!important;
  border-radius:16px!important;
  background:#e8f7ef!important;
  color:var(--lpv-green-700)!important;
  font-size:0!important;
}
.lpv-entry-content .simulado-card > div:first-child::before{content:"✍";font-size:25px!important}
.lpv-entry-content .simulado-card h3{
  margin:0 0 10px!important;
  color:var(--lpv-navy-900)!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:26px!important;
  line-height:1.1!important;
}
.lpv-entry-content .simulado-card p{
  min-height:46px!important;
  margin:0 0 26px!important;
  color:var(--lpv-gray-500)!important;
  font-size:15px!important;
  line-height:1.55!important;
}
.lpv-entry-content .simulado-card > span{
  display:inline-flex!important;
  min-height:46px!important;
  padding:0 20px!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:12px!important;
  background:var(--lpv-green-600)!important;
  color:#fff!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:13px!important;
  font-weight:800!important;
}

/* Cards da vitrine principal de flashcards */
.lpv-entry-content .flash-card{
  position:relative!important;
  display:flex!important;
  min-height:310px!important;
  padding:30px!important;
  flex-direction:column!important;
  justify-content:space-between!important;
  overflow:hidden!important;
  border:1px solid #dfe7ef!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 14px 38px rgba(12,35,64,.08)!important;
  text-align:left!important;
}
.lpv-entry-content .flash-card:hover{transform:translateY(-5px)!important;border-color:#7c3aed!important}
.lpv-entry-content .flash-card > div{width:100%!important}
.lpv-entry-content .flash-icon-box{
  display:grid!important;
  width:58px!important;
  height:58px!important;
  margin:0 0 42px!important;
  place-items:center!important;
  border-radius:16px!important;
  background:#f1ebff!important;
  color:#6d28d9!important;
  font-size:0!important;
}
.lpv-entry-content .flash-icon-box::before{content:"▣";font-size:25px!important}
.lpv-entry-content .flash-title{
  display:block!important;
  margin:0 0 10px!important;
  color:var(--lpv-navy-900)!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:26px!important;
  line-height:1.1!important;
}
.lpv-entry-content .flash-desc{
  min-height:46px!important;
  margin:0 0 26px!important;
  color:var(--lpv-gray-500)!important;
  font-size:15px!important;
  line-height:1.55!important;
}
.lpv-entry-content .flash-btn{
  display:flex!important;
  min-height:46px!important;
  width:100%!important;
  padding:0 20px!important;
  align-items:center!important;
  justify-content:center!important;
  border-radius:12px!important;
  background:#6d28d9!important;
  color:#fff!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:13px!important;
  font-weight:800!important;
}

/* Galeria por artigo/tópico — ECA, LDB e futuras legislações */
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]){
  display:flex!important;
  min-height:235px!important;
  padding:26px!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  border:1px solid #dfe7ef!important;
  border-radius:20px!important;
  background:#fff!important;
  box-shadow:0 12px 32px rgba(12,35,64,.07)!important;
  text-align:left!important;
  transition:.2s ease!important;
}
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]):hover{
  transform:translateY(-4px)!important;
  border-color:#7c3aed!important;
  box-shadow:0 20px 42px rgba(12,35,64,.12)!important;
}
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]) > div:first-child{
  display:grid!important;
  width:48px!important;
  height:48px!important;
  margin:0 0 28px!important;
  place-items:center!important;
  border-radius:14px!important;
  background:#f1ebff!important;
  color:#6d28d9!important;
  font-size:0!important;
}
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]) > div:first-child::before{content:"▤";font-size:22px!important}
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]) h3{
  margin:0 0 8px!important;
  color:var(--lpv-navy-900)!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:20px!important;
  line-height:1.2!important;
  text-transform:capitalize!important;
}
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]) p{
  margin:0 0 22px!important;
  color:var(--lpv-gray-500)!important;
  font-size:14px!important;
}
.lpv-entry-content .grid > div:has(> button[onclick*="abrirFlashcards"]) > div:last-of-type{
  width:100%!important;
  margin-top:auto!important;
}
.lpv-entry-content button[onclick*="abrirFlashcards"]{
  display:flex!important;
  min-height:44px!important;
  width:100%!important;
  padding:0 18px!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  border-radius:12px!important;
  background:#6d28d9!important;
  color:#fff!important;
  font-family:var(--lpv-font-heading)!important;
  font-size:12px!important;
  font-weight:800!important;
  cursor:pointer!important;
}

@media(max-width:760px){
  .lpv-entry-content .grid:has(> .simulado-card),
  .lpv-entry-content .grid:has(> .flash-card),
  .lpv-entry-content .grid:has(> div button[onclick*="abrirFlashcards"]){grid-template-columns:1fr!important}
  .lpv-entry-content .simulado-card,.lpv-entry-content .flash-card{min-height:260px!important;padding:24px!important}
}
