/* Astrenmed • Traçados de ECG (inc/ecg/). Papel em escala real: 1 mm do SVG = 1 quadradinho. */
.mfecg-fig { margin: 18px 0; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; overflow: hidden; }
.mfecg-fig-cab { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid #eef2f6; }
.mfecg-fig-cab i { color: #e11d48; }
.mfecg-fig-cab strong { font-size: 14.5px; color: #0f172a; }
.mfecg-fig-cab small { margin-left: auto; color: #64748b; font-size: 11.5px; font-weight: 600; }
.mfecg-fig-leg { padding: 10px 16px 14px; color: #475569; font-size: 13.5px; line-height: 1.6; border-top: 1px solid #eef2f6; }
.mfecg-fig-leg strong { color: #0f172a; }

.mfecg-rolagem { background: #fff7f8; }
.mfecg-svg { display: block; width: 100%; height: auto; }
.mfecg-papel { fill: #fff7f8; }
.mfecg-fina { stroke: #fbcfe0; stroke-width: .12; fill: none; }
.mfecg-grossa { stroke: #f19bb8; stroke-width: .3; fill: none; }
.mfecg-traco { stroke: #111827; stroke-width: .42; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.mfecg-lead { font: 700 3px Inter, system-ui, sans-serif; fill: #334155; }
.mfecg-rot { font: 700 2.2px Inter, system-ui, sans-serif; fill: #0f766e; }
.mfecg-rot-bl { fill: #dc2626; }
.mfecg-rot-pr { fill: #1d4ed8; font-weight: 600; }
.mfecg-rot-esc { fill: #7c3aed; }
.mfecg-p { fill: #0f766e; }
.mfecg-p-bl { fill: #dc2626; }
.mfecg-medida { stroke: #1d4ed8; stroke-width: .25; fill: none; }
.mfecg-marc { transition: opacity .2s; }
.mfecg-sem-marc .mfecg-marc { opacity: 0; }

.mfecg-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 10px 16px; background: #f8fafc; border-top: 1px solid #eef2f6; font-size: 12.5px; color: #334155; }
.mfecg-barra b { color: #0f172a; margin-right: 4px; }
.mfecg-escala { color: #64748b; }
.mfecg-bt { margin-left: auto; padding: 7px 12px; border: 1px solid #cbd5e1; border-radius: 10px; background: #fff; color: #0f172a; font: 600 12.5px Inter, system-ui, sans-serif; cursor: pointer; }
.mfecg-bt:hover { border-color: #0f766e; color: #0f766e; }

.mfecg-canvas { display: block; width: 100%; height: 320px; }
.mfecg-evento { min-height: 44px; padding: 10px 16px; background: #ecfdf5; color: #065f46; font-size: 13.5px; font-weight: 600; border-top: 1px solid #d1fae5; }
.mfecg-controles { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 16px; background: #f8fafc; border-top: 1px solid #eef2f6; }
.mfecg-controles .mfecg-bt { margin-left: 0; }
.mfecg-dica { font-size: 11.5px; color: #64748b; }

.mfecg-cond-box { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 18px; align-items: center; padding: 14px 16px; }
.mfecg-cond { width: 100%; height: auto; display: block; }
.mfecg-cond-cor { fill: #fff1f2; stroke: #fda4af; stroke-width: 2; }
.mfecg-cond-septo { stroke: #fecdd3; stroke-width: 2; stroke-dasharray: 4 4; }
.mfecg-cond-via { fill: none; stroke-width: 4; stroke-linecap: round; }
.mfecg-cond-x { stroke: #dc2626; stroke-width: 4; stroke-linecap: round; }
.mfecg-cond-anel { fill: none; stroke: #d97706; stroke-width: 2; stroke-dasharray: 3 3; }
.mfecg-cond-rot { font: 600 10px Inter, system-ui, sans-serif; fill: #334155; }
.mfecg-cond-rot-alerta { fill: #b45309; }
.mfecg-cond-rot-esc { fill: #6d28d9; }
.mfecg-cond-rot-branco { fill: #fff; font-size: 8px; }
.mfecg-cond-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 12px; color: #475569; }
.mfecg-cond-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.mfecg-cond-txt { font-size: 14px; line-height: 1.65; color: #334155; }
.mfecg-cond-txt p { margin: 0 0 8px; }

@media (max-width: 700px) {
    .mfecg-cond-box { grid-template-columns: 1fr; }
    .mfecg-bt { margin-left: 0; }
}

/* Botões dentro dos artigos (o CSS do artigo zera estilos de <button>). */
.mfecg-fig .mfecg-bt { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px !important; border: 1px solid #cbd5e1 !important; border-radius: 10px !important;
    background: #fff !important; color: #0f172a !important; font: 600 12.5px Inter, system-ui, sans-serif !important; line-height: 1.2; cursor: pointer; box-shadow: none !important; }
.mfecg-fig .mfecg-bt:hover { border-color: #0f766e !important; color: #0f766e !important; }

.mfecg-rot-rr { fill: #b45309; }
.mfecg-medida-rr { stroke: #b45309; }
.mfecg-lead-jvp { fill: #1d4ed8; font-size: 2.6px; }
.mfecg-traco-jvp { stroke: #1d4ed8; }

/* Ampliar (tela cheia) */
html.mfecg-zoom-aberto { overflow: hidden; }
.mfecg-zoom { position: fixed; inset: 0; z-index: 2147483000; display: flex; flex-direction: column; background: rgba(15,23,42,.92); }
.mfecg-zoom-cab { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #0f172a; color: #fff; }
.mfecg-zoom-cab strong { font: 700 14px Inter, system-ui, sans-serif; margin-right: auto; }
.mfecg-zoom-dica { font: 500 12px Inter, system-ui, sans-serif; color: #94a3b8; }
.mfecg-zoom-cab button { width: 38px; height: 38px; border: 1px solid #334155 !important; border-radius: 10px !important; background: #1e293b !important; color: #fff !important; font: 700 18px Inter, system-ui, sans-serif !important; cursor: pointer; padding: 0 !important; }
.mfecg-zoom-area { flex: 1; overflow: auto; cursor: grab; scrollbar-width: none; display: block; padding: 16px; touch-action: none; }
.mfecg-zoom-area::-webkit-scrollbar { display: none; }
.mfecg-zoom-area:active { cursor: grabbing; }
.mfecg-zoom-area svg { display: block; height: auto; margin: 0 auto; background: #fff7f8; border-radius: 8px; }
.mfecg-zoom-area .mfecg-cond { background: #fff; padding: 12px; }
@media (max-width: 700px) { .mfecg-zoom-dica { display: none; } }
.mfecg-rot-mp { fill: #ea580c; }
