/* ==========================================================================
   SHAPE FITNESS - POPUP / MODAL
   Struktur: overlay > dialog > (close, logo, banner, teks, CTA login & daftar)
   ========================================================================== */

/* --- Overlay / background gelap ---------------------------------------- */
#sfPopupOverlay{
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(20, 8, 26, 0.72);
  z-index: 9998;
  padding: 20px;
  overflow-y: auto;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

/* dipasang oleh JS saat popup dibuka */
#sfPopupOverlay.is-open{
  display: block;
  animation: sfFadeIn .25s ease-out;
}

/* --- Dialog ------------------------------------------------------------ */
#sfPopup{
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 60px auto;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  overflow: hidden;
  text-align: center;
  font-family: Verdana, Geneva, Arial, sans-serif;
  color: #4a4a4a;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

#sfPopupOverlay.is-open #sfPopup{
  animation: sfSlideUp .3s ease-out;
}

/* --- Tombol close (selalu di atas semua isi popup) --------------------- */
#sfPopupClose{
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 10;              /* penting: dulu tertimpa gambar sehingga tak bisa diklik */
  display: block;
  width: 32px;
  height: 32px;
  line-height: 30px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  color: #ffffff;
  text-decoration: none;
  background: rgba(0, 0, 0, .45);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

#sfPopupClose:hover,
#sfPopupClose:focus{
  background: #7c4c8c;
  color: #ffffff;
  text-decoration: none;
  outline: none;
}

/* --- Logo -------------------------------------------------------------- */
.sf-popup-logo{
  padding: 22px 20px 14px;
  background: #ffffff;
}

.sf-popup-logo img{
  display: inline-block;
  max-width: 190px;
  height: auto;
  border: 0;
}

/* --- Banner gambar ----------------------------------------------------- */
.sf-popup-banner{
  display: block;
  line-height: 0;
  background: #f3f0f5;
}

.sf-popup-banner img{
  display: block;
  width: 100%;
  height: auto;
  border: 0;
}

/* --- Teks -------------------------------------------------------------- */
.sf-popup-body{
  padding: 20px 24px 4px;
}

.sf-popup-body h2{
  margin: 0 0 8px;
  font-size: 19px;
  line-height: 1.3;
  font-weight: bold;
  color: #7c4c8c;
  text-transform: none;
  border: 0;
}

.sf-popup-body p{
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: #666666;
}

/* --- CTA login & daftar ------------------------------------------------ */
.sf-popup-cta{
  padding: 18px 24px 24px;
}

.sf-popup-btn{
  display: block;
  width: 100%;
  margin: 0 0 10px;
  padding: 12px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  transition: background-color .18s ease, color .18s ease;
}

.sf-popup-btn:last-child{ margin-bottom: 0; }

.sf-popup-btn--login{
  background: #7fbb4a;
  border-color: #7fbb4a;
  color: #ffffff;
}

.sf-popup-btn--login:hover,
.sf-popup-btn--login:focus{
  background: #6ea63d;
  border-color: #6ea63d;
  color: #ffffff;
  text-decoration: none;
}

.sf-popup-btn--daftar{
  background: #ffffff;
  border-color: #7c4c8c;
  color: #7c4c8c;
}

.sf-popup-btn--daftar:hover,
.sf-popup-btn--daftar:focus{
  background: #7c4c8c;
  border-color: #7c4c8c;
  color: #ffffff;
  text-decoration: none;
}

/* --- Link "nanti saja" ------------------------------------------------- */
.sf-popup-skip{
  display: inline-block;
  margin-top: 14px;
  font-size: 11px;
  color: #999999;
  text-decoration: underline;
  cursor: pointer;
}

.sf-popup-skip:hover{ color: #7c4c8c; }

/* --- Responsive -------------------------------------------------------- */
@media screen and (max-width: 480px){
  #sfPopupOverlay{ padding: 10px; }
  #sfPopup{ margin: 30px auto; max-width: 100%; }
  .sf-popup-body{ padding: 16px 18px 4px; }
  .sf-popup-body h2{ font-size: 17px; }
  .sf-popup-cta{ padding: 16px 18px 20px; }
}

/* --- Animasi ----------------------------------------------------------- */
@keyframes sfFadeIn{
  from{ opacity: 0; }
  to{ opacity: 1; }
}

@keyframes sfSlideUp{
  from{ opacity: 0; transform: translateY(24px) scale(.97); }
  to{ opacity: 1; transform: translateY(0) scale(1); }
}

/* ==========================================================================
   LEGACY - popup lama (schedule.php, shape-dvd/index.html)
   Dibiarkan tersembunyi supaya tidak bentrok dengan popup baru.
   ========================================================================== */
#backgroundPopup,
#popupContact{ display: none !important; }
