/* DK Residential shared floating utilities.
   Adds the approved Contact Dock and Back to Top systems for pages that do not
   already carry a local page-approved implementation. */
:root {
  --floating-z-index: 90;
}

.floating-contact-dock {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: var(--floating-z-index);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transform: translateY(-50%);
  transition: opacity 180ms ease, visibility 180ms ease;
}

.floating-contact-dock.is-context-suppressed {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: none !important;
}

.floating-contact-dock__item {
  width: 58px;
  height: 58px;
  min-height: 58px;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(139, 199, 238, .22);
  border-radius: 14px;
  background: rgba(9, 43, 65, .95);
  color: #fff;
  box-shadow: 0 8px 22px rgba(4, 23, 36, .16), 0 0 0 1px rgba(139, 199, 238, .05);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  text-decoration: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 220ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.floating-contact-dock__item svg {
  display: block;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.floating-contact-dock__item span {
  color: currentColor;
  font: 700 11px/1.05 "Manrope", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
  text-align: center;
}

.floating-contact-dock__item--quote span {
  font-size: 9.5px;
  line-height: 1;
}

.floating-contact-dock__item--whatsapp span {
  font-size: 9px;
  line-height: 1;
}

.floating-contact-dock__item--call {
  gap: 2px;
}

.floating-contact-dock__item--call svg {
  width: 20px;
  height: 20px;
}

.floating-contact-dock__item--call span {
  max-width: 100%;
  font-size: 9.5px;
  line-height: 1;
  white-space: normal;
}

.floating-contact-dock__item:hover,
.floating-contact-dock__item:focus-visible {
  background: rgba(13, 53, 78, .98);
  border-color: rgba(216, 154, 43, .58);
  box-shadow: 0 11px 26px rgba(4, 23, 36, .22), 0 0 20px rgba(216, 154, 43, .14);
  color: #fff;
  transform: translateY(-2px);
}

.floating-contact-dock__toggle {
  display: none;
}

.floating-contact-dock__item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--dk-gold, #D89A2B) 40%, transparent);
  outline-offset: 3px;
}

.back-to-top {
  position: fixed;
  right: 28px;
  bottom: 28px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid rgba(139, 199, 238, .22);
  border-radius: 999px;
  background: rgba(9, 43, 65, .94);
  color: #fff;
  font: 700 14px/1 "Manrope", "Noto Sans SC", sans-serif;
  letter-spacing: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(4, 23, 36, .16), 0 0 0 1px rgba(139, 199, 238, .05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 240ms ease, visibility 240ms ease, transform 240ms ease, background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  z-index: var(--floating-z-index);
}

.back-to-top__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: currentColor;
  transition: color 220ms ease, transform 220ms ease;
}

.back-to-top__icon svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top.is-visible .back-to-top__icon {
  animation: backToTopArrowCue 2.6s ease-in-out infinite;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  background: rgba(13, 53, 78, .98);
  border-color: rgba(139, 199, 238, .52);
  box-shadow: 0 11px 26px rgba(4, 23, 36, .22), 0 0 20px rgba(87, 166, 218, .12);
  transform: translateY(-2px);
}

.back-to-top:hover .back-to-top__icon,
.back-to-top:focus-visible .back-to-top__icon {
  color: var(--dk-gold, #D89A2B);
  animation: none;
  transform: translateY(-2px);
}

.back-to-top.is-clicking .back-to-top__icon {
  animation: backToTopClick 420ms ease;
}

.back-to-top:focus-visible {
  outline: 2px solid rgba(216, 154, 43, .78);
  outline-offset: 4px;
}

@keyframes backToTopArrowCue {
  0%, 72%, 100% { transform: translateY(0); }
  82% { transform: translateY(-3px); }
  90% { transform: translateY(-1px); }
}

@keyframes backToTopClick {
  0% { transform: translateY(0); }
  45% { transform: translateY(-5px); }
  100% { transform: translateY(0); }
}

@media (max-width: 768px) {
  .floating-contact-dock {
    right: 16px;
    gap: 10px;
  }

  .floating-contact-dock__item {
    width: 54px;
    height: 54px;
    min-height: 54px;
    border-radius: 13px;
  }

  .back-to-top {
    right: 18px;
    bottom: 18px;
    min-height: 42px;
    padding: 0 15px;
    font-size: 13px;
    gap: 6px;
  }

  body.has-shared-mobile-contact-dock .floating-contact-dock {
    top: auto;
    right: 14px;
    bottom: 68px;
    max-width: 52px;
    align-items: center;
    flex-direction: column-reverse;
    gap: 6px;
    transform: none;
  }

  body.has-shared-mobile-contact-dock .floating-contact-dock__toggle {
    display: inline-flex;
    width: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 6px 4px;
    box-sizing: border-box;
    border: 1px solid rgba(139, 199, 238, .28);
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    color: #fff;
    background: rgba(9, 43, 65, .97);
    box-shadow: 0 8px 22px rgba(4, 23, 36, .22);
    font: 800 9px/1.05 "Manrope", "Noto Sans SC", sans-serif;
    cursor: pointer;
  }

  body.has-shared-mobile-contact-dock .floating-contact-dock__toggle svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.has-shared-mobile-contact-dock .floating-contact-dock__toggle:focus-visible {
    outline: 3px solid rgba(216, 154, 43, .38);
    outline-offset: 3px;
  }

  body.has-shared-mobile-contact-dock .floating-contact-dock > .floating-contact-dock__item {
    display: none;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 5px 3px;
    border-radius: 12px;
  }

  body.has-shared-mobile-contact-dock .floating-contact-dock.is-expanded > .floating-contact-dock__item {
    display: inline-flex;
  }

  body.has-shared-mobile-contact-dock .back-to-top {
    right: 14px;
    bottom: 14px;
    min-width: 48px;
    width: 48px;
    height: 42px;
    padding: 0;
    border-radius: 12px;
  }

  body.has-shared-mobile-contact-dock .back-to-top__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  body.has-shared-mobile-contact-dock .back-to-top__icon {
    width: 20px;
    height: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .floating-contact-dock__item,
  .floating-contact-dock__toggle,
  .back-to-top,
  .back-to-top__icon {
    animation: none !important;
    transition-duration: .01ms !important;
  }
}

/* A card with one unambiguous detail destination is clickable across its body. */
[data-detail-card-link]:not(a) {
  cursor: pointer;
}
