/**
 * BK Dental Clinic Side — Main Custom Stylesheet (assets/main.css)
 * -------------------------------------------------------------
 * Radar Loader, Floating WhatsApp Pill & Global Brand Overrides
 */

/* ============================================================
   1. RADAR LOADER STYLES & ANIMATIONS
   ============================================================ */
@keyframes nl-radar {
  0% {
    opacity: 0.1;
    transform: scale(0.55);
  }
  30% {
    opacity: 1;
    transform: scale(1.2);
  }
  55% {
    opacity: 0.55;
    transform: scale(1);
  }
  100% {
    opacity: 0.1;
    transform: scale(0.55);
  }
}

@keyframes nl-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#native-loader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--nl-bg, #e8e7e5);
  will-change: opacity;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#native-loader .nl-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#native-loader .nl-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(5, 1fr);
  width: 110px;
  height: 110px;
  gap: 0;
}

#native-loader .nl-dot {
  display: flex;
  align-items: center;
  justify-content: center;
}

#native-loader .nl-dot i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--nl-fg, #75614d);
  opacity: 0.1;
  transform: scale(0.55);
  will-change: transform, opacity;
  animation: nl-radar 2.4s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  font-style: normal;
}

#native-loader .nl-dot[data-r="0"] i {
  animation-delay: 0s;
}
#native-loader .nl-dot[data-r="1"] i {
  animation-delay: 0.3s;
}
#native-loader .nl-dot[data-r="2"] i {
  animation-delay: 0.6s;
}

#native-loader .nl-text {
  display: flex;
  gap: 0.35em;
  margin-top: 28px;
  white-space: nowrap;
  font-family:
    "Satoshi",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--nl-fg, #75614d);
}

#native-loader .nl-char {
  opacity: 0;
  display: inline-block;
  animation: nl-fade 0.5s ease-out forwards;
}

@media (prefers-reduced-motion: reduce) {
  #native-loader .nl-dot i {
    animation: none !important;
    opacity: 0.7 !important;
    transform: scale(1) !important;
  }
  #native-loader .nl-char {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ============================================================
   2. FLOATING WHATSAPP QUICK-CONTACT PILL
   ============================================================ */
#bk-wa {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(14px);
  z-index: 9990;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 7px 22px 7px 8px;
  border-radius: 999px;
  background: rgba(117, 97, 77, 0.94);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #fff;
  font-family:
    "Satoshi",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-decoration: none;
  box-shadow: 0 10px 32px rgba(117, 97, 77, 0.45);
  opacity: 0;
  transition:
    opacity 0.5s ease,
    transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    background 0.25s ease,
    box-shadow 0.25s ease;
  cursor: pointer;
  white-space: nowrap;
}

#bk-wa.on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#bk-wa:hover {
  background: rgba(95, 78, 62, 0.98);
  transform: translateX(-50%) translateY(-2px) scale(1.02);
  box-shadow: 0 14px 40px rgba(117, 97, 77, 0.6);
  border-color: rgba(255, 255, 255, 0.5);
}

#bk-wa .wa-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #25d366;
  box-shadow:
    0 0 16px rgba(37, 211, 102, 0.55),
    0 0 0 3px rgba(37, 211, 102, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: #fff;
}

#bk-wa b {
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #fff;
}

#bk-wa span.wa-txt {
  opacity: 0.98;
}

@media (max-width: 640px) {
  #bk-wa {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    font-size: 12px;
    padding: 6px 18px 6px 7px;
    gap: 10px;
  }
  #bk-wa .wa-circle {
    width: 28px;
    height: 28px;
  }
}
