@import url('jl-care-base.css');

/* =========================================================
   POPUP KONFIRMASI S&K
   ========================================================= */
#popupOverlay {
  position: fixed;
  inset: 0;
  background-color: rgba(15, 23, 42, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  z-index: 9999;
  overflow-y: auto;
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease-out;
}

#popupBox {
  background-color: #ffffff;
  padding: 35px 25px;
  border-radius: 16px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: popIn 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

#popupBox h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 12px;
}

#popupBox p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #475569;
  margin-bottom: 24px;
}

#popupBox .btn {
  display: block;
  width: 100%;
  padding: 12px 0;
  margin: 10px 0;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

#popupBox .btn.agree {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 74, 173, 0.2);
}

#popupBox .btn.agree:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 74, 173, 0.3);
}

#popupBox .btn.decline {
  background-color: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

#popupBox .btn.decline:hover {
  background-color: #e2e8f0;
  color: #334155;
  transform: translateY(-2px);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes popIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* =========================================================
   HALAMAN SYARAT & KETENTUAN (PAPER STYLE)
   ========================================================= */
body {
  background: #f8fafc; /* So the paper pops out */
}

#syaratKetentuan {
  display: none;
  background: #ffffff;
  padding: 50px 60px;
  max-width: 900px;
  margin: 40px auto;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid #e2e8f0;
  color: #334155;
  line-height: 1.8;
}

/* Typography for legal document */
#syaratKetentuan,
#syaratKetentuan * {
  font-family: Georgia, "Times New Roman", Times, serif;
}

#syaratKetentuan h2 {
  font-size: 1.5rem;
  margin-bottom: 30px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 2px solid #1e293b;
  padding-bottom: 15px;
  color: #1e293b;
  font-weight: bold;
}

#syaratKetentuan h3 {
  font-size: 1.15rem;
  margin-top: 35px;
  margin-bottom: 12px;
  color: #1e293b;
  font-weight: bold;
}

#syaratKetentuan h4 {
  font-size: 1.05rem;
  margin-top: 20px;
  margin-bottom: 8px;
  font-weight: bold;
  color: #334155;
}

#syaratKetentuan p,
#syaratKetentuan ul,
#syaratKetentuan li {
  text-align: justify;
  margin-bottom: 12px;
  font-size: 1rem;
}

.pasal-underline {
  display: inline-block;
  border-bottom: 2px solid #94a3b8;
  padding-bottom: 4px;
}

#syaratKetentuan table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.95rem;
  margin: 20px 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px #e2e8f0;
}

#syaratKetentuan thead>tr {
  background: #f8fafc;
}

#syaratKetentuan th {
  border: 1px solid #e2e8f0;
  padding: 12px 15px;
  text-align: left;
  font-weight: bold;
  color: #1e293b;
}

#syaratKetentuan td {
  border: 1px solid #e2e8f0;
  padding: 12px 15px;
}

#syaratKetentuan tbody>tr:nth-child(even) {
  background: #fafafa;
}

/* =========================================================
   TANDA TANGAN & STEMPEL
   ========================================================= */
#syaratKetentuan .ttd-container {
  margin-top: 60px;
  padding-top: 30px;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  justify-content: flex-end;
  text-align: right;
}

#syaratKetentuan .ttd-box {
  position: relative;
  width: 250px;
  padding-right: 20px;
  margin-left: auto;
  z-index: 2;
  text-align: right;
}

#syaratKetentuan .ttd-text {
  margin: 0 0 15px 0;
  font-size: 1rem;
  color: #1e293b;
}

#syaratKetentuan .stamp-area {
  position: relative;
  display: inline-block;
  width: 140px;
  height: 80px;
  margin-left: auto;
}

#syaratKetentuan .ttd-stamp {
  position: absolute;
  top: -25px;
  right: -10px;
  width: 130px;
  opacity: 0.8; 
  transform: rotate(-5deg);
  z-index: 1;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  mix-blend-mode: multiply; 
}

#syaratKetentuan .no-save-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  pointer-events: auto;
}

#syaratKetentuan .ttd-nama {
  position: absolute;
  bottom: -25px;
  right: 20px;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: bold;
  color: #1e293b;
  z-index: 2;
  border-bottom: 1px solid #1e293b;
  padding-bottom: 2px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  #syaratKetentuan {
    padding: 30px 20px;
    margin: 20px 10px;
  }
}

@media (max-width: 576px) {
  #popupBox {
    padding: 25px 20px;
  }
  
  #syaratKetentuan {
    padding: 20px 15px;
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    font-size: 0.95rem;
  }

  #syaratKetentuan h2 {
    font-size: 1.25rem;
  }
  
  #syaratKetentuan h3 {
    font-size: 1.1rem;
  }

  #syaratKetentuan th,
  #syaratKetentuan td {
    padding: 10px;
    font-size: 0.85rem;
  }
}
