/* Prompt pasang aplikasi versi Clay (LEX-248). Perilaku dari pwa-install-prompt.js;
   berkas ini hanya tampilan. `hidden` dihormati: tampilan flex hanya saat terbuka. */
.clay-pwa[hidden] { display: none !important; }
.clay-pwa {
  position: fixed; inset: 0; z-index: 2147483645; /* di atas tombol WhatsApp mengambang (2147483644) */
  display: flex; align-items: flex-end; justify-content: center;
  padding: 16px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  font-family: var(--clay-body-font); color: var(--ink);
}
.clay-pwa__latar {
  position: absolute; inset: 0;
  background: rgba(56, 45, 73, .42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  animation: clayPwaLatar .3s ease both;
}
.clay-pwa__kartu {
  position: relative; width: 100%; max-width: 420px;
  max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 18px; border-radius: var(--radius-xl, 36px);
  background: var(--surface, #fffdf9);
  box-shadow: 0 30px 70px rgba(56, 45, 73, .28), inset 0 -8px 16px rgba(105, 78, 151, .08), inset 0 8px 16px rgba(255, 255, 255, .9);
  animation: clayPwaMuncul .45s var(--clay-pegas, cubic-bezier(.34, 1.56, .64, 1)) both;
}

/* Tombol tutup: gelembung clay di pojok kartu, di atas hero. */
.clay-pwa__tutup {
  position: absolute; top: 22px; right: 22px; z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .88); color: var(--ink); cursor: pointer;
  box-shadow: 0 10px 20px rgba(56, 45, 73, .18), inset 0 -3px 6px rgba(105, 78, 151, .12), inset 0 3px 6px #fff;
  transition: transform .3s var(--clay-pegas, ease);
}
.clay-pwa__tutup svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.clay-pwa__tutup:active { transform: scale(.88); }

/* Hero: tanpa foto = gradien peach -> lavender, teks gelap; dengan foto = teks putih di atas bayangan. */
.clay-pwa__hero {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 18px;
  min-height: 210px; padding: 18px; border-radius: 28px;
  background: linear-gradient(135deg, var(--peach, #ffe2d2) 0%, var(--pink, #ffe1ec) 48%, var(--lavender, #eee4ff) 100%);
  box-shadow: inset 0 -10px 20px rgba(105, 78, 151, .1), inset 0 10px 20px rgba(255, 255, 255, .6);
}
.clay-pwa__foto { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.clay-pwa__hero--foto::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(30, 22, 44, .05) 30%, rgba(30, 22, 44, .72) 100%);
}
.clay-pwa__atas, .clay-pwa__teks { position: relative; z-index: 1; }
.clay-pwa__atas { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding-right: 46px; }
.clay-pwa__kicker {
  display: inline-flex; align-items: center; gap: 7px; max-width: 100%;
  padding: 7px 12px 7px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  font: 700 .74rem/1.2 var(--clay-accent-font); color: var(--ink);
  box-shadow: 0 8px 16px rgba(56, 45, 73, .12);
}
.clay-pwa__kicker svg { flex: 0 0 auto; width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--brand, #ff7a59); fill: none; stroke: #fff; stroke-width: 2; stroke-linejoin: round; }
.clay-pwa__logo {
  position: absolute; top: 58px; right: 0;
  box-sizing: border-box; display: block; width: 64px; height: 64px; padding: 8px; border-radius: 20px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 12px 24px rgba(56, 45, 73, .16), inset 0 -4px 8px rgba(105, 78, 151, .1), inset 0 4px 8px #fff;
  animation: clayPwaLogo 5s ease-in-out infinite;
}
.clay-pwa__logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.clay-pwa__teks { padding-right: 70px; }
.clay-pwa__teks h2 { margin: 0 0 6px; font: 800 clamp(1.35rem, 5.6vw, 1.7rem)/1.12 var(--clay-heading-font); letter-spacing: -.02em; color: var(--ink); }
.clay-pwa__teks p { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--muted); }
.clay-pwa__hero--foto .clay-pwa__teks h2 { color: #fff; text-shadow: 0 2px 12px rgba(0, 0, 0, .3); }
.clay-pwa__hero--foto .clay-pwa__teks p { color: rgba(255, 255, 255, .9); }

/* Manfaat: empat ubin clay berwarna. */
.clay-pwa__manfaat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 4px 0; padding: 0; list-style: none; }
.clay-pwa__ubin {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px 12px; border-radius: 20px;
  font: 700 .78rem/1.25 var(--clay-accent-font); color: var(--ink);
  animation: clayPwaUbin .5s var(--clay-pegas, ease) both;
}
.clay-pwa__ubin:nth-child(2) { animation-delay: .06s; }
.clay-pwa__ubin:nth-child(3) { animation-delay: .12s; }
.clay-pwa__ubin:nth-child(4) { animation-delay: .18s; }
.clay-pwa__ubin--kuning { background: var(--yellow, #fff0bb); box-shadow: 0 10px 20px var(--yellow-shadow), inset 0 -4px 8px rgba(153, 111, 18, .12), inset 0 4px 8px rgba(255, 255, 255, .7); }
.clay-pwa__ubin--mint { background: var(--mint, #dff4e8); box-shadow: 0 10px 20px var(--mint-shadow), inset 0 -4px 8px rgba(43, 119, 78, .12), inset 0 4px 8px rgba(255, 255, 255, .7); }
.clay-pwa__ubin--lavender { background: var(--lavender, #eee4ff); box-shadow: 0 10px 20px var(--purple-shadow), inset 0 -4px 8px rgba(105, 78, 151, .12), inset 0 4px 8px rgba(255, 255, 255, .7); }
.clay-pwa__ubin--peach { background: var(--peach, #ffe2d2); box-shadow: 0 10px 20px var(--peach-shadow), inset 0 -4px 8px rgba(165, 76, 49, .12), inset 0 4px 8px rgba(255, 255, 255, .7); }
.clay-pwa__ikon {
  flex: 0 0 auto; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 12px;
  background: rgba(255, 255, 255, .85); box-shadow: inset 0 -2px 4px rgba(56, 45, 73, .08);
}
.clay-pwa__ikon svg { width: 18px; height: 18px; fill: none; stroke: var(--brand-deep, #dd5437); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.clay-pwa__ios, .clay-pwa__status {
  margin: 12px 4px 0; padding: 11px 14px; border-radius: 16px;
  background: var(--lavender, #eee4ff); font-size: .84rem; line-height: 1.45;
}
.clay-pwa__ios[hidden], .clay-pwa__status[hidden] { display: none; }

.clay-pwa__aksi { display: grid; gap: 6px; margin: 16px 4px 0; }
.clay-pwa__pasang { width: 100%; justify-content: center; gap: 10px; }
.clay-pwa__pasang .le-pwa-download-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; }
.clay-pwa__pasang .le-pwa-download-icon svg { width: 20px; height: 20px; fill: currentColor; }
.clay-pwa__nanti {
  justify-self: center; padding: 8px 14px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 700 .86rem/1 var(--clay-accent-font); color: var(--muted);
}
.clay-pwa__nanti:hover, .clay-pwa__nanti:focus-visible { color: var(--ink); background: var(--lavender, #eee4ff); }

@media (max-width: 420px) {
  .clay-pwa__manfaat { gap: 8px; margin-inline: 0; }
  .clay-pwa__ubin { gap: 8px; padding: 9px 10px; border-radius: 18px; font-size: .74rem; }
  .clay-pwa__ikon { width: 28px; height: 28px; border-radius: 10px; }
  .clay-pwa__ikon svg { width: 16px; height: 16px; }
  .clay-pwa__hero { min-height: 196px; padding: 16px; }
}
@media (min-width: 640px) {
  .clay-pwa { align-items: center; }
  .clay-pwa__kartu { max-width: 460px; padding: 14px 14px 20px; }
  .clay-pwa__hero { min-height: 230px; padding: 22px; }
}
@media (hover: hover) and (pointer: fine) {
  .clay-pwa__tutup:hover { transform: rotate(90deg) scale(1.06); }
  .clay-pwa__ubin { transition: transform .32s var(--clay-pegas, ease); }
  .clay-pwa__ubin:hover { transform: translateY(-3px) rotate(-1deg); }
}

@keyframes clayPwaLatar { from { opacity: 0; } }
@keyframes clayPwaMuncul { from { opacity: 0; transform: translateY(40px) scale(.94); } }
@keyframes clayPwaUbin { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes clayPwaLogo { 0%, 100% { translate: 0 0; rotate: -3deg; } 50% { translate: 0 -5px; rotate: 3deg; } }

@media (prefers-reduced-motion: reduce) {
  .clay-pwa__latar, .clay-pwa__kartu, .clay-pwa__ubin, .clay-pwa__logo { animation: none; }
}
