/* ===================================================
   matrix.css - STYLING MODAL MATRIX VIEW (Timeline Panjang)
   =================================================== */

/* Lebar dan tinggi kontainer modal matriks diperbesar optimal untuk timeline lintas bulan */
#matrixModal .timeline-modal-content {
    max-width: 98vw !important;
    width: 98vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
    display: flex;
    flex-direction: column;
}

/* Kotak tabel matriks dengan dukungan scroll horizontal & vertikal penuh agar bilah gulir samping muncul. */
.matrix-table-container {
    flex: 1;
    min-width: 0;
    min-height: 0;
    overflow-x: auto !important;
    overflow-y: auto !important;
    margin-top: 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    position: relative;
    width: 100%;
}

/* Memastikan elemen tabel di dalam kontainer mendukung peluberan lebar (max-content) lintas banyak kolom/minggu */
.matrix-table-container table {
    width: max-content !important;
    min-width: 100% !important;
    border-collapse: collapse;
}

/* Efek hover pada baris utama kategori */
.matrix-row-main:hover {
    background-color: #f1f5f9 !important;
}

/* Styling border tabel secara umum */
.matrix-table-container table th,
.matrix-table-container table td {
    border-color: #e2e8f0;
}

/* Scrollbar kustom agar bilah gulir (terutama yang horizontal) terlihat jelas */
.matrix-table-container::-webkit-scrollbar {
    height: 10px;
    width: 10px;
}

.matrix-table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 8px;
}

.matrix-table-container::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 8px;
}

.matrix-table-container::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Mencegah menu callout (copy/select) muncul saat tekan-tahan (long press) di iOS/Safari,
   serta menghilangkan efek highlight abu-abu bawaan saat sel disentuh di layar sentuh,
   supaya interaksi drag-pindah aktivitas via sentuhan (touch) terasa mulus. */
.matrix-table-container table td {
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}