/* Socio Votely — Legacy, theme-friendly styling (restored) */
.socio-votely{
  --votely-btn-h: var(--sv-btn-h-desktop, 40px);
  --sv-gap: .4rem;
  font-size: var(--votely-font-size,14px);
}
@media (max-width:640px){
  .socio-votely{ --votely-btn-h: var(--sv-btn-h-mobile, 36px); }
}

/* Layout */
.socio-votely .votely-btn,
.socio-votely .votely-share .votely-share-trigger,
.socio-votely .votely-inline .share-item{
  display:inline-flex; align-items:center; gap:.35rem;
  height:var(--votely-btn-h);
  padding:0 .6rem;
  border:1px solid #e5e7eb;
  background:#fff;
  color:inherit;
  border-radius:.5rem;
  text-decoration:none;
  line-height:1;
  box-sizing:border-box;
}
.socio-votely .votely-btn:hover,
.socio-votely .votely-share .votely-share-trigger:hover,
.socio-votely .votely-inline .share-item:hover{
  background:#f6f8fb;
}
.socio-votely .votely-inline{ display:inline-flex; gap:var(--sv-gap); margin-left:var(--sv-gap); }
.socio-votely .votely-share{ display:inline-block; position:relative; margin-left:var(--sv-gap); }

/* Popover */
.socio-votely .votely-share-popover{
  position:absolute; z-index:9999; top:calc(100% + .4rem); left:0;
  background:#fff; border:1px solid #e5e7eb; border-radius:.6rem; padding:.5rem;
  min-width:220px; box-shadow:0 10px 30px rgba(0,0,0,.08);
}
.socio-votely .votely-share-popover a.share-item,
.socio-votely .votely-share-popover .share-item{
  display:flex; align-items:center; gap:.4rem;
  height:var(--votely-btn-h); padding:0 .55rem; border-radius:.45rem;
  text-decoration:none; color:inherit;
}
.socio-votely .votely-share-popover .share-item:hover{ background:#f6f8fb; }

/* Icon/Text modes */
.socio-votely .share-item .icon{ display:inline-flex; line-height:0 }
.socio-votely .share-item .icon svg{ width:16px; height:16px }
.socio-votely.mode-icons .share-item .label{ display:none }
.socio-votely.mode-text  .share-item .icon{ display:none }

/* Filled (accent) only when selected */
.socio-votely.share-style-filled .votely-share .votely-share-trigger{
  background: var(--votely-color);
  color: #fff;
  border-color: var(--votely-color);
}
.socio-votely.share-style-filled .votely-share .votely-share-trigger:hover{
  filter: brightness(0.95);
}

/* Brand — show logo only */
.socio-votely .votely-brand{ display:inline-flex; align-items:center; margin-left:.6rem; vertical-align:middle; }
.socio-votely .votely-brand img{ height:18px; width:auto; display:block; opacity:.85 }
.socio-votely .votely-brand:hover img{ opacity:1 }

/* v3.10.3: Vote button colors + branded logo button-wrap + tooltip */
.socio-votely .votely-btn.up{
  background: var(--votely-color);
  color:#fff;
  border-color: var(--votely-color);
}
.socio-votely .votely-btn.up:hover{ filter:brightness(0.95); }

.socio-votely .votely-btn.down{
  background:#ef4444; /* red-500 */
  color:#fff;
  border-color:#ef4444;
}
.socio-votely .votely-btn.down:hover{ filter:brightness(0.95); }

/* Brand logo styled like a button */
.socio-votely .votely-brand{
  display:inline-flex; align-items:center; justify-content:center;
  height:var(--votely-btn-h);
  padding:0 .6rem;
  margin-left:.4rem;
  border:1px solid #e5e7eb;
  border-radius:.5rem;
  background:#fff;
  text-decoration:none !important;
}
.socio-votely .votely-brand img{ height:18px; width:auto; display:block; opacity:.9 }
.socio-votely .votely-brand:hover{ background:#f6f8fb; }

/* Tooltip (created by JS, appended to body) */
.sv-tip{ position:absolute; z-index:99999; background:rgba(0,0,0,.85); color:#fff; font-size:12px; padding:4px 8px; border-radius:6px; pointer-events:none; transform:translateY(-8px); opacity:0; animation: svtipfade 1.2s ease-out forwards; }
@keyframes svtipfade{ 0%{opacity:0; transform:translateY(-10px);} 15%{opacity:1; transform:translateY(-8px);} 85%{opacity:1;} 100%{opacity:0; transform:translateY(-6px);} }

/* v3.10.4: White voting buttons with colored borders and icons */
.socio-votely .votely-btn{ background:#fff !important; }
.socio-votely .votely-btn.up{
  background:#fff !important;
  border-color: var(--votely-color) !important;
  color: var(--votely-color) !important;
}
.socio-votely .votely-btn.up:hover{ background: rgba(2,133,255,0.06) !important; }
.socio-votely .votely-btn.down{
  background:#fff !important;
  border-color: #ef4444 !important; /* red-500 */
  color: #ef4444 !important;
}
.socio-votely .votely-btn.down:hover{ background: rgba(239,68,68,0.06) !important; }

/* v3.10.5: Enforce plugin text sizing for Share/Copy */
.socio-votely{ font-size: var(--votely-font-size,14px) !important; }
.socio-votely .votely-btn,
.socio-votely .votely-share .votely-share-trigger,
.socio-votely .votely-inline .share-item,
.socio-votely .votely-share-popover .share-item,
.socio-votely .votely-share .votely-share-trigger .label,
.socio-votely .share-item .label{
  font-size: 1em !important;   /* inherit from container */
  line-height: 1 !important;
}
/* In case themes set huge font on generic buttons/links */
.socio-votely button,
.socio-votely a.share-item{
  font-size: 1em !important;
}

/* v3.10.6: Inline buttons border + placement */
.socio-votely .votely-inline{ display:inline-flex; gap:.4rem; margin-left:.4rem; vertical-align:middle; }
.socio-votely .votely-inline .share-item{
  border:1px solid #e5e7eb !important;
  background:#fff;
  align-items:center;
  vertical-align:middle;
}
/* Ensure inline appears before share trigger visually even if theme applies flex order */
.socio-votely .votely-inline{ order:1; }
.socio-votely .votely-share{ order:2; }

/* 3.10.6 bubble-style popover (CSS-only) */
.socio-votely .votely-share .votely-share-popover{
  background:#fff !important;
  border:1px solid #e5e7eb !important;
  border-radius:.75rem !important;
  padding:.55rem !important;
  min-width:220px !important;
  box-shadow:0 14px 40px rgba(0,0,0,.12) !important;
}
.socio-votely .votely-share .votely-share-popover::before{
  content:"";
  position:absolute;
  top:-7px; left:18px;
  width:12px; height:12px;
  background:#fff;
  transform:rotate(45deg);
  border-left:1px solid #e5e7eb; border-top:1px solid #e5e7eb;
}

/* v3.10.6 bubble: popover link conformity (minimal, scoped) */
.socio-votely .votely-share .votely-share-popover .share-item,
.socio-votely .votely-share .votely-share-popover a.share-item{
  display:flex !important;
  align-items:center !important;
  gap:.4rem !important;
  height:var(--votely-btn-h) !important;
  padding:0 .55rem !important;
  border-radius:.45rem !important;
  font-size:1em !important;        /* inherit plugin size */
  line-height:1 !important;
  color:inherit !important;         /* no theme link color */
  text-decoration:none !important;  /* no underline */
  border:0;
  background:transparent;
}
/* Label inside each item */
.socio-votely .votely-share .votely-share-popover .share-item .label{
  font-size:1em !important;
  line-height:1 !important;
  text-transform:none !important;   /* prevent theme uppercase */
  letter-spacing:normal !important; /* prevent theme tracking */
}
/* Icon size consistency */
.socio-votely .votely-share .votely-share-popover .share-item .icon svg{
  width:16px !important; height:16px !important;
}
/* Hover/Focus styles (match plugin) */
.socio-votely .votely-share .votely-share-popover .share-item:hover,
.socio-votely .votely-share .votely-share-popover .share-item:focus{
  background:#f6f8fb !important;
  outline:none;
}
.socio-votely .votely-share .votely-share-popover .share-item:focus-visible{
  box-shadow:0 0 0 2px rgba(2,133,255,.25) inset !important;
  border-radius:.45rem !important;
}

/* --- legacy block supplied by user (normalized) --- */
/* Socio Votely — Legacy, theme-friendly styling (restored) */
.socio-votely{
  --votely-btn-h: var(--sv-btn-h-desktop, 40px);
  --sv-gap: .4rem;
  font-size: var(--votely-font-size,14px);
}
@media (max-width:640px){
  .socio-votely{ --votely-btn-h: var(--sv-btn-h-mobile, 36px); }
}

/* Layout */
.socio-votely .votely-btn,
.socio-votely .votely-share .votely-share-trigger,
.socio-votely .votely-inline .share-item{
  display:inline-flex; align-items:center; gap:.35rem;
  height:var(--votely-btn-h);
  padding:0 .6rem;
  border:1px solid #e5e7eb;
  background:#fff;
  color:inherit;
  border-radius:.5rem;
  text-decoration:none;
  line-height:1;
  box-sizing:border-box;
}
.socio-votely .votely-btn:hover,
.socio-votely .votely-share .votely-share-trigger:hover,
.socio-votely .votely-inline .share-item:hover{
  background:#f6f8fb;
}
.socio-votely .votely-inline{ display:inline-flex; gap:var(--sv-gap); margin-left:var(--sv-gap); }
.socio-votely .votely-share{ display:inline-block; position:relative; margin-left:var(--sv-gap); }

/* Popover */
.socio-votely .votely-share-popover{
  position:absolute; z-index:9999; top:calc(100% + .4rem); left:0;
  background:#fff; border:1px solid #e5e7eb; border-radius:.6rem; padding:.5rem;
  min-width:220px; box-shadow:0 10px 30px rgba(0,0,0,.08);
}
.socio-votely .votely-share-popover a.share-item,
.socio-votely .votely-share-popover .share-item{
  display:flex; align-items:center; gap:.4rem;
  height:var(--votely-btn-h); padding:0 .55rem; border-radius:.45rem;
  text-decoration:none; color:inherit;
}
.socio-votely .votely-share-popover .share-item:hover{ background:#f6f8fb; }

/* Icon/Text modes */
.socio-votely .share-item .icon{ display:inline-flex; line-height:0 }
.socio-votely .share-item .icon svg{ width:16px; height:16px }
.socio-votely.mode-icons .share-item .label{ display:none }
.socio-votely.mode-text  .share-item .icon{ display:none }

/* Filled (accent) only when selected */
.socio-votely.share-style-filled .votely-share .votely-share-trigger{
  background: var(--votely-color);
  color: #fff;
  border-color: var(--votely-color);
}
.socio-votely.share-style-filled .votely-share .votely-share-trigger:hover{
  filter: brightness(0.95);
}

/* Brand — show logo only */
.socio-votely .votely-brand{ display:inline-flex; align-items:center; margin-left:.6rem; vertical-align:middle; }
.socio-votely .votely-brand img{ height:18px; width:auto; display:block; opacity:.85 }
.socio-votely .votely-brand:hover img{ opacity:1 }

/* v3.10.3: Vote button colors + branded logo button-wrap + tooltip */
.socio-votely .votely-btn.up{
  background: var(--votely-color);
  color:#fff;
  border-color: var(--votely-color);
}
.socio-votely .votely-btn.up:hover{ filter:brightness(0.95); }

.socio-votely .votely-btn.down{
  background:#ef4444; /* red-500 */
  color:#fff;
  border-color:#ef4444;
}
.socio-votely .votely-btn.down:hover{ filter:brightness(0.95); }

/* Brand logo styled like a button */
.socio-votely .votely-brand{
  display:inline-flex; align-items:center; justify-content:center;
  height:var(--votely-btn-h);
  padding:0 .6rem;
  margin-left:.4rem;
  border:1px solid #e5e7eb;
  border-radius:.5rem;
  background:#fff;
  text-decoration:none !important;
}
.socio-votely .votely-brand img{ height:18px; width:auto; display:block; opacity:.9 }
.socio-votely .votely-brand:hover{ background:#f6f8fb; }

/* Tooltip (created by JS, appended to body) */
.sv-tip{ position:absolute; z-index:99999; background:rgba(0,0,0,.85); color:#fff; font-size:12px; padding:4px 8px; border-radius:6px; pointer-events:none; transform:translateY(-8px); opacity:0; animation: svtipfade 1.2s ease-out forwards; }
@keyframes svtipfade{ 0%{opacity:0; transform:translateY(-10px);} 15%{opacity:1; transform:translateY(-8px);} 85%{opacity:1;} 100%{opacity:0; transform:translateY(-6px);} }

/* v3.10.4: White voting buttons with colored borders and icons */
.socio-votely .votely-btn{ background:#fff !important; }
.socio-votely .votely-btn.up{
  background:#fff !important;
  border-color: var(--votely-color) !important;
  color: var(--votely-color) !important;
}
.socio-votely .votely-btn.up:hover{ background: rgba(2,133,255,0.06) !important; }
.socio-votely .votely-btn.down{
  background:#fff !important;
  border-color: #ef4444 !important; /* red-500 */
  color: #ef4444 !important;
}
.socio-votely .votely-btn.down:hover{ background: rgba(239,68,68,0.06) !important; }

/* v3.10.5: Enforce plugin text sizing for Share/Copy */
.socio-votely{ font-size: var(--votely-font-size,14px) !important; }
.socio-votely .votely-btn,
.socio-votely .votely-share .votely-share-trigger,
.socio-votely .votely-inline .share-item,
.socio-votely .votely-share-popover .share-item,
.socio-votely .votely-share .votely-share-trigger .label,
.socio-votely .share-item .label{
  font-size: 1em !important;   /* inherit from container */
  line-height: 1 !important;
}
/* In case themes set huge font on generic buttons/links */
.socio-votely button,
.socio-votely a.share-item{
  font-size: 1em !important;
}

/* v3.10.6: Inline buttons border + placement */
.socio-votely .votely-inline{ display:inline-flex; gap:.4rem; margin-left:.4rem; vertical-align:middle; }
.socio-votely .votely-inline .share-item{
  border:1px solid #e5e7eb !important;
  background:#fff;
  align-items:center;
  vertical-align:middle;
}
/* Ensure inline appears before share trigger visually even if theme applies flex order */
.socio-votely .votely-inline{ order:1; }
.socio-votely .votely-share{ order:2; }

/* 3.10.6 bubble-style popover (CSS-only) */
.socio-votely .votely-share .votely-share-popover{
  background:#fff !important;
  border:1px solid #e5e7eb !important;
  border-radius:.75rem !important;
  padding:.55rem !important;
  min-width:220px !important;
  box-shadow:0 14px 40px rgba(0,0,0,.12) !important;
}
.socio-votely .votely-share .votely-share-popover::before{
  content:"";
  position:absolute;
  top:-7px; left:18px;
  width:12px; height:12px;
  background:#fff;
  transform:rotate(45deg);
  border-left:1px solid #e5e7eb; border-top:1px solid #e5e7eb;
}

/* v3.10.6 bubble: popover link conformity (minimal, scoped) */
.socio-votely .votely-share .votely-share-popover .share-item,
.socio-votely .votely-share .votely-share-popover a.share-item{
  display:flex !important;
  align-items:center !important;
  gap:.4rem !important;
  height:var(--votely-btn-h) !important;
  padding:0 .55rem !important;
  border-radius:.45rem !important;
  font-size:1em !important;        /* inherit plugin size */
  line-height:1 !important;
  color:inherit !important;         /* no theme link color */
  text-decoration:none !important;  /* no underline */
  border:0;
  background:transparent;
}
/* Label inside each item */
.socio-votely .votely-share .votely-share-popover .share-item .label{
  font-size:1em !important;
  line-height:1 !important;
  text-transform:none !important;   /* prevent theme uppercase */
  letter-spacing:normal !important; /* prevent theme tracking */
}
/* Icon size consistency */
.socio-votely .votely-share .votely-share-popover .share-item .icon svg{
  width:16px !important; height:16px !important;
}
/* Hover/Focus styles (match plugin) */
.socio-votely .votely-share .votely-share-popover .share-item:hover,
.socio-votely .votely-share .votely-share-popover .share-item:focus{
  background:#f6f8fb !important;
  outline:none;
}
.socio-votely .votely-share .votely-share-popover .share-item:focus-visible{
  box-shadow:0 0 0 2px rgba(2,133,255,.25) inset !important;
  border-radius:.45rem !important;
}

/* 3.10.6p: Stacking fix so the bubble sits above adjacent posts/cards */
.socio-votely{ position:relative; z-index:100; isolation:isolate; }
.socio-votely .votely-share{ position:relative; z-index:101; overflow:visible; }
.socio-votely .votely-share .votely-share-popover{
  z-index:2147483647 !important; /* max */
  overflow:visible !important;
}
/* Make sure theme card wrappers don't clip the bubble positioned over edges */
.socio-votely .votely-share *, .socio-votely * { overflow:visible; }

/* 3.10.6p-zfix2: Elevate the *post/card that owns the open popover* above neighbors */
article:has(.socio-votely .votely-share-popover:not([hidden])),
.post:has(.socio-votely .votely-share-popover:not([hidden])),
.entry:has(.socio-votely .votely-share-popover:not([hidden])),
.gb-grid-column:has(.socio-votely .votely-share-popover:not([hidden])),
.inside-article:has(.socio-votely .votely-share-popover:not([hidden])) {
  position: relative;
  z-index: 2147483646; /* just under popover itself */
  overflow: visible;   /* avoid clipping inside the card */
}

/* Keep popover above everything */
.socio-votely .votely-share-popover { z-index: 2147483647 !important; }
