/* ============================================================
   Tombol CS melayang (FAB) — kapsul kaca modern
   Orb gradien hijau + ring berputar + teks "CS 24/7 · Online"
   Dipakai semua halaman Dominochip.
   ============================================================ */

.cs-fab-wrap {
  position: fixed;
  right: 18px;
  bottom: 20px;
  z-index: 880;
  opacity: 0;
  transform: translateY(22px) scale(.92);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2, .9, .3, 1.25);
  pointer-events: none;
}
.cs-fab-wrap.on { opacity: 1; transform: none; pointer-events: auto; }
/* di halaman ber-bottom-nav, angkat di atas navigasi */
.cs-fab-wrap.above-nav { bottom: calc(84px + env(safe-area-inset-bottom)); }

/* ---------- kapsul kaca ---------- */
.cs-fab {
  position: relative;
  display: block;
  padding: 0; border: 0; background: none;
  cursor: pointer; border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
  animation: csFabFloat 5s ease-in-out infinite;
  transition: transform .2s ease;
}
.cs-fab:active { transform: scale(.96); }
.cs-fab:focus-visible { outline: 2px solid #ffc93c; outline-offset: 5px; }

/* cahaya lembut di belakang kapsul */
.cs-fab-glow {
  position: absolute; inset: -10px -6px;
  border-radius: 999px;
  background:
    radial-gradient(60% 120% at 22% 50%, rgba(52, 224, 122, .5), transparent 70%),
    radial-gradient(60% 120% at 80% 50%, rgba(255, 201, 60, .28), transparent 72%);
  filter: blur(14px);
  opacity: .55;
  transition: opacity .3s ease;
}
.cs-fab-wrap:hover .cs-fab-glow { opacity: .85; }

.cs-fab-card {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 18px 7px 7px;
  border-radius: 999px;
  background:
    linear-gradient(150deg, rgba(52, 26, 84, .9) 0%, rgba(26, 11, 44, .94) 55%, rgba(17, 7, 30, .96) 100%);
  -webkit-backdrop-filter: blur(14px) saturate(1.25);
  backdrop-filter: blur(14px) saturate(1.25);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow:
    0 18px 38px rgba(4, 0, 12, .55),
    0 2px 10px rgba(0, 0, 0, .3),
    inset 0 1px 0 rgba(255, 255, 255, .16),
    inset 0 -10px 20px rgba(0, 0, 0, .22);
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
/* garis emas tipis di tepi atas kapsul */
.cs-fab-card::before {
  content: '';
  position: absolute; top: 0; left: 12%; right: 12%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 201, 60, .55), transparent);
}
/* kilau menyapu saat hover */
.cs-fab-card::after {
  content: '';
  position: absolute; top: -40%; bottom: -40%; left: -70%;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .16), transparent);
  transform: skewX(-18deg);
  transition: left .55s ease;
}
.cs-fab-wrap:hover .cs-fab-card { transform: translateY(-2px); border-color: rgba(255, 201, 60, .34); }
.cs-fab-wrap:hover .cs-fab-card::after { left: 130%; }

/* ---------- maskot CS ---------- */
.cs-fab-orb {
  position: relative;
  width: 50px; height: 50px; flex: 0 0 50px;
  display: grid; place-items: center;
  border-radius: 50%;
}
.cs-fab-orb svg {
  position: relative; z-index: 2;
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 6px 12px rgba(3, 0, 10, .5)) drop-shadow(0 0 8px rgba(255, 201, 60, .3));
  animation: csBob 4.5s ease-in-out infinite;
}
/* denyut emas tipis di sekeliling maskot */
.cs-fab-orb::after {
  content: '';
  position: absolute; inset: -5px; border-radius: 50%;
  border: 1.5px solid rgba(255, 201, 60, .45);
  animation: csFabPing 3.4s cubic-bezier(.2, .7, .3, 1) infinite;
}

/* titik online */
.cs-fab-dot {
  position: absolute; right: -1px; bottom: -1px; z-index: 3;
  width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #eafff2, #55e884 58%, #16a34a);
  border: 2px solid rgba(20, 8, 34, .92);
  box-shadow: 0 0 10px rgba(74, 222, 128, .95);
}

/* ---------- teks ---------- */
.cs-fab-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; }
.cs-fab-txt b {
  font-family: inherit; font-size: 13px; font-weight: 800; letter-spacing: .3px;
  color: #fff;
}
.cs-fab-txt small {
  display: flex; align-items: center; gap: 5px;
  margin-top: 3px;
  font-size: 10px; font-weight: 600; letter-spacing: .2px;
  color: #8fe0ae;
}
.cs-fab-txt small::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%;
  background: #4ade80; box-shadow: 0 0 0 2px rgba(74, 222, 128, .18);
}

/* ---------- tooltip kaca ---------- */
.cs-fab-tip {
  position: absolute;
  right: 2px;
  bottom: 80px;
  width: max-content; max-width: min(258px, calc(100vw - 40px));
  padding: 12px 34px 12px 14px;
  border-radius: 16px 16px 5px 16px;
  background: linear-gradient(160deg, rgba(46, 22, 74, .96), rgba(21, 9, 36, .97));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 201, 60, .28);
  box-shadow: 0 20px 44px rgba(3, 0, 10, .6), inset 0 1px 0 rgba(255, 255, 255, .1);
  opacity: 0; transform: translateY(10px) scale(.95); transform-origin: bottom right;
  transition: opacity .28s ease, transform .28s cubic-bezier(.2, .9, .3, 1.3);
  pointer-events: none;
}
.cs-fab-tip b {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: #fff; letter-spacing: .2px;
}
.cs-fab-tip b i {
  width: 7px; height: 7px; border-radius: 50%; display: inline-block;
  background: #4ade80; box-shadow: 0 0 0 3px rgba(74, 222, 128, .16);
}
.cs-fab-tip span { display: block; margin-top: 5px; font-size: 11.5px; line-height: 1.5; color: #cbb8e8; }
.cs-fab-tip .cs-fab-x {
  position: absolute; top: 6px; right: 8px;
  width: 22px; height: 22px; display: grid; place-items: center;
  border: 0; background: none; color: #a58cc4; font-size: 15px; line-height: 1;
  cursor: pointer; border-radius: 50%;
}
.cs-fab-tip .cs-fab-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.cs-fab-tip.on { opacity: 1; transform: none; pointer-events: auto; }

/* saat panel CS terbuka */
body.cs-open .cs-fab-wrap { opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none; }

/* ---------- mobile ---------- */
@media (max-width: 480px) {
  .cs-fab-wrap { right: 14px; bottom: 16px; }
  .cs-fab-wrap.above-nav { bottom: calc(78px + env(safe-area-inset-bottom)); }
  .cs-fab-card { gap: 9px; padding: 6px 14px 6px 6px; }
  .cs-fab-orb { width: 40px; height: 40px; flex-basis: 40px; }
  .cs-fab-txt b { font-size: 12px; }
  .cs-fab-tip { bottom: 74px; }
}
/* di layar kecil cukup orb bulat: ringkas, tidak menutupi kartu konten */
@media (max-width: 600px) {
  .cs-fab-card { padding: 6px; border-radius: 50%; gap: 0; }
  .cs-fab-txt { display: none; }
  .cs-fab-glow { inset: -9px; border-radius: 50%; }
  .cs-fab-orb { width: 54px; height: 54px; flex-basis: 54px; }
  .cs-fab-tip { bottom: 78px; }
}

@media (prefers-reduced-motion: reduce) {
  .cs-fab, .cs-fab-orb::after, .cs-fab-orb svg { animation: none; }
}

@keyframes csFabFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes csFabSpin { to { transform: rotate(360deg); } }
@keyframes csFabPing { 0% { transform: scale(.94); opacity: .85; } 70%, 100% { transform: scale(1.4); opacity: 0; } }
@keyframes csBob { 0%, 100% { transform: translateY(0) rotate(-2.5deg); } 50% { transform: translateY(-2px) rotate(2.5deg); } }
@keyframes csTyping {
  0%, 55%, 100% { transform: translateY(0); opacity: .72; }
  25% { transform: translateY(-1.9px); opacity: 1; }
}
