/* Floating widgets: messengers, phone rail, cookies */

/* —— Messengers FAB —— */
.fab-stack {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.fab:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
  color: inherit;
}

.fab img {
  width: 28px;
  height: 28px;
}

.fab--tg {
  background: #2aabee;
}

.fab--max {
  background: #7b61ff;
}

.fab--max img {
  width: 26px;
  height: 26px;
  filter: none;
}

/* —— Side phone (right, vertically centered) —— */
.phone-rail {
  position: fixed;
  right: 0;
  left: auto;
  top: 50%;
  z-index: 55;
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  transition:
    opacity 0.45s var(--ease),
    transform 0.45s var(--ease),
    visibility 0.45s;
  visibility: visible;
}

.phone-rail.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-50%) translateX(120%);
  pointer-events: none;
}

.phone-rail__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  transform: none;
  padding: 1.35rem 0.7rem;
  border-radius: 14px 0 0 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  white-space: nowrap;
}

.phone-rail__btn:hover {
  color: var(--accent-ink);
  background: var(--accent-hover);
}

.phone-rail__btn::after {
  content: "";
  position: absolute;
  top: -40%;
  left: -60%;
  width: 40%;
  height: 180%;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0.55) 45%,
    transparent 70%
  );
  transform: skewX(-18deg);
  animation: phone-shine 3.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes phone-shine {
  0%,
  55% {
    left: -60%;
    opacity: 0;
  }
  60% {
    opacity: 1;
  }
  85%,
  100% {
    left: 140%;
    opacity: 0;
  }
}

/* —— Cookie bar —— */
.cookie-bar {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 70;
  max-width: 640px;
  margin-inline: auto;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: rgba(28, 23, 20, 0.96);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  transform: translateY(0);
  opacity: 1;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.cookie-bar[hidden] {
  display: none;
}

.cookie-bar.is-out {
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
}

.cookie-bar p {
  margin: 0 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.cookie-bar a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* Policy pages */
.policy-page {
  padding: calc(var(--header-h) + 2.5rem) 0 4rem;
}

.policy-page h1 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
}

.policy-page .policy-meta {
  margin: 0 0 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.policy-page h2 {
  margin: 2rem 0 0.75rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--accent);
}

.policy-page p,
.policy-page li {
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.policy-page ul {
  padding-left: 1.2rem;
  margin: 0 0 1rem;
}

@media (max-width: 720px) {
  .phone-rail {
    top: 50%;
    bottom: auto;
    right: 0;
    transform: translateY(-50%) translateX(0);
  }

  .phone-rail.is-hidden {
    transform: translateY(-50%) translateX(120%);
  }

  .phone-rail__btn {
    font-size: 0.82rem;
    padding: 1rem 0.55rem;
  }

  .fab-stack {
    right: 0.85rem;
    bottom: 0.85rem;
  }

  .fab {
    width: 48px;
    height: 48px;
  }

  .cookie-bar {
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    margin-right: 4.5rem;
  }
}

/* SplashCursor overlay */
.splash-cursor {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  width: 100%;
  height: 100%;
}

.splash-cursor canvas {
  display: block;
  width: 100vw;
  height: 100vh;
}
