/**
 * CIW - Official Smartphone Application Launch System
 * Splash Screen & Welcome Onboarding Experience
 * PT Cahaya Intan Wisata
 */

/* === SPLASH SCREEN OVERLAY === */
.ciw-splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 35%, #132742 0%, #0a192f 70%, #050d18 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s ease;
  user-select: none;
  touch-action: none;
  padding: 2rem 1.5rem;
  box-sizing: border-box;
}

.ciw-splash-screen.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ciw-splash-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 380px;
  width: 100%;
}

.ciw-splash-logo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ciw-splash-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  border: 2px dashed rgba(217, 119, 6, 0.4);
  animation: ciwSpinRing 12s linear infinite;
}

.ciw-splash-logo-wrap::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 119, 6, 0.25) 0%, transparent 70%);
}

.ciw-splash-logo {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  animation: ciwLogoPulse 2.8s ease-in-out infinite;
  z-index: 2;
}

.ciw-splash-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #ffffff;
  margin: 0 0 0.4rem 0;
  text-transform: uppercase;
}

.ciw-splash-title span {
  color: #fbbf24;
}

.ciw-splash-subtitle {
  font-size: 0.82rem;
  color: #94a3b8;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1.25rem 0;
}

.ciw-splash-permit {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(217, 119, 6, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: #fbbf24;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.ciw-splash-loader {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ciw-splash-loader-dot {
  width: 8px;
  height: 8px;
  background-color: #fbbf24;
  border-radius: 50%;
  animation: ciwDotBounce 1.4s infinite ease-in-out both;
}

.ciw-splash-loader-dot:nth-child(1) { animation-delay: -0.32s; }
.ciw-splash-loader-dot:nth-child(2) { animation-delay: -0.16s; }
.ciw-splash-loader-dot:nth-child(3) { animation-delay: 0s; }

.ciw-splash-footer {
  position: absolute;
  bottom: 2rem;
  font-size: 0.72rem;
  color: #64748b;
  text-align: center;
  letter-spacing: 0.04em;
}

/* === ONBOARDING / WELCOME MODAL === */
.ciw-onboarding-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(5, 13, 24, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999998;
  padding: 1.25rem;
  box-sizing: border-box;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  user-select: none;
}

.ciw-onboarding-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.ciw-onboarding-card {
  background: linear-gradient(165deg, #112240 0%, #0a192f 100%);
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 24px;
  max-width: 400px;
  width: 100%;
  padding: 2rem 1.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 25px rgba(217, 119, 6, 0.15);
  text-align: center;
  color: #ffffff;
  animation: ciwSlideUp 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
}

.ciw-onboarding-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(245, 158, 11, 0.08) 100%);
  border: 1px solid rgba(217, 119, 6, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.ciw-onboarding-icon img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.ciw-onboarding-badge {
  display: inline-block;
  background: rgba(217, 119, 6, 0.15);
  color: #fbbf24;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.ciw-onboarding-card h2 {
  font-size: 1.35rem;
  font-weight: 800;
  margin: 0 0 0.5rem 0;
  color: #ffffff;
  line-height: 1.3;
}

.ciw-onboarding-card p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0 0 1.5rem 0;
}

.ciw-onboarding-features {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-bottom: 1.75rem;
  text-align: left;
}

.ciw-onboarding-feat {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
}

.ciw-onboarding-feat-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(217, 119, 6, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.ciw-onboarding-feat-text {
  font-size: 0.8rem;
  color: #e2e8f0;
  font-weight: 500;
  line-height: 1.3;
}

.ciw-onboarding-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.ciw-btn-primary {
  width: 100%;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(217, 119, 6, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ciw-btn-primary:active {
  transform: scale(0.98);
}

.ciw-btn-secondary {
  width: 100%;
  padding: 0.7rem 1.25rem;
  background: transparent;
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.ciw-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
}

/* === KEYFRAME ANIMATIONS === */
@keyframes ciwLogoPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  }
  50% {
    transform: scale(1.04);
    box-shadow: 0 15px 35px rgba(217, 119, 6, 0.35);
  }
}

@keyframes ciwSpinRing {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes ciwDotBounce {
  0%, 80%, 100% { transform: scale(0); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

@keyframes ciwSlideUp {
  from {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* === CENTERED TRANSLUCENT SMART INSTALL PROMPT (GLASSMORPHISM) === */
.ciw-mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.18); /* Website di belakang tetap 100% JERNIH, tanpa blur pada halaman */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99995;
  padding: 1rem;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.ciw-mobile-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* KARTU POP-UP: LATAR TRANSPARAN BERKABUT KACA (FROSTED GLASS BLUR) */
.ciw-install-glass-card {
  background: rgba(10, 25, 47, 0.48) !important; /* Latar kartu transparan tembus pandang */
  backdrop-filter: blur(28px) saturate(180%) !important; /* Efek blur murni pada bodi kartu */
  -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
  border: 1px solid rgba(217, 119, 6, 0.45);
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 25px rgba(217, 119, 6, 0.15);
  max-width: 400px;
  width: 100%;
  padding: 1.15rem 1.3rem;
  box-sizing: border-box;
  color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  position: relative;
  opacity: 0;
  filter: blur(20px);
  transform: scale(0.9);
}

/* ANIMASI MUNCUL PERLAHAN DARI BLUR KABUR MENUJU JERNIH FOKUS */
.ciw-mobile-overlay.active .ciw-install-glass-card {
  animation: ciwCardBlurFocusIn 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes ciwCardBlurFocusIn {
  0% {
    opacity: 0;
    filter: blur(22px);
    transform: scale(0.88);
  }
  50% {
    opacity: 0.85;
    filter: blur(6px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: scale(1);
  }
}

.ciw-card-close-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.ciw-card-close-btn:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.ciw-card-header {
  display: flex;
  align-items: flex-start; /* Sejajar dari tepi atas */
  gap: 0.85rem;
  margin-bottom: 0.5rem;
}

.ciw-card-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(217, 119, 6, 0.4);
  flex-shrink: 0;
  margin-top: 1px; /* Presisi sejajar dengan tinggi huruf kapital CIW */
}

.ciw-card-title-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* TULISAN CIW MOBILE BERWARNA GOLD SESUAI INSTRUKSI DAN SEJAJAR */
.ciw-card-title {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  color: #fbbf24 !important; /* GOLD */
  line-height: 1.1 !important;
  letter-spacing: 0.02em;
}

/* TULISAN SUBTITEL DI BAWAHNYA BERWARNA PUTIH */
.ciw-card-subtitle {
  margin: 0.25rem 0 0 0 !important;
  padding: 0 !important;
  font-size: 0.76rem !important;
  color: #ffffff !important; /* PUTIH */
  font-weight: 500 !important;
  line-height: 1.25 !important;
  opacity: 0.95;
}

/* DESKRIPSI TEKS DENGAN JARAK RAPAT & PROPORSIONAL */
.ciw-card-desc {
  font-size: 0.8rem !important;
  line-height: 1.48 !important;
  color: #f1f5f9 !important;
  margin: 0 0 0.75rem 0 !important; /* Jarak dirapatkan */
}

.ciw-card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ciw-btn-compact-install {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  height: 32px;
  padding: 0 0.85rem;
  border-radius: 7px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.25);
  transition: transform 0.15s ease;
  white-space: nowrap;
  box-sizing: border-box;
}

.ciw-btn-compact-install:active {
  transform: scale(0.97);
}

.ciw-store-badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.ciw-badge-btn {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: opacity 0.15s ease, transform 0.15s ease;
  outline: none;
  box-shadow: none !important;
}

.ciw-badge-btn:hover {
  opacity: 0.88;
  transform: scale(1.03);
}

.ciw-badge-btn img {
  height: 32px;
  width: auto;
  display: block;
  border-radius: 5px;
  border: none !important;
  box-shadow: none !important;
}
