/* =====================================
   FLOATING AFFILIATE RECOMMENDATION
===================================== */

.floating-ads {
  position: fixed;
  right: 20px;
  bottom: 90px;

  z-index: 9999;

  font-family: inherit;

  pointer-events: none;
}

.hotspot {
  width: 52px;
  height: 52px;

  border: 2px solid #0f766e;
  border-radius: 50%;

  background: #ffffff;
  color: #0f766e;

  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 23px;

  box-shadow:
    0 8px 25px rgba(0, 0, 0, 0.18),
    0 0 0 4px rgba(15, 118, 110, 0.10);

  margin-left: auto;

  pointer-events: auto;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.hotspot:hover {
  transform: scale(1.06);

  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.22),
    0 0 0 5px rgba(15, 118, 110, 0.15);
}


.hotspot-ads {
  position: absolute;

  right: 0;
  bottom: 65px;

  width: 340px;

  background: #ffffff;

  border-radius: 18px;

  padding: 14px;

  box-shadow:
    0 15px 45px rgba(0, 0, 0, 0.20);

  opacity: 0;
  visibility: hidden;

  transform:
    translateY(12px)
    scale(0.96);

  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease;

  pointer-events: none;

  will-change:
    transform,
    opacity;
}

.hotspot-ads.is-open {

  opacity: 1;

  visibility: visible;

  transform:
    translateY(0)
    scale(1);

  pointer-events: auto;
}

.ads-close {

  position: absolute;

  top: 8px;
  right: 8px;

  width: 28px;
  height: 28px;

  border: 0;
  border-radius: 50%;

  background: rgba(0, 0, 0, 0.05);

  color: #667085;

  transition:
    background 0.2s ease,
    transform 0.2s ease;

  font-size: 20px;

  line-height: 1;

  cursor: pointer;

  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;
}

.ads-close:hover {
  background: rgba(0, 0, 0, 0.10);
  transform: scale(1.05);
}

.ads-card {

  display: flex;

  align-items: center;

  gap: 12px;

  padding: 5px;

  border-radius: 14px;

  text-decoration: none;

  color: inherit;

  transition:
    transform 0.2s ease;
}

.ads-card:hover {
  transform: translateY(-2px);
}

.ads-card img {

  width: 100px;
  height: 100px;

  object-fit: contain;

  border-radius: 12px;

  flex-shrink: 0;
}

.ads-content {
  min-width: 0;
}

.ads-badge {

  display: inline-block;

  margin-bottom: 5px;

  font-size: 9px;

  font-weight: 800;

  letter-spacing: 0.5px;

  color: #0f766e;
}

.ads-title {

  margin: 0 0 4px;

  font-size: 14px;

  line-height: 1.25;

  font-weight: 700;

  color: #172033;
}

.ads-description {

  margin: 0 0 9px;

  font-size: 11px;

  line-height: 1.45;

  color: #667085;
}

.ads-cta {

  display: inline-block;

  padding: 7px 11px;

  border-radius: 8px;

  background: #0f766e;

  color: #ffffff;

  font-size: 10px;

  font-weight: 700;

  letter-spacing: 0.2px;

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    filter 0.2s ease;
}

.ads-card:hover .ads-cta {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.floating-ads.ads-session-closed {
  display: none;
}

@media (max-width: 600px) {

  .floating-ads {

    right: 12px;

    bottom: 75px;

  }


  .hotspot {

    width: 48px;
    height: 48px;

    font-size: 21px;

  }


  .hotspot-ads {

    width:
      min(
        calc(100vw - 24px),
        330px
      );

    right: 0;

    bottom: 60px;

    padding: 12px;

    border-radius: 16px;

  }


  .ads-card img {

    width: 78px;
    height: 78px;

  }


  .ads-title {

    font-size: 14px;

  }


  .ads-description {

    font-size: 10.5px;

  }


  .ads-cta {

    padding: 7px 10px;

    font-size: 10px;

  }

}

@media (prefers-reduced-motion: reduce) {

  .hotspot,
  .hotspot-ads,
  .ads-card,
  .ads-cta {

    transition: none !important;

  }

}


/* =========================================
   KLINIKINDONESIA — SOFT TRANSPARENT FLOATING ADS
   Selaras dengan breadcrumb
========================================= */

/* Tombol ikon medis */
#floatingAds .hotspot {
  background: rgba(14, 165, 233, 0.055);
  color: #0f766e;

  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: 50%;

  box-shadow: none;

  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* Panel rekomendasi transparan halus */
#floatingAds .hotspot-ads {
  background: rgba(14, 165, 233, 0.055);

  border: 1px solid rgba(14, 165, 233, 0.12);
  border-radius: 22px;

  box-shadow: none;

  -webkit-backdrop-filter: blur(14px) saturate(120%);
  backdrop-filter: blur(14px) saturate(120%);
}

/* Konten tidak diberi lapisan tambahan */
#floatingAds .ads-card,
#floatingAds .ads-content {
  background: transparent;
}

/* Teks tetap jelas */
#floatingAds .ads-badge {
  color: #0f766e;
}

#floatingAds .ads-title {
  color: #172033;
}

#floatingAds .ads-description {
  color: #64748b;
}

/* CTA tetap solid untuk konversi */
#floatingAds .ads-cta {
  background: #0f766e;
  color: #ffffff;
  border: none;
  border-radius: 9px;
}

/* Tombol tutup menyatu dengan panel */
#floatingAds .ads-close {
  background: rgba(14, 165, 233, 0.07);
  color: #64748b;
  border: 1px solid rgba(14, 165, 233, 0.10);

  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* =========================================
   DARK MODE — TRANSPARANSI SENADA
========================================= */

body.dark #floatingAds .hotspot {
  background: rgba(56, 189, 248, 0.07);
  color: #5eead4;
  border-color: rgba(56, 189, 248, 0.16);
  box-shadow: none;
}

body.dark #floatingAds .hotspot-ads {
  background: rgba(56, 189, 248, 0.07);
  border-color: rgba(56, 189, 248, 0.16);
  box-shadow: none;
}

body.dark #floatingAds .ads-badge {
  color: #5eead4;
}

body.dark #floatingAds .ads-title {
  color: #f1f5f9;
}

body.dark #floatingAds .ads-description {
  color: #cbd5e1;
}

body.dark #floatingAds .ads-close {
  background: rgba(56, 189, 248, 0.07);
  color: #cbd5e1;
  border-color: rgba(56, 189, 248, 0.14);
}

/* =========================================
PERBAIKAN IKON FLOATING ADS
HANYA MEMPERJELAS TOMBOL IKON 🩺
PANEL IKLAN TETAP TIDAK BERUBAH
========================================= */

/* DARK MODE */
body.dark #floatingAds .hotspot {
background: rgba(14, 165, 233, 0.22);
color: #7dd3fc;

border: 1.5px solid rgba(56, 189, 248, 0.70);

box-shadow:
0 0 14px rgba(56, 189, 248, 0.20),
0 0 0 4px rgba(56, 189, 248, 0.10);
}

/* LIGHT MODE */
body:not(.dark) #floatingAds .hotspot {
background: rgba(14, 165, 233, 0.16);
color: #0284c7;

border: 1.5px solid rgba(14, 165, 233, 0.55);

box-shadow:
0 4px 14px rgba(2, 132, 199, 0.15),
0 0 0 4px rgba(14, 165, 233, 0.08);
}

/* EFEK SAAT IKON DISENTUH */
#floatingAds .hotspot:hover {
transform: scale(1.06);
}

/* FOKUS KEYBOARD */
#floatingAds .hotspot:focus-visible {
outline: 2px solid #38bdf8;
outline-offset: 4px;
}

/* =========================================
FLOATING ADS — DESKTOP, LANDSCAPE, PORTRAIT
KlinikIndonesia.com
========================================= */

/* 1. KOMPUTER / DESKTOP */
@media screen and (min-width: 1024px) {
#floatingAds {
right: 35px;
bottom: 35px;
}
}

/* 2. TABLET / LAYAR LANDSCAPE */
@media screen and (orientation: landscape)
and (min-width: 601px)
and (max-height: 600px) {
#floatingAds {
right: 30px;
bottom: 25px;
}
}

/* 3. TABLET / LAYAR PORTRAIT */
@media screen and (orientation: portrait) {
#floatingAds {
right: 20px;
bottom: 25px;
}
}
