/* doppler-calc.css — Calculadora Doppler Obstétrica · AlvusMed */

/* ── Overlay ────────────────────────────────────────────────────────────── */
.dpc-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;
}
.dpc-overlay.dpc-open {
  display: flex;
}

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

/* ── Header ──────────────────────────────────────────────────────────────── */
.dpc-hdr {
  background: #0a1524;
  border-bottom: 1px solid #1e3a54;
  padding: 12px 16px 10px;
  flex-shrink: 0;
}
.dpc-hdr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.dpc-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #00e5ff;
  letter-spacing: 0.04em;
  font-family: Consolas, monospace;
}
.dpc-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;
}
.dpc-close:hover {
  color: #e2e8f0;
  border-color: #00e5ff;
}

/* ── IG bar ──────────────────────────────────────────────────────────────── */
.dpc-ig-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.dpc-ig-lbl {
  font-size: 0.7rem;
  font-weight: 700;
  color: #4a8fa8;
  font-family: Consolas, monospace;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.dpc-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;
}
.dpc-ig-in--sm {
  width: 38px;
}
.dpc-ig-in:focus {
  border-color: #00e5ff;
}
.dpc-ig-sep,
.dpc-ig-unit {
  font-size: 0.72rem;
  color: #64748b;
  font-family: Consolas, monospace;
}
.dpc-ig-display {
  font-size: 0.82rem;
  font-weight: 700;
  color: #00e5ff;
  font-family: Consolas, monospace;
}
.dpc-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;
}
.dpc-ig-edit:hover { color: #00e5ff; border-color: #00e5ff55; }
.dpc-refs {
  margin-left: auto;
  font-size: 0.6rem;
  color: #3b5470;
  font-style: italic;
  font-family: Consolas, monospace;
  white-space: nowrap;
}

/* ── Body ────────────────────────────────────────────────────────────────── */
.dpc-body {
  overflow-y: auto;
  flex: 1;
  padding: 12px 14px;
}

/* ── Card grid ───────────────────────────────────────────────────────────── */
.dpc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.dpc-card {
  background: #111f35;
  border: 1px solid #1e3a54;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.dpc-card--auto {
  border-color: #00e5ff26;
  background: #0d2035;
}

.dpc-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;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dpc-auto {
  font-size: 0.55rem;
  background: #00e5ff22;
  color: #00e5ff;
  border: 1px solid #00e5ff44;
  border-radius: 3px;
  padding: 1px 4px;
  letter-spacing: 0.08em;
}

.dpc-card-in {
  padding: 8px 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid #1a2e44;
}
.dpc-card-in label {
  font-size: 0.62rem;
  color: #64748b;
  font-family: Consolas, monospace;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dpc-inp,
.dpc-sel {
  background: #1a2e44;
  border: 1px solid #2a4060;
  border-radius: 4px;
  color: #e2e8f0;
  font-family: Consolas, monospace;
  font-size: 0.8rem;
  padding: 4px 8px;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
  box-sizing: border-box;
}
.dpc-inp:focus,
.dpc-sel:focus {
  border-color: #00e5ff;
}
.dpc-sel {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%2364748b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 24px;
}

/* ── Result rows ─────────────────────────────────────────────────────────── */
.dpc-card-res {
  padding: 6px 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}
.dpc-rrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}
.dpc-rrow > span:first-child {
  font-size: 0.62rem;
  color: #64748b;
  font-family: Consolas, monospace;
}
.dpc-rrow > span:last-child,
.dpc-rrow > strong {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-family: Consolas, monospace;
  text-align: right;
}
.dpc-rrow strong {
  color: #e2e8f0;
}

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

/* ── Warning ─────────────────────────────────────────────────────────────── */
.dpc-warn {
  font-size: 0.6rem;
  color: #f59e0b;
  padding: 5px 10px 7px;
  border-top: 1px solid #1e3a54;
  font-family: Consolas, monospace;
  line-height: 1.4;
}

/* ── Muted ───────────────────────────────────────────────────────────────── */
.dpc-muted {
  color: #3b5470;
  font-family: Consolas, monospace;
  font-size: 0.72rem;
}

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

/* ── Suggestion block ────────────────────────────────────────────────────── */
.dpc-sugestao {
  background: #0d2035;
  border: 1px solid #00e5ff26;
  border-radius: 6px;
  padding: 8px 12px;
}
.dpc-sug-title {
  font-size: 0.62rem;
  font-weight: 700;
  color: #00e5ff;
  font-family: Consolas, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.dpc-sug-txt {
  font-size: 0.72rem;
  color: #cbd5e1;
  font-family: Consolas, monospace;
  line-height: 1.55;
}

/* ── Apply button ────────────────────────────────────────────────────────── */
.dpc-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;
}
.dpc-btn-apply:hover {
  background: #004d66;
  border-color: #00e5ff;
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.18);
}

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

/* ── Calc button in panel ────────────────────────────────────────────────── */
.dpc-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;
}
.dpc-open-btn:hover {
  background: #112840;
  border-color: #00e5ff66;
  color: #00e5ff;
}

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