/* ============================================
   MAGNETIC DOCK — Sabit iletişim widget'ı
   ============================================ */

.md-dock {
  position: fixed;
  top: 50%;
  right: 20px;
  /* Konum transform'da; cam efekti ayrı katmanda — ikisi bir arada titreme yapar */
  transform: translate3d(0, -50%, 0);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: transparent;
  padding: 14px 10px;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  border-radius: 28px;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

@keyframes md-item-enter {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0) scale(0.92);
  }

  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

/* Cam katmanı: blur burada, transform yok */
.md-dock::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: rgba(8, 10, 14, 0.36);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  pointer-events: none;
}

.md-dock::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 42%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.md-item {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  text-decoration: none;
  position: relative;
  transition:
          transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
          background 0.28s ease,
          color 0.28s ease,
          box-shadow 0.28s ease;
  opacity: 0;
  animation: md-item-enter 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--md-delay) both;
  z-index: 2;
}

.md-item i {
  line-height: 1;
}

.md-item:hover {
  transform: translate3d(-3px, 0, 0) scale(1.12);
  background: rgba(255, 255, 255, 0.95);
  color: #c7282f;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.md-item.md-featured {
  background: #25d366;
  color: #fff;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.md-item.md-featured:hover {
  background: #fff;
  color: #25d366;
  box-shadow: 0 12px 35px rgba(37, 211, 102, 0.5);
}

.md-item.md-telegram {
  background: #229ed9;
  color: #fff;
}

.md-item.md-telegram:hover {
  background: #fff;
  color: #229ed9;
}

.md-item.md-viber {
  background: #7360f2;
  color: #fff;
}

.md-item.md-viber:hover {
  background: #fff;
  color: #7360f2;
}

.md-tooltip {
  position: absolute;
  right: calc(100% + 18px);
  top: 50%;
  background: #fff;
  color: #17222c;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  font-family: var(--rs-ff-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(6px, -50%, 0);
  transition:
          opacity 0.25s ease,
          transform 0.25s ease;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.md-tooltip::after {
  content: "";
  position: absolute;
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: #fff;
}

.md-item:hover .md-tooltip {
  opacity: 1;
  transform: translate3d(0, -50%, 0);
}

.md-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 18px;
  border: 1.5px solid #25d366;
  opacity: 0.5;
  animation: md-pulse-anim 2.4s ease-out infinite;
  pointer-events: none;
}

@keyframes md-pulse-anim {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .md-item {
    animation: none;
    opacity: 1;
  }

  .md-pulse {
    display: none;
  }
}

@media (max-width: 768px) {
  .md-dock {
    right: 12px;
    gap: 10px;
    padding: 10px 7px;
    border-radius: 22px;
  }

  .md-item {
    width: 42px;
    height: 42px;
    font-size: 18px;
    border-radius: 13px;
  }

  .md-tooltip {
    display: none;
  }

  .md-pulse {
    display: none;
  }
}
