.body_set {
  width: 100%;
  padding: 0px;
  border-radius: 7px;
  background-size: cover;
}
.body_set * {
  font-size: 17px;
  font-family: Kanit;
}

.groupContends {
  gap: 1em;
}

.groupDisplayFormDate {
  padding: 10px;
  border-radius: 8px;
}

.groupBtn {
  display: flex;
  margin: 10px;
  width: 100%;
  height: 75%;
  gap: 10px;
  justify-content: center;
}

.inputFormFutureDays {
  padding: 0 10px 0 10px;
}

.warningText {
  color: red;
  display: none;
  padding: initial;
}

.tab-contents {
  /* background-color: #daeef6; */
  background-image: url("../img/datecalculator_background.png");
  background-size: cover; /* ปรับขนาดให้เต็มพื้นที่และคงอัตราส่วน */
  background-position: center; /* จัดให้อยู่ตรงกลาง */
  background-repeat: no-repeat; /* ไม่ให้ภาพซ้ำ */
  border-radius: 8px;
  width: 100%;
}

.selectionContainer {
  margin: 1% 0;
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.itemMenuText strong {
  color: #0c78a6;
}

.itemMenuText div {
  color: #888;
}

.itemMenu:nth-child(1) {
  width: 100%;
}

.itemMenu:nth-child(2),
.itemMenu:nth-child(3),
.itemMenu:nth-child(4) {
  flex-grow: 1;
}

.invalid-date {
  background-color: #f5d6d6 !important;
  border: 1px solid #e49a9a !important;
}

.valid-date {
  background-color: #d6f5d6 !important; /* สีเขียวอ่อน */
  border: 1px solid #9ae49a !important; /* เส้นขอบสีเขียว */
}

.calculatorSelectionBtn {
  width: min-content;
  height: 72px;
  padding: 12px;
  margin: 0 0.5%;
  border-radius: 15px;
  border: 2px solid #ccc;
  background-color: #fff;
  font-family: "Kanit";
  font-size: 18px;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  color: inherit !important;
  text-decoration: none !important;
}

.calculatorSelectionBtn:hover {
  background-color: #006098;
  color: #fff !important;
}

.calculatorSelectionBtn:hover:not(.selected) .itemMenuText strong {
  color: #fff;
}

.calculatorSelectionBtn:hover:not(.selected) .itemMenuText div {
  color: #ccc;
}

.titleDisplayFormDate {
  padding: 10px;
  background-color: #002534;
  border-radius: 8px 8px 0 0;
  color: #fff;
  font-size: 1.5em;
}

.titleDisplayFormDateEng {
  margin-top: 0;
  font-size: 0.85em;
  color: #96cee7;
}

.calculatorSelectionBtn.selected {
  border: 1px solid #006098 !important;
  background-color: #d9f4ff !important;
  font-weight: 500 !important;
  color: #0c78a6 !important;
}

.spacer {
  padding: 10px;
}

#groudBtnForm {
  gap: 5px;
  padding: 10px 0;
}

#formTitle {
  text-align: left;
  width: 100%;
  margin: 20px 0;
  padding: 10px 10px !important;
  background: rgb(255 255 255 / 65%);
  border-radius: 0 8px 8px 0;
  font-size: 1.1em !important;
  font-weight: 700;
  color: #0c78a6 !important;
  border-left: 4px solid #0c78a6;
  line-height: 1.5 !important;
  box-sizing: border-box;
}

.formSection {
  margin: 15px 10px;
  display: flex;
}

.sectionLabel {
  width: 30%;
  height: 80px;
  padding: 0 8px 0 8px;
  border-radius: 8px 0 0 8px;
  background-color: #012533;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;
  box-sizing: border-box;
  font-size: 1em;
}

.sectionLabel div {
  margin-top: 0;
  font-size: 0.85em;
  color: #96cee7;
}

.sectionInput,
.sectionInputFutureDays {
  width: 80%;
  height: 80px;
  border-radius: 0 8px 8px 0;
  background-color: #eef5f7;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.optionBtn {
  flex: 1;
  border: 1px solid #ccc;
  background-color: #fff;
  border-radius: 5px;
  font-size: 1em;
  font-family: "Kanit";
  color: #666;
  text-align: center;
  cursor: pointer;
  position: relative;
}

.optionBtn i {
  position: absolute;
  left: 24px;
  top: 23px;
}

.optionBtn.selected {
  border: 0;
  background-color: #0c78a6;
  color: #fff;
}

.optionBtn.title {
  background-color: #00364c;
  border: 1px solid #004e6e;
  color: #fff;
  padding: 0.4em;
  line-height: 1.2;
}

.optionBtn.title.selected {
  color: #fff;
  background-color: #00141c;
  cursor: default;
}
.optionBtn.title.selected div {
  color: #96cee7;
}

.selecterContainer {
  width: 100%;
  box-sizing: border-box;
}

.inputContainer input {
  width: 80%;
  height: 56px;
  padding: 8px 8px 8px 8px;
  background-color: #ffffff;
  font-size: 22px;
  font-family: "Kanit";
  border-radius: 8px;
  border: 0;
  box-sizing: border-box;
}

.inputContainer {
  text-align: center;
  width: 100%;
}

.dropDownSelection {
  text-align: center;
  width: 100%;
  padding: 8px;
  font-family: Kanit;
  font-size: 20px;
  border-radius: 5px;
  border: 1px solid #ccc;
  cursor: pointer;
  color: #333;
}

#submitBtn {
  width: 80%;
  color: #fff;
}

.formBtn {
  width: 8.75em;
  height: 64px;
  margin-right: 4px;
  padding: 0;
  border: 0;
  background-color: #fff;
  border-radius: 5px;
  font-size: 1.5em;
  font-family: "Kanit";
  color: #666;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
  background-color: #0c78a6;
  justify-content: center;
}

.formBtn:hover {
  background-color: #5aa4c2;
  color: #fff;
}

.tab-pane {
  width: 55%;
  padding: 2%;
  margin: 0 auto;
}

.dateSection {
  background: #002534;
  border-radius: 8px;
  margin: 15px 0;
}

.dateLabel {
  padding: 10px;
  font-weight: bold;
  display: flex;
  justify-content: center;
  /* จัดกึ่งกลางแนวนอน */
  align-items: center;
  /* จัดกึ่งกลางแนวตั้ง */
}

.dateInputWrapper {
  font-size: 18px;
  padding: 10px;
  border-radius: 0 0 8px 8px;
  background-color: #9ca9ae;
  justify-content: center;
}

.dateGrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  /* บนหน้าจอใหญ่ แสดง 3 คอลัมน์ */
  gap: 15px;
  align-items: center;
}

/* ตั้งค่าช่องป้อนข้อมูลให้มีขนาดพอดี */
.dateItem {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dateItemLabel {
  margin-bottom: 4px;
}

.dateInputField {
  width: 90%;
  padding: 8px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
  font-size: 20px;
}

/* กำหนดสไตล์สำหรับรายการเดือนที่สลับสีคู่และคี่ */
.month-item {
  padding: 10px;
}

.month-item div {
  flex: 1;
}

#monthTable {
  width: 40%;
  height: max-content;
}

/* สลับสีพื้นหลังของรายการ */
li:nth-child(odd) .month-item {
  background-color: #ffffff; /* สีขาว */
}

li:nth-child(even) .month-item {
  background-color: #efefef; /* สีแดงอ่อน */
}

.inputDateContainer {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.inputDateContainerFutureDays {
  display: flex;
  gap: 4px;
}

.groupInputDateItem {
  border-style: none;
}

.inputDateContainer div {
  flex: 1;
}

.inputDateContainer label {
  background-color: #eee;
  color: black;
}

.inputDateItem {
  padding: 10px;
  background-color: white;
  font-size: 1.2em;
}

/* สร้างคลาสสำหรับ border-radius */
.borderTopLeft {
  border-radius: 8px 0 0 0;
}

.borderBottomLeft {
  border-radius: 0 0 0 8px;
}

.borderTopRight {
  border-radius: 0 8px 0 0;
}

.borderBottomRight {
  border-radius: 0 0 8px 0;
}

.resultLabel {
  font-size: 0.8em;
  padding: 10px;
  color: #333333;
  border-radius: 8px 8px 0 0;
}

.resultDetail {
  font-size: 1em;
  padding: 10px;
  color: #177aa2;
  border-radius: 0 0 8px 8px;
  font-weight: 500;
}

.inputCheckBox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9f9f9;
  padding: 10px 15px;
  border-radius: 8px;
  margin: 10px;
}

.fakeButton {
  margin: 2%;
  width: 28%;
}

.startButton {
  height: 172px;
  width: min-content;
}

.startTitle {
  width: 100%;
  font-size: 32px;
  padding: 30px 0 45px;
  text-align: center;
}

.startContainer {
  margin: 0 0 4%;
}

.insideButton {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: center;
}

@media (max-width: 1300px) {
  .tab-pane {
    width: 80%;
  }
}

@media (max-width: 1100px) {
  .itemMenuText div {
    display: none;
  }
  .itemMenu {
    height: auto;
  }

  .insideButton {
    flex-direction: column !important;
  }
  .calculatorSelectionBtn {
    padding: 0;
  }
}

@media (max-width: 900px) {
  #toggleCalculateDaysLabel {
    /* width: 80% !important; */
  }

  #toggleCalculateDaysInput {
    /* background-color: red; */
  }

  #normalDisplayIncludeEndDate .sectionInputFutureDays .groupBtn {
    height: 35px !important;
  }
  .sectionLabel,
  .sectionInput {
    width: -webkit-fill-available;
    height: 60px !important;
    font-size: 14px;
  }

  .fakeButton {
    display: none;
  }
  .dateGrid {
    grid-template-columns: 1fr;
    /* เปลี่ยนเป็น 1 คอลัมน์ */
  }
  #monthTable {
    width: 100%;
  }
  .calculatorSelectionBtn {
    font-size: 1em;
  }

  .tab-pane {
    width: 95%;
  }
  .flexRow {
    flex-flow: nowrap;
  }
  .dropDownSelection {
    font-size: 14px;
  }

  #normalDisplayFormDate {
    display: block;
    margin: 15px 10px 0px 10px;
  }

  #normalDisplayFormDate .sectionLabel {
    width: auto;
    border-radius: 8px 8px 0 0;
    font-size: 1.5em;
  }

  #normalDisplayFormDate .sectionInput {
    width: auto;
    border-radius: 0 0 8px 8px;
  }
}

@media (max-width: 700px) {
  #normalDisplayIncludeEndDate div {
    margin: 5px 10px !important;
  }

  .itemMenuText {
    font-size: 12px !important;
    margin: 5px !important;
  }

  .optionBtn i {
    position: absolute;
    left: 40px;
    top: 23px;
  }

  .groupBtn {
    width: 100% !important;
  }
}

@media (max-width: 600px) {
  .optionBtn i {
    position: absolute;
    left: 25px;
    top: 20px;
  }
}

@media (max-width: 500px) {
  .optionBtn i {
    position: absolute;
    left: 15px;
    top: 20px;
  }
}

@media (max-width: 450px) {
  .optionBtn i {
    position: absolute;
    left: 7px;
    top: 20px;
  }
}

.dateNow {
  background-color: #ffffff !important;
  border-radius: 0 0 8px 0 !important;
  font-size: 18px !important;
  align-content: center !important;
  flex: none !important;
  width: 70px !important;
}

.dateNow button {
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
}

.calendar-icon-wrapper {
  position: relative !important;
  width: 60px !important;
  height: 58px !important;
}

.calendar-icon {
  font-size: 53px;
  color: #1279a4 !important;
  display: block !important;
  position: unset !important;
}

.calendar-label {
  position: absolute !important;
  top: 22px !important;
  left: 0 !important;
  width: 100% !important;
  text-align: center !important;
  font-size: 11px !important;
  line-height: 14px !important;
  color: #ffffff !important;
  pointer-events: none !important;
}
