/* Módulo 1 — Leis ponderais (Química · Setor C) */
@import url("../../biologia/modulo-1/modulo.css");

.lesson--quimica {
  --chem-teal: #009688;
  --chem-teal-dark: #00796b;
  --chem-teal-soft: rgba(0, 150, 136, 0.12);
  --chem-pink: #e94d81;
  --chem-pink-soft: rgba(236, 64, 122, 0.12);
  --chem-amber: #fff8e1;
  --chem-amber-border: #ffcc80;
}

[data-theme="dark"] .lesson--quimica {
  --chem-teal-soft: rgba(0, 150, 136, 0.22);
  --chem-pink-soft: rgba(236, 64, 122, 0.15);
  --chem-amber: rgba(255, 193, 7, 0.12);
}

.lesson--quimica {
  --lesson-teal: var(--chem-teal);
  --lesson-teal-soft: var(--chem-teal-soft);
  --lesson-cover-pink: var(--chem-pink);
  --lesson-cover-teal: var(--chem-teal);
  --lesson-video-btn: #c62828;
}

.lesson--quimica .lesson-meta {
  color: var(--chem-teal);
}

.lesson--quimica .lesson-badge {
  background: var(--chem-pink);
}

.lesson--quimica h1 {
  border-bottom-color: var(--chem-teal);
}

.lesson--quimica .lesson-toc {
  border-left-color: var(--chem-teal);
}

.lesson--quimica .lesson-toc a:hover {
  color: var(--chem-teal);
}

.lesson-hero--chem {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 1.5rem 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.lesson-hero--chem__visual {
  min-height: 200px;
  background: linear-gradient(
      165deg,
      #1a237e 0%,
      #311b92 25%,
      #bf360c 55%,
      #ff6f00 85%,
      #ffcc80 100%
    );
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1.5rem;
}

.lesson-hero--chem__glow {
  position: absolute;
  bottom: 28%;
  left: 50%;
  transform: translateX(-50%);
  width: min(280px, 70%);
  height: 80px;
  background: radial-gradient(
    ellipse at center,
    rgba(255, 200, 100, 0.95) 0%,
    rgba(255, 120, 40, 0.5) 45%,
    transparent 70%
  );
  filter: blur(4px);
  pointer-events: none;
}

.lesson-hero--chem__ingots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 4px;
  align-self: flex-end;
  margin-right: auto;
  margin-bottom: 0.5rem;
}

.lesson-hero--chem__ingot {
  width: 22px;
  height: 56px;
  background: linear-gradient(90deg, #b0bec5, #eceff1, #90a4ae);
  border-radius: 2px;
  box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.35);
}

.lesson-hero--chem__caption {
  margin: 0;
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.lesson-refletir-title--chem {
  color: var(--chem-teal) !important;
}

.chem-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.5rem 0.35rem;
  align-items: center;
  max-width: 520px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chem-flow__cell {
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--chem-teal-soft);
}

.chem-flow__cell strong {
  display: block;
  color: var(--chem-teal-dark);
  margin-top: 0.35rem;
  font-size: 0.95rem;
}

.chem-flow__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.chem-flow__arrow {
  font-size: 1.25rem;
  color: var(--chem-teal);
  text-align: center;
}

.chem-flow__arrow small {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 6rem;
  margin: 0 auto;
}

.chem-flow__note {
  grid-column: 1 / -1;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  margin: 0.25rem 0 0;
}

.chem-flow-v {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  max-width: 440px;
  margin: 1.5rem auto;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.chem-flow-v__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.75rem;
}

.chem-flow-v__arrow {
  font-size: 1.4rem;
  color: var(--chem-teal);
  padding: 0.15rem 0;
}

.chem-flow-v__arrow small {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.law-definition {
  margin: 1.25rem 0;
  padding: 1rem 1.15rem;
  background: var(--chem-amber);
  border: 1px solid var(--chem-amber-border);
  border-radius: var(--radius);
  font-weight: 600;
}

.law-definition p {
  margin: 0;
}

.chem-scale-demo {
  margin: 1.5rem 0;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.chem-scale-demo svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.chem-eq-rows {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
  font-size: 0.95rem;
}

.chem-eq-rows p {
  margin: 0.35rem 0;
}

table.chem-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

table.chem-table th,
table.chem-table td {
  padding: 0.65rem 0.5rem;
  text-align: center;
  border: 1px solid var(--border);
}

table.chem-table thead th {
  background: var(--chem-teal);
  color: #fff;
  font-weight: 600;
}

table.chem-table thead th:not(:first-child) {
  background: #26a69a;
}

table.chem-table tbody tr:nth-child(even) {
  background: var(--chem-teal-soft);
}

table.chem-table--methane thead th {
  background: var(--chem-teal-dark);
}

.math-block {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  text-align: center;
  background: var(--bg);
  border-radius: var(--radius);
  overflow-x: auto;
}

.math-block--inline {
  text-align: left;
}

.callout--chem-video {
  border-left-color: #c62828 !important;
  background: rgba(198, 40, 40, 0.06) !important;
}

.callout--chem-video .callout__title {
  color: #c62828 !important;
}

.lesson-glossary--chem-blue {
  border-left-color: #1565c0 !important;
  background: rgba(21, 101, 192, 0.08) !important;
}

.lesson-glossary--chem-blue dt {
  color: #1565c0 !important;
}

.chem-subheading {
  margin: 2rem 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--chem-teal-dark);
}

.chem-glass-svg {
  float: right;
  margin: 0 0 1rem 1rem;
  shape-outside: inset(0);
}

@media (max-width: 600px) {
  .chem-glass-svg {
    float: none;
    display: block;
    margin: 1rem auto;
  }
}

.lesson-summary--quimica {
  margin-top: 2.5rem;
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius);
  background: var(--chem-teal-soft);
  border: 1px solid rgba(0, 150, 136, 0.35);
}

.lesson-summary--quimica h2 {
  margin-top: 0 !important;
  border-bottom-color: rgba(0, 150, 136, 0.4) !important;
}

.chem-katex-hint {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.5rem;
}
