/* NoteSmart V81: perbaiki scroll halaman dan tombol template piket/jurnal yang terlalu sensitif. */
html.ns-v81-scroll-safe,
html.ns-v81-scroll-safe body,
html.ns-v81-scroll-safe #root{
  min-height:100% !important;
  height:auto !important;
  max-height:none !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior-y:auto !important;
  touch-action:pan-y !important;
  -webkit-overflow-scrolling:touch !important;
}
html.ns-v81-scroll-safe body.ns-signature-drawing:not(.ns-v81-actually-signing),
html.ns-v81-scroll-safe body.ns-v81-force-scroll{
  overflow-y:auto !important;
  touch-action:pan-y !important;
}
html.ns-v81-scroll-safe #root,
html.ns-v81-scroll-safe #root > div,
html.ns-v81-scroll-safe main,
html.ns-v81-scroll-safe [data-testid="admin-main"],
html.ns-v81-scroll-safe [data-testid="admin-content"]{
  min-height:0 !important;
  max-height:none !important;
  overflow-y:visible !important;
  touch-action:pan-y !important;
}
html.ns-v81-scroll-safe main{
  padding-bottom:calc(124px + env(safe-area-inset-bottom,0px)) !important;
}
/* V80 sempat membuat beberapa wrapper menjadi overflow:auto, ini bisa menangkap scroll vertikal. */
html.ns-v81-scroll-safe .ns-v80-table-wrap,
html.ns-v81-scroll-safe .overflow-x-auto{
  overflow-x:auto !important;
  overflow-y:visible !important;
  -webkit-overflow-scrolling:touch !important;
}
html.ns-v81-scroll-safe .ns-v80-card,
html.ns-v81-scroll-safe main section,
html.ns-v81-scroll-safe main .ns-card{
  max-height:none !important;
}
/* Jangan potong isi halaman jurnal/piket/pengaturan agar halaman tetap bisa lanjut discroll. */
html.ns-page-jurnal.ns-v81-scroll-safe .ns-v80-card,
html.ns-page-piket.ns-v81-scroll-safe .ns-v80-card,
html.ns-page-pengaturan.ns-v81-scroll-safe .ns-v80-card,
html.ns-page-jurnal.ns-v81-scroll-safe main section,
html.ns-page-piket.ns-v81-scroll-safe main section,
html.ns-page-pengaturan.ns-v81-scroll-safe main section{
  overflow:visible !important;
}

/* Template piket di isian jurnal: tombol dibuat kecil, tidak memenuhi layar, dan tidak mudah kepencet saat scroll. */
html.ns-v81-scroll-safe #ns-picket-helper{
  overflow:visible !important;
  touch-action:pan-y !important;
}
html.ns-v81-scroll-safe #ns-picket-helper .ns-picket-actions{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-start !important;
  align-items:center !important;
  gap:8px !important;
  margin-top:10px !important;
  touch-action:pan-y !important;
}
html.ns-v81-scroll-safe #ns-picket-helper .ns-dp-btn,
html.ns-v81-scroll-safe #ns-picket-helper button[data-fill-act],
html.ns-v81-scroll-safe #ns-picket-helper #ns-dp-fill-all{
  width:auto !important;
  min-width:0 !important;
  max-width:calc(100vw - 72px) !important;
  min-height:36px !important;
  padding:8px 12px !important;
  border-radius:999px !important;
  font-size:12.5px !important;
  line-height:1.15 !important;
  display:inline-flex !important;
  flex:0 0 auto !important;
  white-space:nowrap !important;
  touch-action:pan-y !important;
  user-select:none !important;
  -webkit-user-select:none !important;
}
html.ns-v81-scroll-safe #ns-picket-helper .ns-dp-picket-card{
  overflow:visible !important;
  touch-action:pan-y !important;
}
html.ns-v81-scroll-safe #ns-picket-helper .ns-dp-picket-card p{
  margin-bottom:6px !important;
}
html.ns-v81-scroll-safe #ns-picket-helper button.ns-v81-scroll-guarded{
  position:relative !important;
}
html.ns-v81-scroll-safe body.ns-v81-user-scrolling #ns-picket-helper button.ns-v81-scroll-guarded{
  pointer-events:none !important;
}

/* Tombol kirim laporan dalam modal tetap normal, tetapi tidak mengambil area scroll di luar tombol. */
html.ns-v81-scroll-safe #ns-v56-picket-modal .actions{
  display:flex !important;
  flex-wrap:wrap !important;
  justify-content:flex-end !important;
  gap:8px !important;
}
html.ns-v81-scroll-safe #ns-v56-picket-modal .actions button{
  width:auto !important;
  flex:0 0 auto !important;
  min-height:42px !important;
  padding:10px 14px !important;
  touch-action:manipulation !important;
}
@media(max-width:560px){
  html.ns-v81-scroll-safe #ns-picket-helper .ns-picket-actions{
    display:flex !important;
    flex-direction:row !important;
  }
  html.ns-v81-scroll-safe #ns-picket-helper .ns-dp-btn,
  html.ns-v81-scroll-safe #ns-picket-helper button[data-fill-act],
  html.ns-v81-scroll-safe #ns-picket-helper #ns-dp-fill-all{
    width:auto !important;
    max-width:100% !important;
    min-height:34px !important;
    padding:7px 11px !important;
    font-size:12px !important;
  }
  html.ns-v81-scroll-safe #ns-v56-picket-modal .actions{
    display:grid !important;
    grid-template-columns:1fr 1fr !important;
  }
  html.ns-v81-scroll-safe #ns-v56-picket-modal .actions button{
    width:100% !important;
  }
}
@media print{
  html.ns-v81-scroll-safe,
  html.ns-v81-scroll-safe body,
  html.ns-v81-scroll-safe #root,
  html.ns-v81-scroll-safe main{
    overflow:visible !important;
    height:auto !important;
    max-height:none !important;
    touch-action:auto !important;
  }
}
