/* ============================================
   SOCIAL SIDEBAR
   Pull-tab on mobile/tablet, always-visible on 1300px+
   ============================================ */

/* ── Container ───────────────────────────────────────────────────────────────*/
.social-sidebar {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 490;
  display: flex;
  flex-direction: row;
  align-items: center;
  transition: opacity 0.35s ease;
}

.social-sidebar.scroll-hidden {
  opacity: 0;
  pointer-events: none;
}

/* ── Clip wrapper — zero width when closed, expands on open ─────────────────*/
/* This keeps the handle pinned to the left wall at all times               */
.social-panel-clip {
  width: 0;
  overflow: hidden;
  display: flex;
  transition: width 0.38s cubic-bezier(0.4, 0, 0.2, 1);
}

.social-sidebar.open .social-panel-clip {
  width: 64px;
}

/* ── Panel ───────────────────────────────────────────────────────────────────*/
.social-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px 10px;
  width: 64px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 0 14px 14px 0;
  box-shadow: 3px 0 18px rgba(0, 0, 0, 0.13);
}

/* ── Pull-tab handle ─────────────────────────────────────────────────────────*/
.social-handle {
  width: 26px;
  height: 54px;
  background: linear-gradient(160deg, #1a0a3d 0%, #0d2459 100%);
  border: none;
  border-radius: 0 12px 12px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  box-shadow: 2px 2px 10px rgba(10, 5, 40, 0.5);
  transition: box-shadow 0.2s ease;
  padding: 0;
}

.social-handle:hover {
  box-shadow: 3px 3px 16px rgba(10, 5, 40, 0.65);
}

.social-handle-arrow {
  display: block;
  transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.social-sidebar.open .social-handle-arrow {
  transform: rotate(180deg);
}

/* ── Individual buttons ──────────────────────────────────────────────────────*/
.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  padding: 0;
  font-family: inherit;
}

.social-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-btn:hover,
.social-btn:focus {
  color: #fff;
  text-decoration: none;
  transform: scale(1.13);
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.25);
  outline: none;
}

/* Platform colours */
.social-btn-tiktok  { background: #010101; }
.social-btn-youtube { background: #FF0000; }
.social-btn-kofi    { background: #29ABE0; }
.social-btn-share   { background: linear-gradient(135deg, #7C6CF6 0%, #5B8DD9 100%); }

/* ── Desktop (1300px+) — always visible, no pull-tab ────────────────────────*/
@media (min-width: 1300px) {
  .social-sidebar {
    left: 18px;
  }

  /* Never hide on scroll on desktop */
  .social-sidebar.scroll-hidden {
    opacity: 1;
    pointer-events: all;
  }

  /* Clip wrapper always fully open */
  .social-panel-clip {
    width: auto !important;
    overflow: visible;
  }

  /* Panel unstyled — just a transparent column of buttons */
  .social-panel {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    gap: 12px;
    width: auto;
  }

  /* Hide the pull-tab on desktop */
  .social-handle {
    display: none;
  }

  /* Slightly larger buttons on desktop */
  .social-btn {
    width: 46px;
    height: 46px;
    position: relative;
  }

  .social-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Tooltip label on hover */
  .social-btn::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    background: rgba(15, 15, 35, 0.82);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 5px 11px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    font-family: var(--font-family, 'Nunito', sans-serif);
  }

  .social-btn:hover::after,
  .social-btn:focus::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }

  /* Entrance animation on page load */
  .social-btn {
    animation: socialBtnIn 0.45s ease both;
  }

  .social-btn:nth-child(1) { animation-delay: 0.05s; }
  .social-btn:nth-child(2) { animation-delay: 0.12s; }
  .social-btn:nth-child(3) { animation-delay: 0.19s; }
  .social-btn:nth-child(4) { animation-delay: 0.26s; }
}

@keyframes socialBtnIn {
  from {
    opacity: 0;
    transform: translateX(-14px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}
