/* ========================================================================== */
/* Client Footer – fixed-but-flexible + mobile behavior (blue theme)         */
/* ========================================================================== */

:root {
  --client-blue: #003DF6;
}

/* Footer client (desktop + tablet) */
.client-footer {
  position: relative;
  /* posisi normal, bisa diubah ke fixed via class .fixed-footer */
  flex-shrink: 0;
  margin-top: auto;
  background: linear-gradient(180deg,
      var(--client-blue) 0%,
      #1A4FFF 55%,
      #3366FF 100%);
  color: #f9fafb;
  border-top: 1px solid rgba(15, 23, 42, 0.3);
  font-size: 0.9rem;
  padding-top: 0.85rem;
  padding-bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
  z-index: 900;
}

.client-footer .footer-text {
  opacity: 0.96;
  font-weight: 500;
  color: #f9fafb;
}

.client-footer .small,
.client-footer .text-white-50 {
  color: rgba(226, 232, 255, 0.8) !important;
}

/* Garis halus dekoratif di atas footer */
.client-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
      transparent 0%,
      rgba(255, 255, 255, 0.7) 50%,
      transparent 100%);
  pointer-events: none;
}

/* Ikon sosmed desktop (sesuai class di Blade: .client-social-icon) */
.client-footer .client-social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.24);
  color: #e5edff;
  text-decoration: none;
  transition:
    background 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease,
    color 0.16s ease;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.4);
}

.client-footer .client-social-icon i {
  font-size: 1rem;
}

.client-footer .client-social-icon:hover,
.client-footer .client-social-icon:focus-visible {
  background: #ffffff;
  color: var(--client-blue);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.5);
  outline: 0;
}

/* Fixed-but-flexible behavior (desktop) */
/* Class .fixed-footer di-add/di-remove via JS */
.client-footer.fixed-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 950;
}

/* Tambah ruang di bawah konten kalau footer lagi fixed (desktop only) */
@media (min-width: 992px) {

  body.has-fixed-footer .app-content,
  body.has-fixed-footer main.app-content,
  body.has-fixed-footer .container-main,
  body.has-fixed-footer .page-content {
    padding-bottom: 68px !important;
    /* kira-kira tinggi footer */
  }
}

/* Hide footer on mobile (pakai FAB sosmed + bottom-nav) */
@media (max-width: 991.98px) {
  .client-footer {
    display: none !important;
  }

  /* samain dengan client: kalaupun ada has-fixed-footer di body, padding nol di mobile */
  body.has-fixed-footer .app-content,
  body.has-fixed-footer main.app-content,
  body.has-fixed-footer .container-main,
  body.has-fixed-footer .page-content {
    padding-bottom: 0;
  }
}

/* ========================================================================== */
/* FAB Sosial Media (mobile only, drop-up)                                    */
/* ========================================================================== */

.client-social-dial {
  position: fixed;
  right: 1rem;
  bottom: calc(1.75rem + var(--mb-nav-h, 54px));
  /* sedikit di atas bottom-nav */
  z-index: 1005;
  /* di atas bottom nav, di bawah header */
  pointer-events: none;
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Button FAB */
.client-social-dial__fab {
  pointer-events: auto;
  border: none;
  border-radius: 999px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--client-blue);
  color: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.45);
  cursor: pointer;
  transition:
    transform 0.16s ease,
    box-shadow 0.16s ease,
    background 0.16s ease;
}

.client-social-dial__fab i {
  font-size: 1.3rem;
}

.client-social-dial__fab:hover,
.client-social-dial__fab:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.6);
  outline: 0;
}

.client-social-dial__fab:active {
  transform: scale(0.97);
}

/* Backdrop untuk menutup menu dengan tap di luar */
.client-social-dial__backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.16s ease;
  pointer-events: none;
}

/* Menu sosmed (drop-up) */
.client-social-dial__menu {
  position: absolute;
  right: 0;
  bottom: 62px;
  /* tepat di atas FAB */
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  border-radius: 1rem;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.15);
  min-width: 190px;
  transform: translateY(8px);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.16s ease,
    opacity 0.16s ease;
  max-height: 230px;
  overflow-y: auto;
}

.client-social-dial__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  color: #1e293b;
  text-decoration: none;
  font-size: 0.85rem;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.client-social-dial__item i {
  font-size: 1.1rem;
}

.client-social-dial__item:hover,
.client-social-dial__item:focus-visible {
  background: rgba(0, 61, 246, 0.08);
  color: var(--client-blue);
  transform: translateX(-1px);
  outline: 0;
}

/* Label kecil di samping icon */
.client-social-dial__label {
  white-space: nowrap;
}

/* State ketika dial terbuka */
.client-social-dial.is-open .client-social-dial__backdrop {
  opacity: 1;
  pointer-events: auto;
  z-index: -1;
}

.client-social-dial.is-open .client-social-dial__menu {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* Hanya tampil di mobile (tablet ke atas pakai footer biasa) */
@media (min-width: 992px) {
  .client-social-dial {
    display: none !important;
  }
}

/* FAB hide (dipakai saat dropdown bottom-nav dibuka) */
.client-social-dial.hidden {
  opacity: 0;
  transform: scale(0.85);
  pointer-events: none;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

  .client-social-dial,
  .client-social-dial__menu,
  .client-social-dial__fab,
  .client-social-dial__item {
    transition: none !important;
  }
}
