/* Paleta alinhada à identidade, tons suavizados para combinar com o restante do site */
.plancore-leis-single {
  --plancore-font-family: inherit;
  --plancore-ink: #2c3338;
  --plancore-muted: #6e6e6e;
  --plancore-bg-deep: #1a4539;
  --plancore-green-dark: #2a6b38;
  --plancore-green-mid: #4a9359;
  --plancore-lime: #c5d96a;
  --plancore-olive: #8aab6e;
  --plancore-cream: #e8efe0;
  --plancore-surface: #ffffff;
  --plancore-surface-soft: #f7faf7;
  --plancore-accent: #356a42;
  --plancore-accent-2: #4a9359;
  --plancore-accent-soft: rgba(53, 106, 66, 0.1);
  --plancore-radius: 12px;
  background: transparent;
  border: none;
  box-shadow: none;
  border-radius: 0;
  padding: 0;
  color: var(--plancore-ink);
  font-family: var(--plancore-font-family);
}

.plancore-leis-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
  justify-content: center;
}

.plancore-lei-tab,
.plancore-lei-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 42px;
  border-radius: 10px;
  border: 2px solid var(--plancore-accent);
  background: var(--plancore-surface);
  color: var(--plancore-accent);
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.25;
  text-align: center;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease,
    transform 0.15s ease;
}

.plancore-leis-links .plancore-lei-link[role="link"] {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.plancore-lei-tab:focus-visible,
.plancore-lei-link:focus-visible {
  outline: 2px solid var(--plancore-accent-2);
  outline-offset: 2px;
}

.plancore-lei-tab.is-active {
  background: linear-gradient(180deg, #4d9660 0%, var(--plancore-green-dark) 100%);
  border-color: var(--plancore-green-dark);
  color: #ffffff;
  box-shadow: 0 3px 12px rgba(42, 107, 56, 0.28);
}

.plancore-lei-tab:not(.is-active):hover {
  background: var(--plancore-accent-soft);
  color: var(--plancore-green-dark);
  border-color: var(--plancore-accent-2);
}

.plancore-leis-panel {
  display: grid;
  grid-template-areas: "lei-stack";
  position: relative;
  min-height: 120px;
  border-radius: var(--plancore-radius);
  overflow: hidden;
  box-shadow: 0 4px 22px rgba(0, 0, 0, 0.07);
}

.plancore-lei-item {
  grid-area: lei-stack;
  align-self: start;
  width: 100%;
  margin: 0;
  padding: 18px;
  border-radius: 0;
  background: var(--plancore-surface-soft);
  border: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.plancore-lei-item.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.plancore-lei-pane-inner {
  will-change: opacity, transform;
}

.plancore-lei-pane-inner.plancore-fade-in {
  animation: plancoreFadeIn 0.5s ease both;
}

@keyframes plancoreFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.plancore-lei-title {
  margin: 0 0 16px;
  font-size: 1.45rem;
  line-height: 1.25;
  font-weight: 700;
  color: var(--plancore-ink);
}

.plancore-lei-fields {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.plancore-lei-field {
  margin: 0;
}

.plancore-lei-field dt.plancore-lei-label {
  margin: 0 0 4px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--plancore-ink);
}

.plancore-lei-field dd {
  margin: 0;
}

.plancore-lei-hint {
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--plancore-muted);
  margin-bottom: 6px !important;
}

.plancore-lei-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--plancore-green-dark);
}

.plancore-lei-value--money {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.plancore-lei-progress-wrap {
  margin-top: 20px;
  padding: 14px 14px 12px;
  border-radius: 12px;
}

.plancore-lei-progress-head {
  display: flex;
  justify-content: flex-start;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 10px;
}

.plancore-lei-progress-side {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.plancore-lei-progress-side--right {
  text-align: right;
}

.plancore-lei-progress-kicker {
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #3f5f4c;
}

.plancore-lei-progress-amount {
  font-size: 1.18rem;
  line-height: 1.1;
  color: var(--plancore-green-dark);
  font-variant-numeric: tabular-nums;
}

.plancore-lei-progress {
  position: relative;
  height: 22px;
  border-radius: 999px;
  background: #edf4ed;
  box-shadow: inset 0 1px 2px rgba(42, 107, 56, 0.1);
  overflow: hidden;
  border: 1px solid rgba(53, 106, 66, 0.15);
}

.plancore-lei-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #5d9667 0%, #4a9359 48%, #356a42 100%);
  box-shadow: 0 0 8px rgba(53, 106, 66, 0.22);
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.plancore-lei-progress-foot {
  margin: 8px 0 0;
  text-align: right;
  font-size: 0.85rem;
  color: #3f5f4c;
  font-weight: 600;
}

.plancore-lei-progress-foot strong {
  font-size: 1rem;
  color: var(--plancore-green-dark);
  font-variant-numeric: tabular-nums;
}

.plancore-leis-links {
  --plancore-font-family: inherit;
  /* Mesma linguagem do CTA "Saiba Mais" do card (sage sólido + branco) */
  --plancore-cta-sage: #769557;
  --plancore-cta-sage-mid: #82a362;
  --plancore-cta-sage-deep: #5f7a47;
  font-family: var(--plancore-font-family);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  align-items: flex-start;
}

.plancore-leis-links .plancore-lei-link {
  color: #ffffff;
  background: linear-gradient(180deg, var(--plancore-cta-sage-mid) 0%, var(--plancore-cta-sage) 55%, var(--plancore-cta-sage-deep) 100%);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.plancore-leis-links .plancore-lei-link:hover {
  color: #ffffff;
  background: linear-gradient(180deg, #8fb06e 0%, var(--plancore-cta-sage-mid) 45%, var(--plancore-cta-sage) 100%);
  border-color: rgba(0, 0, 0, 0.22);
  box-shadow: 0 4px 14px rgba(47, 74, 36, 0.35);
}

.plancore-leis-links .plancore-lei-link:focus-visible {
  outline-color: var(--plancore-cta-sage-mid);
}

.plancore-leis-links--inline .plancore-lei-link {
  flex: 0 1 auto;
}

/* Linha com quebra natural: nao forca duas colunas iguais (evita alturas desiguais com nomes longos). */
.plancore-leis-links--compact .plancore-lei-link {
  flex: 0 1 auto;
  min-width: min(100%, 10rem);
  max-width: 100%;
  align-self: flex-start;
}

.plancore-leis-links--stack {
  flex-direction: column;
  align-items: stretch;
}

.plancore-leis-links--stack .plancore-lei-link {
  width: 100%;
  align-self: stretch;
}

.elementor-widget-container .plancore-leis-links .plancore-lei-link,
.elementor-element .plancore-leis-links .plancore-lei-link,
.e-con .plancore-leis-links .plancore-lei-link {
  color: #ffffff !important;
  background: linear-gradient(180deg, #82a362 0%, #769557 55%, #5f7a47 100%) !important;
  border: 2px solid rgba(0, 0, 0, 0.18) !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12) !important;
}

.elementor-widget-container .plancore-leis-links .plancore-lei-link:hover,
.elementor-element .plancore-leis-links .plancore-lei-link:hover,
.e-con .plancore-leis-links .plancore-lei-link:hover {
  color: #ffffff !important;
  background: linear-gradient(180deg, #8fb06e 0%, #82a362 45%, #769557 100%) !important;
  border-color: rgba(0, 0, 0, 0.22) !important;
  box-shadow: 0 4px 14px rgba(47, 74, 36, 0.35) !important;
}

.plancore-leis-empty {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--plancore-surface-soft);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: var(--plancore-ink);
}

@media (max-width: 768px) {
  .plancore-lei-progress-head {
    align-items: flex-start;
  }

  .plancore-lei-progress-side--right {
    text-align: left;
  }

  .plancore-lei-progress-amount {
    font-size: 1.04rem;
  }

  .plancore-lei-progress-foot {
    text-align: left;
  }
}
