@import url("https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

body {
  font-family: "Prompt", sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Prompt", sans-serif !important;
}

#dsslogo {
  max-height: 75px;
  margin-right: 10px;
}

#dssheader {
  display: inline;
}

.dssheader {
  margin-bottom: 10px;
}

img {
  max-width: 100%;
  margin-top: 5px;
  height: auto;
  border-radius: 15px; /* object-fit: cover;*/
}

input[type="text"] {
  height: 1.3em;
  font-size: 1em;
}

.refill_row {
  margin-top: 5px;
}

.refill_desc {
  text-indent: 30px; /* margin-right: 20px;*/
  text-align: left;
}

.refill_item {
  margin-top: 20px;
  max-width: 100%;
  height: auto;
}

.refill_text {
  margin-top: 20px;
  max-width: 100%;
  height: auto;
  color: black;
}

.refill_cal_input {
  font-size: 12pt;
  background-color: #91c8e433;
  padding-bottom: 5px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* เพิ่มความสวยงามแบบเรียบง่าย */
}

.nav-link.active {
  font-weight: bold;
}

label {
  display: block;
  float: left;
  clear: left;
}

input {
  display: block;
  float: left;
}

.form_unit {
  margin-left: 5px;
  margin-right: 5px;
  display: block;
  float: left;
  font-size: 11px;
}

#soil_type {
  max-width: 100%;
}

#precipitation {
  font-size: 10pt;
  min-height: 200px;
}

#refill_calculator {
  margin-top: 20px;
}

#my_dataviz {
  max-width: 100%;
  width: 100%;
}

.result {
  margin-left: 10px;
}

.blue {
  font-weight: bold;
  color: blue;
} /* 6-Apr-23 */

img.plan_small {
  width: 60%;
  cursor: zoom-in;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.refill-a {
  color: blue;
  text-decoration: underline;
  text-align: center;
}

.card {
  border: none;
}

.card-body {
  padding: 0.75rem;
}

.card-text {
  text-indent: 0;
  font-size: 14px;
  line-height: 1.35;
}

.container {
  padding-bottom: 30px;
}

.info-icon {
  margin-top: -4px;
  cursor: pointer;
}

.info-icon:hover {
  margin-top: -6px;
}

#lbl_toggle_defaultPrecip {
  width: 100%; /* text-align: left;*/
  font-size: 13px;
}

#div_toggle_defaultPrecip {
  float: right;
}

#total_result {
  float: right;
}

body {
  padding-right: 0 !important;
}

/*graph's y-axis text*/
/* text.axis {
  font-size: 14px;
  font-weight: bold;
  z-index: 9999;
} */

/* svg {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

path.axis, line.axis{
  fill: none;
  stroke: #000;
  shape-rendering: crispEdges;
}

text.axis{
  font: Times;
  font-size: 20px;
  font-weight: bold;
}*/

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link {
  border-color: transparent; /* เอา border ออก */
  background-color: transparent; /* ถ้าอยากให้ background เรียบ */
}

.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:hover {
  border-color: transparent; /* เอา border ออก */
} /* container ของ tab - center aligned */

.nav-tabs {
  border-bottom: 1px solid #ccc;
  justify-content: center; /* จัดกึ่งกลาง */
  margin-bottom: 20px;
  gap: 10px; /* เพิ่มช่องว่างระหว่าง tab */
  flex-wrap: wrap; /* เวลาหน้าจอเล็ก จะตัดบรรทัดใหม่ */
} /* style ของแต่ละ tab */

.nav-tabs .nav-link {
  color: #495057;
  background-color: transparent;
  border: 1px solid transparent;
  border-bottom: 2px solid transparent;
  padding: 10px 20px;
  font-weight: 500;
  border-radius: 0.5rem 0.5rem 0 0; /* ขอบมนเล็ก ๆ */
  transition: all 0.2s ease;
} /* hover effect */

.nav-tabs .nav-link:hover {
  color: #0d6efd;
  border-bottom: 2px solid #0d6efd;
  background-color: rgba(13, 110, 253, 0.05); /* subtle background */
} /* active tab */

.nav-tabs .nav-link.active {
  color: #0d6efd;
  border-bottom: 2px solid #0d6efd;
  font-weight: 600;
} /* focus/hover - เอา border เทาออก */

.nav-tabs .nav-link:focus {
  outline: none;
  box-shadow: none;
} /* responsive */

@media (max-width: 768px) {
  .nav-tabs .nav-link {
    padding: 8px 12px;
    font-size: 14px;
  }
}

.heading-switch-container {
  display: flex;
  align-items: end;
  justify-content: space-between;
  font-size: 16px;
  margin-bottom: 10px;
  margin-left: 11.25px;
  margin-right: 11.25px;
} /* Container ของ switch + ข้อความ */

.switch-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
} /* ตัว switch */

.switch {
  position: relative;
  width: 36px;
  height: 14px;
} /* ซ่อน checkbox จริง */

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
} /* slider */

.slider {
  position: relative;
  cursor: pointer;
  background-color: #dc3545;
  border-radius: 20px;
  width: 100%;
  height: 100%;
  transition: 0.1s;
} /* ปุ่มเลื่อน */

.slider::before {
  content: "";
  position: absolute;
  height: 12px;
  width: 12px;
  left: 1px;
  bottom: 1px;
  background-color: white;
  border-radius: 50%;
  transition: 0.1s;
} /* checked state */

.switch input:checked + .slider {
  background-color: #007bff;
}

.switch input:checked + .slider::before {
  transform: translateX(16px);
} /* ข้อความข้าง switch */

.switch-text {
  line-height: 20px; /* ให้ตรงกับ switch */
}

.heading-switch-container .switch-container .switch {
  margin: 0;
}

.table-wrapper1,
.table-wrapper2 {
  background: #fffdf6f5; /* หรือสีตามต้องการ */
  border-radius: 12px;
  overflow-y: hidden; /* สำคัญมาก → ทำให้ table โค้ง */
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* เพิ่มความสวยงามแบบเรียบง่าย */
}

/* ถ้าต้องการให้ thead เป็นสีฟ้าแบบเดิม */
.table-wrapper1 thead {
  background-color: #91c8e4 !important;
}

/* ถ้าต้องการให้ thead เป็นสีฟ้าแบบเดิม */
.table-wrapper2 thead {
  background-color: #749bc2 !important;
}

.table {
  margin-bottom: 0; /* เอาช่องว่างล่างออก */
}

.result {
  margin: 0;
}

.result h5 {
  margin-left: 11.25px;
  margin-right: 11.25px;
}

#my_dataviz svg {
  height: 270px !important;
  background-color: #fffdf6 !important;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* เพิ่มความสวยงามแบบเรียบง่าย */
}

/* 02-12-2025 */
/* =========================================
   1. GLOBAL VARIABLES & BASE STYLES 
   ========================================= */
:root {
  --top-space: 90px; /* ระยะห่างจากขอบบน (Navbar height + gap) */
  --nav-transition-time: 0.4s;
  --primary-color: #191d88;
  --primary-hover: #101256;
  --font-main: "Prompt", sans-serif;
}

.leaflet-top {
  top: var(--top-space) !important;
  transition: top var(--nav-transition-time) ease-in-out !important;
}

/* =========================================
   2. NAVBAR & NAVIGATION
   ========================================= */
#navbar-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2000;
  transition: transform var(--nav-transition-time) ease-in-out;
}

#navbar-container.nav-collapsed {
  transform: translateY(-100%);
}

#navbar-toggler {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 30px;
  background-color: white;
  border-radius: 0 0 15px 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  font-size: 14px;
  z-index: -1;
  border: 1px solid #eee;
  border-top: none;
}

#navbar-toggler:hover {
  background-color: #f8f9fa;
  color: var(--primary-hover);
}

#navbar-container nav a,
#navbar-container nav button {
  color: #333333 !important;
  text-decoration: none !important;
  font-weight: 500;
}

#navbar-container nav a:hover,
#navbar-container nav button:hover {
  color: #1e40af !important;
}

ul.dropdown-menu.show-dropdown {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
  top: 100% !important;
}

ul.dropdown-menu {
  z-index: 9999 !important;
}

#my_dataviz svg g text {
  font-family: "Prompt", sans-serif !important;
}
