/* Stream RV — "Share this RV" trigger buttons + popover (share.js). Uses the
   listing palette; the popover is appended to <body>, so it carries its own
   copy of the tokens. */

/* ---- listing page trigger: quiet text button under the CTA pair ---- */
.srv-listing .share-btn{flex:1 1 100%;display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:8px 14px;background:none;border:0;border-radius:4px;cursor:pointer;
  font-family:'Libre Franklin',system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif;
  font-size:14.5px;font-weight:600;color:var(--primary-container);}
.srv-listing .share-btn svg{width:17px;height:17px;flex:none;color:var(--secondary);}
.srv-listing .share-btn span{text-decoration:underline;text-decoration-color:var(--outline);text-underline-offset:4px;}
.srv-listing .share-btn:hover span,.srv-listing .share-btn[aria-expanded="true"] span{text-decoration-color:var(--secondary);}

/* ---- /rvs card trigger: twin of the save star, just left of it ---- */
.srv-inventory button.rvcard__share{position:absolute;top:12px;right:60px;z-index:2;width:40px;height:40px;border-radius:50%;padding:0;
  display:flex;align-items:center;justify-content:center;cursor:pointer;
  background:rgba(251,249,248,.92);border:1px solid var(--line);color:var(--primary-container);}
.srv-inventory .rvcard__share svg{width:17px;height:17px;flex:0 0 auto;}
.srv-inventory button.rvcard__share:hover,.srv-inventory button.rvcard__share[aria-expanded="true"]{background:#fff;color:var(--secondary);border-color:var(--brass-mid);}
.srv-inventory .rvcard__share:focus-visible{outline:2px solid var(--brass-mid);outline-offset:2px;}

/* ---- popover ---- */
.srv-share{--ink:#222e2e;--brass:#81550c;--brass-mid:#96682a;--bg:#fbf9f8;--surface:#f5f3f3;--muted:#424848;
  --line:rgba(34,46,46,.13);
  position:absolute;z-index:100000;width:340px;max-width:calc(100vw - 24px);box-sizing:border-box;
  background:var(--bg);color:var(--ink);border:1px solid var(--line);border-radius:12px;padding:18px;
  box-shadow:0 24px 50px -20px rgba(13,25,25,.45),0 2px 6px rgba(13,25,25,.08);
  font-family:'Libre Franklin',system-ui,-apple-system,'Helvetica Neue',Arial,sans-serif;line-height:1.4;}
.srv-share *{box-sizing:border-box;}
.srv-share p{margin:0;}
.srv-share__head{position:relative;padding-right:36px;margin-bottom:14px;}
.srv-share__k{font-size:11px;font-weight:700;letter-spacing:.18em;text-transform:uppercase;color:var(--brass);}
.srv-share__t{margin-top:4px;font-family:'Vollkorn','Iowan Old Style','Palatino Linotype',Palatino,Georgia,serif;
  font-weight:600;font-size:18px;letter-spacing:-.01em;line-height:1.2;}
.srv-share__x{position:absolute;top:-6px;right:-6px;width:36px;height:36px;border:0;border-radius:50%;background:none;
  color:var(--muted);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.srv-share__x:hover{background:var(--surface);color:var(--ink);}
.srv-share__x svg{width:18px;height:18px;}

.srv-share__link{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 12px;background:var(--surface);
  border:1px solid var(--line);border-radius:8px;}
.srv-share__url{flex:1;min-width:0;font-size:13px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.srv-share__copy{flex:none;display:inline-flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border:0;border-radius:6px;
  background:var(--ink);color:#fff;font:inherit;font-size:14px;font-weight:600;cursor:pointer;white-space:nowrap;}
.srv-share__copy:hover{background:#0d1919;}
.srv-share__copy.is-done{background:var(--brass);}
.srv-share__copy svg{width:16px;height:16px;}

.srv-share__row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:10px;}
.srv-share__opt{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 4px 10px;border:1px solid var(--line);
  border-radius:8px;text-decoration:none;color:var(--ink);font-size:13px;font-weight:600;}
.srv-share__opt svg{width:20px;height:20px;color:var(--brass);}
.srv-share__opt:hover{border-color:var(--brass-mid);background:#fff;}
.srv-share :focus-visible{outline:2px solid var(--brass-mid);outline-offset:2px;}
.srv-share-live{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}

@media (prefers-reduced-motion: no-preference){
  .srv-share{animation:srvShareIn .16s ease-out;}
  @keyframes srvShareIn{from{opacity:0;transform:translateY(-4px);}to{opacity:1;transform:none;}}
}
/* narrow screens without a native share sheet: bottom sheet */
@media (max-width:560px){
  .srv-share{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-width:none;border-radius:16px 16px 0 0;
    padding:20px 20px calc(20px + env(safe-area-inset-bottom));}
}

/* Hello Elementor's base button rules (pink #c36 border/bg on hover + focus)
   out-rank single-class selectors; restate each state here. */
.srv-listing button.share-btn,.srv-listing button.share-btn:hover,.srv-listing button.share-btn:focus{
  background:none;border:0;color:var(--primary-container);}
.srv-inventory button.rvcard__share:focus:not(:hover):not([aria-expanded="true"]){
  background:rgba(251,249,248,.92);border-color:var(--line);color:var(--primary-container);}
.srv-share button.srv-share__x,.srv-share button.srv-share__x:focus{display:flex;background:none;border:0;color:var(--muted);}
.srv-share button.srv-share__x:hover{background:var(--surface);border:0;color:var(--ink);}
.srv-share button.srv-share__copy,.srv-share button.srv-share__copy:focus{display:inline-flex;align-items:center;gap:7px;background:var(--ink);border:0;color:#fff;}
.srv-share button.srv-share__copy:hover{background:#0d1919;border:0;color:#fff;}
.srv-share button.srv-share__copy.is-done{background:var(--brass);}
