/* styling untuk checkbox */
.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border: 2px solid white;
  border-radius: 4px;
  background-color: transparent;
  cursor: pointer;
  position: relative;
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  width: 39px;
  height: 28px;
  background-image: url('https://raw.githubusercontent.com/sinkarkess/subdomain/refs/heads/main/ceklis1.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
}

.custom-checkbox:checked {
  background-image: url('');
}

.custom-checkbox {
  width: 30px;
  height: 30px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.custom-checkbox:checked {
  background-image: url('');
  background-size: 130%;
  /* Gambar lebih besar dari kotak */
  box-shadow: 0 0 15px #ffffff;
}

/* Certificate Styles */
* {
  box-sizing: border-box;
}

.icv {
  width: 160mm;
  min-height: 210mm;
  padding: 10mm;
  margin: 0 0 0 auto;
  background-color: #f5e19f;
  position: relative;
  overflow: hidden;
  background: linear-gradient(36deg, rgba(141, 178, 227, 1) 1%, rgba(245, 225, 159, 1) 15%);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.25);
}

.icv-header img {
  height: auto;
  max-height: 36px;
  vertical-align: middle;
  margin: 0 4px;
}

.icv-header div:first-child img {
  max-height: 40px;
}

.icv .watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 230px;
  opacity: 0.2;
  filter: grayscale(100%) brightness(80%) contrast(120%);
}

.icv-header {
  text-align: center;
}

.icv-header div {
  margin-bottom: 5px;
}

.icv-header h3 {
  margin-top: 8px;
  margin-bottom: 2px;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.3;
}

.icv-header p {
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 6px;
}

.icv-body {
  margin-top: 10px;
}

.icv-body p {
  margin: 0 0 5px 0;
  padding: 0;
}

.text-bold {
  font-weight: bold;
}

.main-data {
  border-bottom: 1px solid #f1d380;
  padding-bottom: 3px;
  margin-bottom: 3px;
  position: relative;
}

.main-data img {
  top: 0;
  right: 0;
  width: 133px;
}

/* New Style for QR Box */
.main-data .qr-box {
  background-color: #ffffff;
  padding: 15px !important;
  /* Larger white padding */
  display: inline-block;
  margin-bottom: 5px;
}

.main-data .qr-box img {
  width: 150px !important;
  /* Larger QR code */
  height: auto;
  display: block;
}

.data-detail {
  font-size: 12px;
}

.data-detail p.title {
  font-size: 12px;
  font-weight: bold;
  margin: 0;
  padding: 0;
}

.icv-table {
  width: 100%;
  font-size: 10px;
}

.icv-table th,
.icv-table td {
  padding: 5px;
  vertical-align: top;
  line-height: 1.4;
}

.icv-table th {
  background-color: #e8d79c;
  font-weight: normal;
}

.icv-footer {
  margin-top: 10px;
  text-align: center;
  font-size: 11px;
}

.icv-footer p {
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

/* Navbar Customization */
#header .header-nav-main nav>ul>li>a {
  color: #40ada6 !important;
  /* Authentic Teal Color */
  font-weight: 680 !important;
  text-transform: uppercase !important;
  background-color: transparent !important;
  padding: 10px 15px !important;
  font-size: 12px !important;
  border-radius: 4px !important;
  transition: all 0.3s ease;
}

/* Hover state for all links */
#header .header-nav-main nav>ul>li>a:hover {
  color: #338e88 !important;
  /* Slightly darker teal on hover */
  background-color: transparent !important;
  text-decoration: none !important;
}

/* Active item style (Button Style for 'PELAYANAN') */
#header .header-nav-main nav>ul>li.active>a {
  background-color: #40ada6 !important;
  color: #ffffff !important;
  padding: 10px 20px !important;
  /* Slightly larger padding for button look */
  border-radius: 5px !important;
}

/* Hover state specifically for the active button */
#header .header-nav-main nav>ul>li.active>a:hover {
  background-color: #338e88 !important;
  color: #ffffff !important;
}

/* Dropdown Caret Color Adjustment */
#header .header-nav-main nav>ul>li>a.dropdown-toggle {
  position: relative !important;
  padding-right: 3 0px !important;
}

#header .header-nav-main nav>ul>li>a.dropdown-toggle::after {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0;
  content: "";
  border-top: 5px solid;
  border-right: 4px solid transparent;
  border-bottom: 0;
  border-left: 4px solid transparent;
}

/* Colors for carets */
#header .header-nav-main nav>ul>li.active>a.dropdown-toggle::after {
  border-top-color: #ffffff !important;
  /* White arrow for active button */
}

#header .header-nav-main nav>ul>li:not(.active)>a.dropdown-toggle::after {
  border-top-color: #40ada6 !important;
  /* Teal arrow for others */
}

/* Login Icon styling */
#header .header-nav-main nav>ul>li>a>i.fa-user {
  margin-right: 5px;
}

@media screen and (max-width: 768px) {

  html,
  body {
    width: 100%;
    height: auto;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
  }

  .icv {
    width: 100% !important;
    max-width: 100vw;
    padding: 20px 15px !important;
    margin: 20px 0;
    box-sizing: border-box;
    transform: scale(1);
  }

  .icv .watermark {
    top: 48% !important;
  }

  .container,
  .row {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-data td:first-child {
    padding-top: 30px;
  }

  .main-data table,
  .icv-table {
    font-size: 10px;
    word-wrap: break-word;
  }

  .main-data img {
    width: 120px;
    height: auto;
  }

  .main-data p,
  .main-data div,
  .main-data td,
  .main-data span {
    font-size: 12px !important;
  }

  .main-data td {
    vertical-align: top;
  }

  .main-data td div {
    font-size: 13px !important;
    margin-top: 5px;
    word-break: break-word;
  }
}

/* Custom Button Styles (Cari) */
#btn_cari,
.btn-primary {
  background-color: #40ada6 !important;
  border-color: #40ada6 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

#btn_cari:hover,
.btn-primary:hover {
  background-color: #338e88 !important;
  border-color: #338e88 !important;
}

/* Ensure Login Icon matches the text color */
#header .header-nav-main nav>ul>li>a>i.fa-user {
  color: inherit !important;
  /* Forces icon to take parent's teal color */
  margin-right: 5px;
  font-size: 1.2em;
  /* Slightly larger icon to match image */
}

/* Not Found Message Styling */
#msg_error {
  background-color: #f7f7f7;
  color: #777;
  text-align: flex-start;
  padding: 20px 10px;
  margin-top: 10px;
  border-radius: 4px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 25px;
  width: 100%;
  box-sizing: border-box;
  display: none;
  /* Default hidden */
}