/* One-tap Share control (share_tags / _share_button.html) and its copy dialog.
   Colours come from the page's own tokens (bidder-theme.css, or the live
   floor's :root); the fallbacks keep the control legible on a bare shell.
   Every variant is a 44 px target with an icon AND a visible label; the label
   is fixed text, so a long sale or lot title can never displace the primary
   action beside it. */
.share-btn { display:inline-flex; align-items:center; justify-content:center; gap:.4rem;
  box-sizing:border-box; min-height:44px; min-width:44px; padding:.5rem .95rem; margin:0;
  border:1.5px solid var(--gold, #c9a44c); border-radius:8px; background:transparent;
  color:var(--gold, #c9a44c); font:inherit; font-size:.9rem; font-weight:750; line-height:1.2;
  letter-spacing:.01em; white-space:nowrap; cursor:pointer; flex:0 0 auto;
  touch-action:manipulation; -webkit-tap-highlight-color:transparent;
  transition:background-color .15s ease, color .15s ease, border-color .15s ease; }
.share-btn:hover { background:color-mix(in srgb, var(--gold, #c9a44c) 12%, transparent); text-decoration:none; }
.share-btn:active { transform:translateY(1px); }
.share-btn:focus-visible { outline:3px solid var(--ink, #17231f); outline-offset:3px; }
.share-btn-icon { width:1.15em; height:1.15em; flex:0 0 auto; }
.share-btn-label { display:inline; }
.share-btn--page { font-size:.95rem; padding:.6rem 1.1rem; }
.share-btn--tile { font-size:.9rem; }
.share-btn--compact { font-size:.8rem; padding:.45rem .75rem; gap:.3rem; }

/* Rows: the share sits beside the primary action; on a narrow screen it drops
   under it at full width instead of squeezing the action. */
.share-row { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; min-width:0; }
.share-row--page { margin:.55rem 0 .2rem; }
.share-row--card { margin:.55rem 0 .8rem; align-items:stretch; }
.share-row--card .listing-gateway { flex:1 1 11rem; min-width:0; margin:0; }
.share-row--card .share-btn { align-self:center; }
.share-row--venue { margin-top:.45rem; }
.home-auction-actions { margin-top:auto; display:flex; align-items:stretch; flex-wrap:wrap; gap:.5rem; }
/* Neither action shrinks below its own words (no two-line "View lots & bid"):
   both grow, the entrance twice as fast; beside each other on a wide card,
   and a share that wraps fills its own row instead of hanging short. */
.home-auction-actions .home-auction-enter { flex:2 0 auto; margin-top:0; }
.home-auction-actions .share-btn { flex:1 0 auto; max-width:100%; }
.search-result { display:flex; align-items:center; gap:.5rem; margin:0 0 .6rem; }
.search-result > a.row { flex:1 1 auto; min-width:0; margin:0; }
@media (max-width:640px) {
  /* The search page's own phone breakpoint: the row keeps its full width and
     the share drops under it instead of squeezing the result into a column. */
  .search-result { flex-wrap:wrap; }
  .search-result .share-btn { flex:1 1 100%; }
}
@media (max-width:480px) {
  .home-auction-actions .share-btn { flex:1 1 100%; }
  .share-row--page .share-btn { flex:1 1 100%; }
}

/* Copy dialog: the standing <dialog> pattern (see lot_detail's photo
   inspector); the element itself traps focus, closes on Escape and returns
   focus to the control that opened it. */
.share-dialog { box-sizing:border-box; width:min(92vw, 26rem); max-width:26rem; margin:auto;
  padding:1.1rem 1.2rem 1rem; border:1px solid var(--line, #2a323c); border-radius:14px;
  background:var(--card, #1a2027); color:var(--ink, #f2efe8);
  box-shadow:0 18px 48px rgba(0,0,0,.35);
  font-family:-apple-system,"Segoe UI",Helvetica,Arial,sans-serif; }
.share-dialog::backdrop { background:rgba(4,8,12,.6); }
.share-dialog:not([open]) { display:none; }
.share-dialog.is-fallback-open { position:fixed; top:50%; left:50%; transform:translate(-50%,-50%); z-index:2147483000; }
.share-dialog-form { margin:0; display:flex; flex-direction:column; gap:.55rem; }
.share-dialog-title { margin:0; font-size:1.05rem; font-weight:800; line-height:1.3; }
.share-dialog-what { margin:0; color:var(--muted, #b8b2a4); font-size:.9rem; line-height:1.4; overflow-wrap:anywhere; }
.share-dialog-label { font-size:.74rem; font-weight:700; color:var(--muted, #b8b2a4); letter-spacing:.06em; text-transform:uppercase; }
.share-dialog-link { box-sizing:border-box; width:100%; min-height:44px; padding:.55rem .7rem;
  border:1px solid var(--fieldline, #3a4149); border-radius:8px; background:var(--field, #1a2027);
  color:var(--ink, #f2efe8); font:inherit; font-size:.92rem; }
.share-dialog-link:focus-visible { outline:3px solid var(--gold, #c9a44c); outline-offset:2px; }
.share-dialog-actions { display:flex; gap:.5rem; flex-wrap:wrap; }
.share-dialog-copy, .share-dialog-close { box-sizing:border-box; min-height:44px; padding:.55rem 1rem;
  border-radius:8px; font:inherit; font-weight:750; cursor:pointer; flex:1 1 8rem; }
.share-dialog-copy { border:1.5px solid var(--gold, #c9a44c); background:var(--gold, #c9a44c); color:var(--on-gold, #1a1408); }
.share-dialog-close { border:1.5px solid var(--fieldline, #3a4149); background:transparent; color:var(--ink, #f2efe8); }
.share-dialog-copy:focus-visible, .share-dialog-close:focus-visible { outline:3px solid var(--ink, #f2efe8); outline-offset:3px; }
.share-dialog-status { margin:0; min-height:1.3em; font-size:.88rem; font-weight:700; color:var(--live, #8fd0a8); }

@media print { .share-btn, .share-dialog { display:none !important; } }
