/* ── Social Share Bar ── */
:root {
  --ssb-accent: #e63946;
  --ssb-bg: #ffffff;
  --ssb-shadow: 0 4px 24px rgba(0,0,0,.13);
  --ssb-radius: 16px;
  --ssb-gap: 6px;
  --ssb-size: 44px;
  --ssb-icon: 20px;
}

/* ── Floating (left / right) ── */
#ssb-bar {
  position: fixed;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--ssb-gap);
  padding: 14px 10px;
  background: var(--ssb-bg);
  border-radius: var(--ssb-radius);
  box-shadow: var(--ssb-shadow);
  top: 50%;
  transform: translateY(-50%);
  animation: ssb-fadein .5s cubic-bezier(.22,1,.36,1) both;
}

#ssb-bar.ssb-pos-left  { left: 18px; }
#ssb-bar.ssb-pos-right { right: 18px; }

/* ── Bottom bar ── */
#ssb-bar.ssb-pos-bottom {
  bottom: 0;
  left: 0;
  right: 0;
  top: auto;
  transform: none;
  flex-direction: row;
  justify-content: center;
  border-radius: var(--ssb-radius) var(--ssb-radius) 0 0;
  padding: 12px 20px;
  animation: ssb-slidein .5s cubic-bezier(.22,1,.36,1) both;
}

/* ── Heading ── */
.ssb-heading {
  font-family: system-ui, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: #aaa;
  margin-bottom: 2px;
}
.ssb-pos-bottom .ssb-heading { display: none; }

/* ── Buttons ── */
.ssb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: var(--ssb-size);
  height: var(--ssb-size);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  transition:
    transform .18s cubic-bezier(.34,1.56,.64,1),
    box-shadow .2s;
  outline: none;
  padding: 0;
}

/* Wider when labels shown */
.ssb-btn:has(.ssb-label) {
  width: auto;
  border-radius: 99px;
  padding: 0 14px 0 10px;
}

/* SVG icons — brand colour applied via fill/stroke directly in SVG markup */
.ssb-btn svg {
  width: var(--ssb-icon);
  height: var(--ssb-icon);
  flex-shrink: 0;
  display: block;
}

.ssb-label {
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* Hover: scale up only */
.ssb-btn:hover {
  transform: scale(1.22);
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  background: transparent;
}

/* Active state */
.ssb-btn:active { transform: scale(.96); }

/* Copy-success flash */
.ssb-copylink.ssb--copied { background: #22c55e !important; color: #fff; transform: scale(1.14); }

/* ── Animations ── */
@keyframes ssb-fadein {
  from { opacity: 0; transform: translateY(-50%) translateX(-12px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0);    }
}
.ssb-pos-right { animation-name: ssb-fadein-right; }
@keyframes ssb-fadein-right {
  from { opacity: 0; transform: translateY(-50%) translateX(12px); }
  to   { opacity: 1; transform: translateY(-50%) translateX(0);   }
}
@keyframes ssb-slidein {
  from { opacity: 0; transform: translateY(100%); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* ── Dark mode ── */
@media (prefers-color-scheme: dark) {
  #ssb-bar {
    --ssb-bg: #1e1e1e;
    --ssb-shadow: 0 4px 24px rgba(0,0,0,.4);
  }
  .ssb-heading { color: #555; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  /* Hide floating bar on mobile, show bottom bar instead */
  #ssb-bar.ssb-pos-left,
  #ssb-bar.ssb-pos-right {
    display: none;
  }

  /* Always render a slim bottom strip on mobile */
  #ssb-bar {
    bottom: 0; left: 0; right: 0;
    top: auto; transform: none;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    border-radius: 16px 16px 0 0;
    padding: 10px 12px;
    gap: 8px;
  }
  .ssb-heading { display: none; }
  .ssb-btn { width: 40px; height: 40px; }
}

/* ── Mobile: hide fixed bar, show inline block ── */
@media (max-width: 600px) {
  #ssb-bar { display: none !important; }
  #ssb-mobile { display: flex !important; }
}

/* ── Inline mobile share block (hidden on desktop) ── */
#ssb-mobile {
  display: none;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
  padding: 14px 16px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
}

#ssb-mobile .ssb-mobile-label {
  font-family: system-ui, sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #999;
  width: 100%;
  margin-bottom: 2px;
}

#ssb-mobile .ssb-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

@media (prefers-color-scheme: dark) {
  #ssb-mobile { background: #1e1e1e; box-shadow: 0 2px 12px rgba(0,0,0,.35); }
  #ssb-mobile .ssb-mobile-label { color: #555; }
}
