/* The Way Bible Study: sharing (share.js). Light and dark themes come from the colour variables in styles.css. */
.sh-ic { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Header "Invite" button */
.iconbtn.invite-btn { gap: .35rem; padding: 0 .75rem 0 .6rem; font-family: var(--sans); font-size: .8rem; font-weight: 650; color: var(--accent); }
.iconbtn.invite-btn svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* Page share button (beside the small heading above a title) */
.eb-row { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.eb-row .eyebrow { min-width: 0; }
.sh-btn { flex: none; display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .75rem .32rem .6rem; border-radius: 999px;
  border: 1px solid var(--rule); background: var(--paper); color: var(--accent); font-family: var(--sans); font-size: .78rem; font-weight: 650;
  cursor: pointer; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.sh-btn:hover { border-color: var(--gold); transform: translateY(-1px); box-shadow: var(--shadow); }
.sh-btn:focus-visible, .sh-selbtn:focus-visible, .sh-vmenu button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Sheet: Copy link / Email / Text */
.sh-wrap { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.sh-back { position: absolute; inset: 0; background: rgba(20, 12, 6, .45); }
.sh-card { position: relative; width: min(28rem, 100%); max-height: calc(100vh - 2rem); overflow: auto; background: var(--paper); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 18px; box-shadow: var(--shadow-lift); padding: 1.3rem 1.3rem 1rem; animation: sh-in .22s var(--ease); }
@keyframes sh-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.sh-card h2 { margin: 0 2rem .4rem 0; font-size: 1.45rem; }
.sh-x { position: absolute; top: .6rem; right: .6rem; width: 2.3rem; height: 2.3rem; border-radius: 999px; border: 1px solid var(--rule); background: var(--paper);
  color: var(--ink-soft); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.sh-intro { margin: 0 0 .9rem; color: var(--ink-soft); }
.sh-label { display: block; font-family: var(--sans); font-size: .8rem; font-weight: 650; color: var(--ink-soft); margin-bottom: .3rem; }
.sh-opt { font-weight: 400; color: var(--muted); }
.sh-input { width: 100%; font: inherit; font-family: var(--sans); font-size: 1rem; padding: .6rem .75rem; border-radius: 10px; border: 1px solid var(--rule);
  background: var(--bg); color: var(--ink); }
.sh-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.sh-hint { margin: .35rem 0 .2rem; font-family: var(--sans); font-size: .78rem; color: var(--muted); }
.sh-preview { margin: .7rem 0 1rem; padding: .65rem .8rem; border-left: 3px solid var(--gold); background: var(--bg); border-radius: 0 10px 10px 0;
  font-size: .88rem; color: var(--ink-soft); white-space: pre-line; overflow-wrap: anywhere; max-height: 9.5rem; overflow: auto; }
.sh-actions { display: grid; gap: .5rem; }
.sh-actions .btn { display: flex; align-items: center; justify-content: center; gap: .5rem; margin: 0; width: 100%; text-decoration: none; }
.sh-foot { margin: .9rem 0 0; font-family: var(--sans); font-size: .74rem; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
  .sh-wrap { align-items: flex-end; padding: 0; }
  .sh-card { width: 100%; border-radius: 18px 18px 0 0; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}

/* Bar shown while Scripture text is selected */
.sh-selbar { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: .45rem; max-width: calc(100vw - 1.5rem); padding: .4rem .4rem .4rem .9rem; border-radius: 999px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lift); font-family: var(--sans); font-size: .82rem; }
.sh-selbar[hidden] { display: none; }
.sh-selref { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; margin-right: .2rem; }
.sh-selbtn { display: inline-flex; align-items: center; gap: .35rem; flex: none; border: 0; border-radius: 999px; padding: .45rem .85rem; cursor: pointer;
  font: inherit; font-weight: 650; background: color-mix(in srgb, var(--bg) 16%, transparent); color: var(--bg); }
.sh-selbtn.primary { background: var(--gold); color: #1a1613; }

/* Menu from tapping a verse number */
.scripture[data-book] .vn[data-v] { cursor: pointer; }
.sh-vmenu { position: fixed; z-index: 80; min-width: 11rem; padding: .35rem; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule);
  box-shadow: var(--shadow-lift); font-family: var(--sans); font-size: .88rem; }
.sh-vref { margin: .2rem .55rem .35rem; font-size: .72rem; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.sh-vmenu button { display: flex; align-items: center; gap: .5rem; width: 100%; text-align: left; border: 0; background: none; color: var(--ink); padding: .55rem .6rem;
  border-radius: 8px; font: inherit; cursor: pointer; }
.sh-vmenu button:hover { background: var(--gold-soft); }

/* Invite landing (#/invite/…) and About */
.invite-hero h1 { margin-top: .2rem; }
.invite-card { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.invite-card p { margin: 0; flex: 1 1 14rem; }
@media print { .sh-btn, .sh-selbar, .sh-vmenu, .sh-wrap, .invite-btn { display: none !important; } }
@media (max-width: 720px) {
  .iconbtn.invite-btn { padding: 0; }
  .iconbtn.invite-btn .invite-t { display: none; }
}
/* Phones: seven round header buttons; tighten them a little so the name beside the logo stays clear. */
@media (max-width: 640px) {
  .topbar .tools { gap: .12rem; }
  .topbar .tools .iconbtn { min-width: 2.05rem; width: 2.05rem; height: 2.05rem; }
  .topbar .brand-name { font-size: 1.02rem; }
}
@media (max-width: 429px) { .topbar .brand-text { display: none; } }
@media (max-width: 640px) { .sh-selbar { bottom: calc(max(.8rem, env(safe-area-inset-bottom)) + 3.4rem); } }

/* map viewer: share button (Phase 2) */
.mapv-share { display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.mapv-share svg { width: 1.15rem; height: 1.15rem; }
.mapv-share[aria-busy="true"] { opacity: .55; cursor: progress; }
