/* peso-fetal-calc.css — Calculadora de Peso Fetal · AlvusMed */

/* ── Overlay ────────────────────────────────────────────────────────────── */
.pfc-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 5, 15, 0.78);
  backdrop-filter: blur(3px);
  z-index: 9900;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.pfc-overlay.pfc-open { display: flex; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.pfc-modal {
  background: #0d1b2e;
  border: 1px solid #1e3a54;
  border-radius: 10px;
  width: 100%;
  max-width: 680px;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0, 180, 255, 0.10), 0 8px 32px rgba(0,0,0,0.6);
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.pfc-hdr {
  background: #0a1524;
  border-bottom: 1px solid #1e3a54;
  padding: 12px 16px 10px;
  flex-shrink: 0;
}
.pfc-hdr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.pfc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #00e5ff;
  letter-spacing: 0.04em;
  font-family: Consolas, monospace;
}
.pfc-close {
  background: none;
  border: 1px solid #334155;
  border-radius: 4px;
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1;
  padding: 2px 7px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.pfc-close:hover { color: #e2e8f0; border-color: #00e5ff; }

/* ── IG bar ──────────────────────────────────────────────────────────────── */
.pfc-ig-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pfc-ig-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: #4a8fa8;
  font-family: Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pfc-ig-in {
  width: 56px;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 5px;
  color: #e2e8f0;
  font-family: Consolas, monospace;
  font-size: 0.82rem;
  padding: 4px 7px;
  outline: none;
  text-align: center;
  transition: border-color 0.15s;
}
.pfc-ig-in--sm { width: 38px; }
.pfc-ig-in:focus { border-color: #00e5ff; }
.pfc-ig-sep, .pfc-ig-unit { font-size: 0.72rem; color: #64748b; font-family: Consolas, monospace; }
.pfc-ig-display {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00e5ff;
  font-family: Consolas, monospace;
}
.pfc-ig-edit {
  font-size: 0.62rem;
  color: #3b5470;
  font-family: Consolas, monospace;
  background: none;
  border: 1px solid #1e3a54;
  border-radius: 3px;
  padding: 2px 7px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.pfc-ig-edit:hover { color: #00e5ff; border-color: #00e5ff55; }
.pfc-refs { margin-left: auto; font-size: 0.6rem; color: #3b5470; font-style: italic; font-family: Consolas, monospace; }

/* ── Body / grid ─────────────────────────────────────────────────────────── */
.pfc-body {
  overflow-y: auto;
  flex: 1;
  padding: 12px 14px;
}
.pfc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.pfc-card {
  background: #111f35;
  border: 1px solid #1e3a54;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.pfc-card--wide { grid-column: 1 / -1; }
.pfc-card--sug  { border-color: #00e5ff22; }

.pfc-card-hdr {
  background: #0a1828;
  padding: 6px 10px;
  font-size: 0.66rem;
  font-weight: 700;
  color: #4a8fa8;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: Consolas, monospace;
  border-bottom: 1px solid #1e3a54;
}

.pfc-card-in {
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pfc-lbl {
  font-size: 0.62rem;
  color: #64748b;
  font-family: Consolas, monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ── Sexo buttons ────────────────────────────────────────────────────────── */
.pfc-sexo-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px 6px;
}
.pfc-sexo-btn {
  flex: 1;
  padding: 7px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  font-family: Consolas, monospace;
  background: #1a2e44;
  border: 1px solid #2a4060;
  border-radius: 5px;
  color: #94a3b8;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: center;
}
.pfc-sexo-btn:hover {
  background: rgba(0,200,255,0.10);
  border-color: #00b8d4;
  color: #cef0ff;
}
.pfc-sexo-btn--active {
  background: rgba(0,18,36,0.82);
  border-color: transparent;
  color: #cef0ff;
  position: relative;
  isolation: isolate;
}
.pfc-sexo-btn--active::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(
    from var(--neon-angle, 0deg),
    #001828 0%, #003655 10%, #005f80 22%, #00aad4 36%,
    #00e0ff 44%, #7df9ff 49%, #ffffff 50%, #7df9ff 51%,
    #00e0ff 56%, #00aad4 64%, #005f80 78%, #003655 90%, #001828 100%
  );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 2px;
  z-index: -1;
  pointer-events: none;
}

/* ── Toggle label ────────────────────────────────────────────────────────── */
.pfc-toggle-lbl {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.62rem;
  color: #64748b;
  font-family: Consolas, monospace;
  cursor: pointer;
  padding: 4px 10px 8px;
}
.pfc-toggle-lbl input[type="checkbox"] { accent-color: #00e5ff; }

/* ── Inputs ──────────────────────────────────────────────────────────────── */
.pfc-inp {
  background: #1a2e44;
  border: 1px solid #2a4060;
  border-radius: 4px;
  color: #e2e8f0;
  font-family: Consolas, monospace;
  font-size: 1rem;
  padding: 6px 10px;
  outline: none;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.pfc-inp:focus { border-color: #00e5ff; }

/* ── Calc bio button ─────────────────────────────────────────────────────── */
.pfc-btn-bio {
  background: #0d2035;
  border: 1px solid #2a4060;
  border-radius: 4px;
  color: #64748b;
  font-family: Consolas, monospace;
  font-size: 0.62rem;
  padding: 5px 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  text-align: left;
}
.pfc-btn-bio:not(:disabled):hover {
  background: #112840;
  border-color: #00e5ff55;
  color: #00e5ff;
}
.pfc-btn-bio:disabled { opacity: 0.35; cursor: not-allowed; }

.pfc-bio-hint {
  font-size: 0.58rem;
  color: #3b5470;
  font-family: Consolas, monospace;
}
.pfc-bio-hint--ok { color: #22c55e; }

/* ── Resultado ───────────────────────────────────────────────────────────── */
.pfc-res-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }

.pfc-res-row-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.pfc-res-big {
  font-size: 2.2rem;
  font-weight: 700;
  color: #00e5ff;
  font-family: Consolas, monospace;
  line-height: 1;
}

.pfc-rrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pfc-rrow > span:first-child {
  font-size: 0.62rem;
  color: #64748b;
  font-family: Consolas, monospace;
}
.pfc-rrow > span:last-child {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-family: Consolas, monospace;
}
.pfc-class-txt {
  font-size: 0.64rem;
  color: #94a3b8;
  font-family: Consolas, monospace;
  margin-top: 4px;
  font-style: italic;
}

/* ── Status chips ────────────────────────────────────────────────────────── */
.pfc-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  font-family: Consolas, monospace;
  padding: 3px 10px;
  border-radius: 4px;
  border: 1px solid transparent;
  background: #1e293b;
  color: #64748b;
}
.pfc-chip--verde    { background: rgba(34,197,94,0.12);  color: #4ade80; border-color: rgba(34,197,94,0.30);  }
.pfc-chip--amarelo  { background: rgba(234,179,8,0.12);  color: #fbbf24; border-color: rgba(234,179,8,0.30);  }
.pfc-chip--vermelho { background: rgba(239,68,68,0.14);  color: #f87171; border-color: rgba(239,68,68,0.32);  }

/* ── Barra de percentil ──────────────────────────────────────────────────── */
.pfc-bar-wrap {
  position: relative;
  margin: 8px 0 18px;
  height: 38px;
}
.pfc-bar-track {
  position: relative;
  height: 10px;
  border-radius: 5px;
  overflow: visible;
  background: #1a2e44;
  margin-bottom: 6px;
}
.pfc-bar-seg {
  position: absolute;
  top: 0;
  height: 100%;
}
.pfc-bar--cir  { background: rgba(239,68,68,0.55);    border-radius: 5px 0 0 5px; }
.pfc-bar--pig  { background: rgba(234,179,8,0.45);    }
.pfc-bar--aig  { background: rgba(34,197,94,0.35);    }
.pfc-bar--gig  { background: rgba(234,179,8,0.45);    }
.pfc-bar--gigp { background: rgba(239,68,68,0.55);    border-radius: 0 5px 5px 0; }

.pfc-bar-marker {
  position: absolute;
  top: -3px;
  width: 3px;
  height: 16px;
  background: #ffffff;
  border-radius: 2px;
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255,255,255,0.6);
  pointer-events: none;
}

.pfc-bar-lbls {
  position: relative;
  height: 14px;
}
.pfc-bar-lbls span {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.52rem;
  color: #3b5470;
  font-family: Consolas, monospace;
  white-space: nowrap;
}

/* ── Sugestão ────────────────────────────────────────────────────────────── */
.pfc-sug-txt {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-family: Consolas, monospace;
  line-height: 1.55;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.pfc-footer {
  border-top: 1px solid #1e3a54;
  background: #0a1524;
  padding: 10px 14px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pfc-footer-row { display: flex; justify-content: flex-end; }

.pfc-btn-apply {
  background: #003344;
  border: 1px solid #00e5ff55;
  border-radius: 5px;
  color: #00e5ff;
  font-family: Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 18px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pfc-btn-apply:hover {
  background: #004d66;
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0,229,255,0.18);
}

.pfc-disclaimer {
  font-size: 0.58rem;
  color: #334155;
  font-family: Consolas, monospace;
  line-height: 1.5;
  text-align: center;
}

/* ── Panel open button ───────────────────────────────────────────────────── */
.pfc-open-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  padding: 4px 0;
  background: #0d2035;
  border: 1px solid #00e5ff33;
  border-radius: 5px;
  color: #00b8d4;
  font-family: Consolas, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  margin-bottom: 6px;
  transition: background 0.15s, border-color 0.15s;
}
.pfc-open-btn:hover { background: #112840; border-color: #00e5ff66; color: #00e5ff; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
.pfc-body::-webkit-scrollbar { width: 5px; }
.pfc-body::-webkit-scrollbar-track { background: transparent; }
.pfc-body::-webkit-scrollbar-thumb { background: #1e3a54; border-radius: 3px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .pfc-grid { grid-template-columns: 1fr; }
  .pfc-card--wide { grid-column: 1; }
}
