/* CARD-EXPAND.CSS — tombol Perluas / Perkecil pada kartu tabel dashboard mesin */
#weeklyPageMachine article.oee-panel-table,
#weeklyPageMachine article.shutdown-card,
#weeklyPageMachine article.pica-card,
#weeklyPageMachine article.mch-bar-card { position: relative; }

.cx-tools { position: absolute; top: 8px; right: 10px; display: flex; gap: 4px; z-index: 5; }
.cx-tools button { width: 26px; height: 26px; padding: 0; line-height: 1; font-size: 15px; cursor: pointer;
  border: 1px solid var(--wd-border, #cbd5e1); border-radius: 6px; background: var(--wd-card, #fff); color: inherit; }
.cx-tools button:hover { background: rgba(37, 99, 235, .12); }

/* Perkecil: tinggal judul */
article.cx-collapsed { overflow: hidden; max-height: 46px; }
/* tools = anak ke-1, judul = anak ke-2; sisanya disembunyikan */
article.cx-collapsed > *:not(.cx-tools):not(:nth-child(2)) { display: none !important; }

/* Perluas: kartu dipindah ke overlay di <body> (lihat card-expand.js) */
#cxOverlay { position: fixed; inset: 0; z-index: 9000; background: rgba(15, 23, 42, .6); padding: 10px; box-sizing: border-box; display: flex; }
#cxOverlay[hidden] { display: none; }
#cxOverlay > article.cx-expanded { position: relative; flex: 1 1 auto; width: 100%; height: 100%; margin: 0; overflow: auto;
  max-height: none; box-sizing: border-box; padding-top: 40px; background: var(--wd-card, #fff); color: var(--wd-text, inherit); }
#cxOverlay .pica-table-wrap,
#cxOverlay .shutdown-table-wrap,
#cxOverlay .speed-table-wrap,
#cxOverlay .issue-table-wrap,
#cxOverlay [class*="table-wrap"] { max-height: none !important; height: auto !important; overflow: auto; }

/* Skala grafik donat saat mode diperluas */
#cxOverlay .shutdown-donut-flex { gap: 28px; align-items: center; }
#cxOverlay .shutdown-donut { width: 280px; height: 280px; }
#cxOverlay .shutdown-legend { gap: 10px; }
#cxOverlay .sd-leg-item { font-size: 16px; gap: 10px; }
#cxOverlay .sd-leg-dot { width: 12px; height: 12px; }
#cxOverlay .sd-leg-label { white-space: normal; font-size: 17px; }
#cxOverlay .sd-leg-meta { font-size: 14px; }
body.cx-open { overflow: hidden; }

/* Mode Fokus Log Sheet */
.cx-hide { display: none !important; }
body.cx-focus-log #appContainer { padding-top: 8px; }
body.cx-focus-log #tblWrap { max-height: calc(100vh - 130px) !important; }
#cxFocusExit { position: fixed; top: 8px; right: 14px; z-index: 9500; width: 36px; height: 36px; padding: 0; font-size: 18px; font-weight: 700; line-height: 1; cursor: pointer;
  border: 1px solid #94a3b8; border-radius: 8px; background: #fff; color: #0f172a; box-shadow: 0 4px 14px rgba(0,0,0,.2); }
#cxFocusExit[hidden] { display: none; }
