body {
  font-family: sans-serif;
  padding: 20px;
  background: #f5f5f5;
}

.info-box {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px #ccc;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 5px;
  padding: 0;
  text-align: center;
}

.button-container {
  display: flex;
  justify-content: space-between;
  width: 100%;
  /* atur lebar sesuai kebutuhan */
}

.button-container button {
  padding: 8px 16px;
}

button.on {
  background-color: green;
}

.slider-container {
  margin-bottom: 40px;
}

input[type="range"] {
  width: 100%;
  max-width: 100%;
  height: 30px;
  margin-top: 5px;
  touch-action: pan-y;
}

/* Perbesar thumb di mobile */
input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
}

.value-display {
  margin-top: 8px;
  font-family: monospace;
  font-size: 1.1em;
}

.input-row {
  margin: 10px 0;
}

input[type="number"] {
  width: 80px;
  padding: 5px;
  margin-right: 10px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-button {
  font-size: 20px;
  /* ukuran simbol */
  padding: 10px 16px;
  /* ruang dalam tombol */
  min-width: 40px;
  /* lebar minimum */
  min-height: 40px;
  /* tinggi minimum */
}

label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

/**************************\
  Modal
\**************************/

/* ===== Overlay ===== */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);

  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  /* overflow-y: auto; */
  /* padding: 20px; */
  width: 100%;
  height: 100%;
}

/* aktif */
.modal.active {
  opacity: 1;
  pointer-events: auto;
  display: flex; /* Memastikan flex tetap aktif */
}

/* ===== Box ===== */
/* Atur box agar menggunakan layout kolom */
.modal-box {
  background: #fff;
  color: #000;

  border-radius: 10px;
  /* max-width: 90%; */
  width: 90%; /* Memberi jarak aman di kiri & kanan pada layar kecil */
  max-width: 500px; /* Batas maksimal agar tidak terlalu lebar di tablet/desktop */
  margin: auto;
  max-height: 90vh; /* Batasi tinggi modal agar tidak melebihi layar */
  display: flex;
  flex-direction: column; /* Susun anak-anaknya secara vertikal */

  transform: scale(0.9);
  opacity: 0;
  transition: all 0.25s ease;
  overflow: hidden; /* Mencegah konten keluar dari border-radius */
}

/* nested modal */
#modalNested .modal-box {
  width: 15%;
}
.modal.active .modal-box {
  transform: scale(1);
  opacity: 1;
}

/* ===== Header ===== */
/* Header & Footer: Berikan ukuran tetap */
.modal-header,
.modal-footer {
  padding: 15px 20px;
  /* background: #f8f9fa; */
  flex-shrink: 0; /* Jangan biarkan mereka mengecil */
}

.modal-header {
  /* border-bottom: 1px solid #ddd; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.modal-footer {
  /* border-top: 1px solid #ddd; */
  text-align: right;
}

/* Bagian Konten: Area yang bisa di-scroll */
.modal-content {
  padding: 20px;
  overflow-y: auto; /* Aktifkan scroll vertikal di sini */
  flex-grow: 1; /* Ambil semua sisa ruang yang ada */
}
.modal-close {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 18px;
}

/* fallback inert */
[inert] {
  pointer-events: none;
  user-select: none;
}

/* Atur margin dan padding untuk seluruh halaman */

/* Style untuk header yang tetap di atas */

.box {
  /* width: 15px; */
  /* margin: 5px; */
  display: flex;
  /* flex-direction: column; */
  /* Menyusun elemen secara vertikal */
  /* justify-content: center; */
  justify-content: space-between;
  align-items: center;
  color: white;
  text-align: center;
  /* padding: 5px; */
  font-size: 8pt;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  width: 100%;
}
.boxct {
  /* width: 15px; */
  margin: 5px;
  display: flex;
  /* flex-direction: column; */
  /* Menyusun elemen secara vertikal */
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 5px;
  font-size: 8pt;
  border-radius: 10px;
  background-color: rgba(255, 255, 255, 0.1);
  width: 100%;
}

@font-face {
  font-family: f7segment;
  src: url("7-segments-display.ttf");
}

#status {
  font-size: 20px;
  font-weight: bold;
}

#status.online {
  color: green;
}

#status.offline {
  color: red;
}

#btn {
  font-size: 20px;
  font-weight: bold;
}

button.on {
  background-color: green;
}

/* =Start= new_home.php sidenav */
body {
  font-family: "Lato", sans-serif;
  transition: background-color 0.5s;
  margin: 0;
  /* Reset any margin */
}

.sidenav {
  height: 100%;
  width: 0;
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 20%;
  text-align: right;
}

.sidenav a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 18px;
  color: #818181;
  display: block;
  transition: 0.3s;
  white-space: nowrap;
}

/* Disabled class for preventing interactions outside sidenav */
.disabled {
  pointer-events: none;
  opacity: 0.3;
  /* Optional: to indicate that the content is disabled */
}

.sidenav a:hover {
  color: #f1f1f1;
}

#main {
  transition: margin-left 0.5s;
  padding: 16px;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }

  .sidenav a {
    font-size: 18px;
  }
}

/* =END= new_home.php sidenav */

.toolbar_top {
  left: 0;
  width: 100%;
  background-color: #ccc;
  padding: 0px;
  text-align: center;
  z-index: 10;
  /* Agar tetap di atas konten */
}

table,
th,
td {
  border: 1px solid black;
  border-collapse: collapse;
}

th {
  font-size: 14pt;
  font-weight: bold;
  text-align: center;
}

td {
  font-size: 14pt;
  text-align: center;
}

.table_schedule {
  border-collapse: collapse;
}

.table_schedule td,
.table_schedule th {
  text-align: left;
  vertical-align: top;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  padding: 10px;
}

.button-group button {
  flex: 1 1 30%;
  min-width: 100px;
  padding: 10px;
  font-size: 18px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: #f0f0f0;
}

@media (max-width: 480px) {
  .button-group button {
    flex: 1 1 100%;
  }
}

.slider-container {
  margin-bottom: 40px;
}

input[type="range"] {
  width: 100%;
  max-width: 100%;
  height: 30px;
  margin-top: 5px;
  touch-action: pan-y;
}

/* Perbesar thumb di mobile */
input[type="range"]::-webkit-slider-thumb {
  width: 28px;
  height: 28px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 28px;
  height: 28px;
  background: #4caf50;
  border-radius: 50%;
  cursor: pointer;
}

.value-display {
  margin-top: 8px;
  font-family: monospace;
  font-size: 1.1em;
}

.input-row {
  margin: 10px 0;
}

input[type="number"] {
  width: 80px;
  padding: 5px;
  margin-right: 10px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-button {
  font-size: 20px;
  /* ukuran simbol */
  padding: 10px 16px;
  /* ruang dalam tombol */
  min-width: 40px;
  /* lebar minimum */
  min-height: 40px;
  /* tinggi minimum */
}

.tombol-timbul {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.tombol-timbul:active {
  box-shadow: inset 2px 2px 4px rgba(0, 0, 0, 0.3);
  transform: translateY(1px);
}
