:root {
  --floating-launcher-start: rgba(16, 185, 129, 0.98);
  --floating-launcher-end: rgba(14, 165, 233, 0.98);
  --floating-launcher-shadow: rgba(14, 165, 233, 0.34);
  --floating-action-hover: rgba(14, 165, 233, 0.38);
  --floating-action-glow: rgba(14, 165, 233, 0.3);
  --floating-scroll-right: 1.25rem;
  --floating-scroll-bottom: 1.25rem;
  --floating-scroll-size: 3.7rem;
  --floating-launcher-size: 3.25rem;
  --floating-dock-gap: 0.9rem;
}

body[data-floating-widget-theme="green"] {
  --floating-launcher-start: rgba(18, 117, 77, 0.98);
  --floating-launcher-end: rgba(26, 166, 122, 0.98);
  --floating-launcher-shadow: rgba(18, 117, 77, 0.34);
  --floating-action-hover: rgba(18, 117, 77, 0.38);
  --floating-action-glow: rgba(18, 117, 77, 0.28);
}

.water-button {
  position: fixed;
  --static-water-progress: 0;
  right: var(--floating-scroll-right);
  bottom: var(--floating-scroll-bottom);
  z-index: 86;
  width: var(--floating-scroll-size);
  height: var(--floating-scroll-size);
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.94) !important;
  background: #ffffff;
  box-shadow:
    0 10px 28px rgba(12, 56, 96, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
  isolation: isolate;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

.water-button:hover,
.water-button:focus-visible {
  transform: translateY(-2px);
  outline: none !important;
  border-color: rgba(255, 255, 255, 0.94) !important;
}

.water-button:focus,
.water-button:active {
  outline: none !important;
  border-color: rgba(255, 255, 255, 0.94) !important;
  box-shadow:
    0 10px 28px rgba(12, 56, 96, 0.22),
    inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.water-button::-moz-focus-inner {
  border: 0;
}

.water-button[data-visible="false"] {
  opacity: 0;
  pointer-events: none;
  transform: translateY(1.2rem);
}

.water-button::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 999px;
  padding: 2px;
  background:
    conic-gradient(
      from -90deg,
      #2ec9d5 0deg,
      #2ec9d5 calc(var(--static-water-progress) * 1turn),
      rgba(205, 223, 238, 0.85) calc(var(--static-water-progress) * 1turn),
      rgba(205, 223, 238, 0.85) 1turn
    );
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  z-index: 3;
}

.water-button::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: inherit;
  background: radial-gradient(circle at 38% 22%, rgba(255, 255, 255, 0.52), transparent 58%);
  pointer-events: none;
  z-index: 2;
}

.water-canvas-shell,
.water-gloss {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.water-canvas-shell {
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.78), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.02));
}

.water-canvas {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.water-gloss {
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.06) 40%),
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.82), transparent 25%);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.water-icon {
  position: relative;
  z-index: 4;
  display: inline-flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.35);
  color: #0a8a9e;
  transition: color 0.24s ease;
}

.water-icon svg {
  display: block;
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#scrollTopButton .water-icon {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}

.social-dock {
  position: fixed;
  right: calc(var(--floating-scroll-right) + (var(--floating-scroll-size) - var(--floating-launcher-size)) / 2);
  bottom: calc(var(--floating-scroll-bottom) + var(--floating-scroll-size) + var(--floating-dock-gap));
  z-index: 88;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  transition: opacity 0.24s ease, transform 0.24s ease;
  opacity: 0;
  animation: socialDockIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

.social-dock.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 10px);
}

.social-dock-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
  pointer-events: none;
}

.social-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.95rem;
  height: 2.95rem;
  padding: 0.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.95);
  box-shadow:
    0 20px 34px -14px rgba(15, 23, 42, 0.18),
    0 10px 18px -12px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  position: relative;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(0.75rem) scale(0.92);
  transition: transform 0.26s ease, opacity 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.social-action::before {
  content: "";
  position: absolute;
  inset: 24%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.42) 52%, transparent 78%);
  filter: blur(7px);
  z-index: 0;
  pointer-events: none;
}

.social-action::after {
  content: "";
  position: absolute;
  inset: auto 10% -18% 10%;
  height: 52%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(15, 23, 42, 0.22), rgba(15, 23, 42, 0.08) 48%, transparent 76%);
  filter: blur(12px);
  opacity: 0.95;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.social-action svg,
.social-action img {
  width: 1.82rem;
  height: 1.82rem;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1), filter 0.26s ease;
}

.social-dock[data-open="true"] .social-action {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.social-dock[data-open="true"] .social-action:nth-child(1) { transition-delay: 0.02s; }
.social-dock[data-open="true"] .social-action:nth-child(2) { transition-delay: 0.05s; }
.social-dock[data-open="true"] .social-action:nth-child(3) { transition-delay: 0.08s; }
.social-dock[data-open="true"] .social-action:nth-child(4) { transition-delay: 0.11s; }
.social-dock[data-open="true"] .social-action:nth-child(5) { transition-delay: 0.14s; }

.social-action:hover,
.social-action:focus-visible {
  transform: translateY(-3px) scale(1.05);
  border-color: var(--floating-action-hover);
  box-shadow:
    0 26px 42px -16px rgba(15, 23, 42, 0.2),
    0 14px 22px -14px rgba(15, 23, 42, 0.14),
    0 12px 24px -20px var(--floating-action-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.58);
}

.social-action:hover::after,
.social-action:focus-visible::after {
  opacity: 1;
  transform: scale(1.08);
}

.social-action:hover svg,
.social-action:focus-visible svg,
.social-action:hover img,
.social-action:focus-visible img {
  transform: translateY(-1px) scale(1.08);
  filter: saturate(1.08);
}

.social-launcher-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--floating-launcher-size);
  height: var(--floating-launcher-size);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--floating-launcher-start), var(--floating-launcher-end));
  color: #fff;
  box-shadow: 0 20px 34px -18px var(--floating-launcher-shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
  cursor: pointer;
}

.social-launcher-button:hover,
.social-launcher-button:focus-visible {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 22px 38px -16px var(--floating-launcher-shadow);
}

.social-launcher-button .social-launcher-icon {
  width: 1.3rem;
  height: 1.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.24s ease;
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1;
}

#socialLauncherButton .social-launcher-icon {
  width: 22px !important;
  height: 22px !important;
  display: inline-flex !important;
}

.social-dock[data-open="true"] .social-launcher-button .social-launcher-icon {
  transform: rotate(45deg);
}

#scrollTopButton .water-icon svg {
  width: 1.2rem !important;
  height: 0.8rem !important;
  display: block !important;
  stroke: currentColor !important;
  fill: none !important;
  stroke-width: 2.7 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

@keyframes socialDockIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 767px) {
  :root {
    --floating-scroll-right: 1rem;
    --floating-scroll-bottom: 1rem;
    --floating-scroll-size: 3.35rem;
    --floating-launcher-size: 2.95rem;
    --floating-dock-gap: 0.85rem;
  }

  .social-action {
    width: 2.7rem;
    height: 2.7rem;
  }

  .social-action::before {
    inset: 25%;
    filter: blur(6px);
  }

  .social-action svg,
  .social-action img {
    width: 1.48rem;
    height: 1.48rem;
  }

  .social-launcher-button {
    width: var(--floating-launcher-size);
    height: var(--floating-launcher-size);
  }

  .social-launcher-button .social-launcher-icon {
    width: 1.15rem;
    height: 1.15rem;
  }

  #scrollTopButton .water-icon svg {
    width: 1.1rem !important;
    height: 0.75rem !important;
    stroke-width: 2.8 !important;
  }
}
