/* ============================================================
   PICNIC Helper — tabs.css
   Tab-specific styles & overrides
   Versi 1.0 · Mei 2026
   ============================================================ */

/* ===== PRINT BUTTON IN HEADER ===== */
.tab-header-top button[onclick*="print"] {
  transition: all .15s;
}
.tab-header-top button[onclick*="print"]:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ===== TAB KALKULATOR ===== */
#calcsub-ett .theory-dropdown,
#calcsub-drug .theory-dropdown { margin-top: 8px; }

/* Input row label wrap on mobile */
@media(max-width:480px) {
  .input-row { flex-wrap: wrap; }
  .input-row label { min-width: 100%; margin-bottom: 2px; }
  .input-row input, .input-row select { width: 100%; }
}

/* ===== TAB VENTILASI ===== */
/* Condition cards spacing */
#sub-ventilasi-kondisi .cc { margin-bottom: 12px; }

/* ===== TAB FARMAKOLOGI ===== */
/* Drug table compact on mobile */
@media(max-width:640px) {
  .drug-table td:nth-child(4),
  .drug-table th:nth-child(4) { display: none; } /* hide konsentrasi column */
}

/* ===== TAB SKOR ===== */
.skor-calc-box + .skor-calc-box { margin-top: 4px; }

/* Skor result badge colors */
.skor-result[style*="green"] { border-color: var(--green) !important; }
.skor-result[style*="red"] { border-color: var(--red) !important; }
.skor-result[style*="amber"] { border-color: var(--amber) !important; }

/* ===== TAB TEORI ===== */
.teori-card + .sec { margin-top: 24px; }
.concept-box + .concept-box { margin-top: 8px; }
.algo-step + .algo-step { }

/* ===== TAB CAIRAN ===== */
/* Formula note highlight */
.formula-note strong { color: var(--blue); }

/* ===== TAB REFERENSI ===== */
.ri .rl { display: inline-block; margin-top: 2px; }

/* ===== GLOBAL: DATA-PATIENT FADE ===== */
[data-patient] {
  transition: opacity .15s;
}
[data-patient][style*="display: none"],
[data-patient][style*="display:none"] {
  display: none !important;
}

/* ===== OFFLINE INDICATOR ===== */
.offline-banner {
  display: none;
  background: var(--amber-bg);
  border-bottom: .5px solid var(--amber);
  color: var(--amber);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 16px;
  text-align: center;
}
.offline-banner.show { display: block; }

/* ===== TOAST NOTIFICATION ===== */
.picnic-toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--text);
  color: var(--bg);
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  transition: all .25s;
  pointer-events: none;
  z-index: 9999;
  white-space: nowrap;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
.picnic-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ===== STICKY SUBTAB ON SCROLL ===== */
.subtab-bar {
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 90;
  border-bottom: .5px solid var(--border);
  margin-bottom: 0;
}
.tab-body { padding-top: 16px; }
