/* Workin'Flows blog share — sticky sidebar (desktop) + foot fallback (≤1280px). */

#wf-share, #wf-share-foot { position: relative; }

/* ---------- Sidebar (desktop >1280px) ---------- */
.wf-share-nav {
  position: fixed;
  left: clamp(16px, 2vw, 32px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 8px;
  background: var(--wf-bone);
  border: 1px solid var(--wf-hairline);
  border-radius: 0;
  width: 56px;
  box-shadow: 4px 4px 0 var(--wf-carbon);
}

.wf-share-progress {
  position: absolute;
  left: -1px;
  top: 0;
  width: 3px;
  height: 0%;
  background: var(--wf-lime);
  pointer-events: none;
  transition: height 60ms linear;
}

.wf-share-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  color: var(--wf-carbon);
  transition: color 150ms cubic-bezier(0.25, 0.1, 0.25, 1), background 150ms cubic-bezier(0.25, 0.1, 0.25, 1);
  border-radius: 0;
}
.wf-share-btn svg {
  width: 20px;
  height: 20px;
  display: block;
}
.wf-share-btn:hover, .wf-share-btn:focus-visible {
  color: var(--wf-oxblood);
  background: var(--wf-bone2);
  outline: none;
}
.wf-share-btn:focus-visible {
  outline: 2px solid var(--wf-oxblood);
  outline-offset: -2px;
}

/* Hide sidebar host on smaller screens */
@media (max-width: 1280px) {
  .wf-share-nav { display: none; }
}

/* ---------- Foot fallback (mobile/tablet ≤1280px) ---------- */
#wf-share-foot {
  display: none;
  margin: 48px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--wf-hairline);
}
@media (max-width: 1280px) {
  #wf-share-foot { display: block; }
}

.wf-share-foot-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wf-share-foot-label {
  font-family: var(--font-headline);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--wf-carbon-soft);
  margin-right: 8px;
}
#wf-share-foot .wf-share-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--wf-hairline);
}
#wf-share-foot .wf-share-btn svg {
  width: 22px;
  height: 22px;
}
#wf-share-foot .wf-share-btn:hover,
#wf-share-foot .wf-share-btn:focus-visible {
  border-color: var(--wf-oxblood);
}

@media (max-width: 520px) {
  #wf-share-foot .wf-share-btn { width: 40px; height: 40px; }
  .wf-share-foot-label { width: 100%; margin-right: 0; margin-bottom: 4px; }
}

/* ---------- Toast ---------- */
.wf-share-toast {
  position: fixed;
  bottom: clamp(16px, 4vw, 32px);
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--wf-carbon);
  color: var(--wf-bone);
  padding: 10px 18px;
  font-family: var(--font-headline);
  font-size: 13px;
  letter-spacing: 0.04em;
  border-radius: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms cubic-bezier(0.25, 0.1, 0.25, 1), transform 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
  z-index: 100;
  box-shadow: 4px 4px 0 var(--wf-oxblood);
}
.wf-share-toast[data-visible="1"] {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- Modal IG ---------- */
.wf-share-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 10, 9, 0.72);
  display: grid;
  place-items: center;
  z-index: 200;
  padding: 16px;
  animation: wf-share-fade 180ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
@keyframes wf-share-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.wf-share-modal-card {
  position: relative;
  background: var(--wf-bone);
  border: 1px solid var(--wf-hairline);
  padding: 32px 28px 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 8px 8px 0 var(--wf-oxblood);
}
.wf-share-modal-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-headline);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--wf-carbon);
}
.wf-share-modal-card p {
  margin: 0 0 12px;
  font-family: var(--font-headline);
  font-size: 15px;
  color: var(--wf-carbon-soft);
  line-height: 1.55;
}
.wf-share-modal-card ol {
  margin: 0 0 18px;
  padding-left: 20px;
  font-family: var(--font-headline);
  font-size: 15px;
  color: var(--wf-carbon);
  line-height: 1.6;
}
.wf-share-modal-card ol li { margin-bottom: 6px; }
.wf-share-modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 0;
  font-family: var(--font-headline);
  font-size: 24px;
  line-height: 1;
  color: var(--wf-carbon-soft);
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 0;
}
.wf-share-modal-close:hover, .wf-share-modal-close:focus-visible {
  color: var(--wf-oxblood);
  outline: none;
}
.wf-share-modal-copy {
  appearance: none;
  background: var(--wf-carbon);
  color: var(--wf-bone);
  border: 0;
  padding: 12px 22px;
  font-family: var(--font-headline);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border-radius: 0;
  transition: background 150ms cubic-bezier(0.25, 0.1, 0.25, 1);
}
.wf-share-modal-copy:hover, .wf-share-modal-copy:focus-visible {
  background: var(--wf-oxblood);
  outline: none;
}
.wf-share-modal-hint {
  margin-top: 10px !important;
  font-size: 13px !important;
  font-weight: 500;
}
.wf-share-modal-hint[data-state="ok"]  { color: #4A7C3A !important; }
.wf-share-modal-hint[data-state="err"] { color: var(--wf-oxblood) !important; }

@media (prefers-reduced-motion: reduce) {
  .wf-share-toast, .wf-share-modal, .wf-share-btn { transition: none !important; animation: none !important; }
}
