/* Panah kaca "Ambil agen AI-mu gratis" = penggulir pelan yang menemani sepanjang halaman,
   plus bagian hadiah agen AI di bawah. Berkas terpisah: app.css tidak diubah.
   Layar pertama: tombol lebar dengan tulisan. Setelah digulir: mengecil jadi tombol bulat di pojok kanan bawah.
   Hilang di bagian hadiah (di sana sudah ada tombolnya sendiri). */
.agen-pill {
  position: fixed; z-index: 45;
  right: var(--gutter); bottom: max(72px, 9vh);
  display: flex; align-items: center; gap: 16px;
  padding: 12px 26px 12px 12px; border-radius: 999px;
  color: #fff; text-align: left; cursor: pointer; font: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.24), rgba(255,255,255,.08));
  -webkit-backdrop-filter: blur(22px) saturate(160%); backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid rgba(255,255,255,.4);
  box-shadow: 0 14px 44px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .3s ease, opacity .3s ease, border-color .25s ease;
}
.agen-pill:hover { transform: translateY(-3px); border-color: rgba(255,255,255,.65); }
.agen-pill .ic { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,120,180,.95); border: 1px solid rgba(255,255,255,.45); }
.agen-pill .ic svg { width: 24px; height: 24px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.agen-pill .i-turun { animation: agen-turun 1.8s ease-in-out infinite; }
.agen-pill .i-jeda { display: none; }
.agen-pill .tx { display: grid; line-height: 1.25; }
.agen-pill b { font: 700 19px/1.25 var(--display); }
.agen-pill small { font: 400 13.5px/1.3 var(--body); color: #DCEBF7; }
.agen-pill .t-jalan { display: none; }
.agen-jalan .agen-pill .t-diam { display: none; }
.agen-jalan .agen-pill .t-jalan { display: block; }
.agen-jalan .agen-pill .i-turun { animation-duration: 1.1s; }
@keyframes agen-turun { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }

/* Setelah layar pertama: tombol bulat yang ikut menemani. Saat gulir berjalan ikonnya jeda (ketuk = berhenti). */
.agen-pill.kecil { padding: 6px; gap: 0; right: max(16px, 3vw); bottom: calc(max(16px, 3vh) + 66px); background: linear-gradient(135deg, rgba(18,59,102,.7), rgba(10,31,54,.6)); }
.agen-pill.kecil .tx { display: none; }
.agen-pill.kecil .ic { width: 52px; height: 52px; }
.agen-jalan .agen-pill.kecil .i-turun { display: none; }
.agen-jalan .agen-pill.kecil .i-jeda { display: block; }

/* Gulir berhenti di tempat wajib lihat (uji bocor, selang): tombol berdenyut + ajakan singkat di sampingnya. */
.agen-pill.menunggu { animation: agen-denyut 1.8s ease-out infinite; }
@keyframes agen-denyut { 0% { box-shadow: 0 14px 44px rgba(0,0,0,.38), 0 0 0 0 rgba(255,255,255,.55); } 70%, 100% { box-shadow: 0 14px 44px rgba(0,0,0,.38), 0 0 0 16px rgba(255,255,255,0); } }
.agen-ajak {
  position: fixed; z-index: 44;
  right: calc(max(16px, 3vw) + 76px); bottom: calc(max(16px, 3vh) + 72px);
  max-width: min(300px, calc(100vw - 120px)); padding: 11px 16px; border-radius: 16px;
  color: #fff; font: 600 14px/1.35 var(--display);
  background: linear-gradient(135deg, rgba(18,59,102,.86), rgba(10,31,54,.8));
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.4); box-shadow: 0 10px 34px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.35);
  opacity: 0; transform: translateX(10px); pointer-events: none; transition: opacity .3s ease, transform .3s ease;
}
.agen-ajak.tampil { opacity: 1; transform: none; }

/* Bagian hadiah sudah terlihat: tombol pergi. */
.agen-pill.sembunyi { opacity: 0; pointer-events: none; transform: translateY(16px); }

/* Bagian hadiah (tujuan gulir otomatis) */
.hadiah .ebook-copy .kicker { color: var(--sky); }
.hadiah-btn {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 4px; padding: 17px 24px; border-radius: 16px;
  color: #fff; text-decoration: none; font: 600 17px/1.2 var(--display);
  background: linear-gradient(135deg, rgba(0,140,205,.95), rgba(0,100,160,.95));
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 12px 34px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .2s ease;
}
.hadiah-btn:hover { transform: translateY(-2px); }
.hadiah-btn svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hadiah-note { font: 400 13.5px/1.4 var(--body); color: var(--mist); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .agen-pill { background: rgba(26,58,96,.92); }
}
@media (max-width: 760px) {
  .agen-pill { left: 16px; right: 16px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); padding: 10px 20px 10px 10px; gap: 14px; }
  .agen-pill .ic { width: 48px; height: 48px; }
  .agen-pill b { font-size: 17px; }
  .agen-pill small { font-size: 12.5px; }
  /* Di HP tombol WA melayang selebar layar ada di dasar; tombol bulat naik di atasnya, di sisi kanan. */
  .agen-pill.kecil { left: auto; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); padding: 6px; }
  .agen-pill.kecil .ic { width: 52px; height: 52px; }
  .agen-ajak { right: 92px; bottom: calc(90px + env(safe-area-inset-bottom, 0px)); }
  .hadiah-btn { width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .agen-pill, .agen-pill:hover, .hadiah-btn, .hadiah-btn:hover { transition: none; transform: none; }
  .agen-pill .i-turun, .agen-pill.menunggu { animation: none; }
  .agen-ajak { transition: none; transform: none; }
}
