/* market-share.css -- styles for the per-table / per-chart Share control and
 * panel (share.js). Shared by v5 and v4 /data/ pages. Uses the site tokens:
 * deep #073B4C, teal #118AB2, soft surfaces instead of strong borders. */

/* ---- block that owns a control ---- */
.ss-sb { position: relative; scroll-margin-top: 124px; transition: background-color .15s ease, box-shadow .15s ease; }
.ss-sb--pad { padding-top: 56px !important; }

.ss-sh-btn {
  position: absolute; top: 4px; right: 0; z-index: 3; margin: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 44px; padding: 0 16px;
  border: 0; border-radius: 999px; box-sizing: border-box;
  background: #E3F1F7; color: #073B4C;
  font: 600 15px/1 'Instrument Sans', Helvetica, Arial, sans-serif; letter-spacing: 0;
  cursor: pointer; -webkit-tap-highlight-color: rgba(17, 138, 178, .2);
  -webkit-appearance: none; appearance: none;
}
.ss-sb--pad > .ss-sh-btn, .ss-sb--pad > .ss-sh-li > .ss-sh-btn { top: 6px; right: 6px; }
.ss-sh-li { list-style: none; margin: 0; padding: 0; height: 0; }
.ss-sb--dark > .ss-sh-btn { top: 10px; right: 10px; background: rgba(255, 255, 255, .16); color: #FFFFFF; }
.ss-sh-btn .ss-sh-ic { flex: 0 0 auto; }
.ss-sh-btn:focus-visible, .ss-sh-act:focus-visible, .ss-sh-x:focus-visible, .ss-sh-ta:focus-visible {
  outline: 3px solid #118AB2; outline-offset: 2px;
}

@media (hover: hover) {
  .ss-sb:hover { background-color: rgba(17, 138, 178, .05); box-shadow: 0 0 0 10px rgba(17, 138, 178, .05); border-radius: 4px; }
  .ss-sb--dark:hover { background-color: #073B4C; box-shadow: 0 0 0 10px rgba(17, 138, 178, .08); }
  .ss-sb:hover > .ss-sh-btn, .ss-sb:hover > .ss-sh-li > .ss-sh-btn { background: #073B4C; color: #FFFFFF; }
  .ss-sb--dark:hover > .ss-sh-btn { background: #FFFFFF; color: #073B4C; }
  .ss-sh-btn:hover { background: #073B4C !important; color: #FFFFFF !important; }
}

/* ---- panel ---- */
html.ss-sh-lock, html.ss-sh-lock body { overflow: hidden; }
.ss-sh-ov {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px; box-sizing: border-box; background: rgba(7, 59, 76, .62);
  -webkit-overflow-scrolling: touch;
}
.ss-sh-pn {
  width: 100%; max-width: 600px; max-height: calc(100vh - 32px); overflow-y: auto; -webkit-overflow-scrolling: touch;
  box-sizing: border-box; padding: 22px 22px 24px; border-radius: 14px;
  background: #FFFFFF; color: #073B4C;
  font: 400 17px/1.5 'Instrument Sans', Helvetica, Arial, sans-serif;
  box-shadow: 0 24px 70px rgba(7, 59, 76, .38); outline: none;
}
.ss-sh-pn * { box-sizing: border-box; }
.ss-sh-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.ss-sh-eyebrow { margin: 0 0 4px; font: 500 14px/1.3 'JetBrains Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: #073B4C; }
.ss-sh-ttl { margin: 0; font: 600 24px/1.2 'Instrument Sans', Helvetica, Arial, sans-serif; letter-spacing: -.02em; color: #073B4C; }
.ss-sh-x {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 14px;
  border: 0; border-radius: 999px; background: #F1F0EC; color: #073B4C;
  font: 600 15px/1 'Instrument Sans', Helvetica, Arial, sans-serif; cursor: pointer;
}
.ss-sh-grp { margin: 0 0 20px; }
.ss-sh-h { margin: 0 0 10px; font: 700 17px/1.3 'Instrument Sans', Helvetica, Arial, sans-serif; color: #073B4C; }
.ss-sh-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ss-sh-act {
  display: flex; align-items: center; gap: 10px; min-height: 48px; width: 100%; margin: 0; padding: 8px 14px;
  border: 0; border-radius: 10px; background: #F1F0EC; color: #073B4C; text-align: left; text-decoration: none;
  font: 600 16px/1.25 'Instrument Sans', Helvetica, Arial, sans-serif; cursor: pointer;
  -webkit-appearance: none; appearance: none; -webkit-tap-highlight-color: rgba(17, 138, 178, .2);
}
.ss-sh-act .ss-sh-ic, .ss-sh-x .ss-sh-ic { flex: 0 0 auto; }
.ss-sh-act[data-done] { background: #073B4C; color: #FFFFFF; }
.ss-sh-ta {
  display: block; width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 0; border-radius: 10px; resize: none;
  background: #F1F0EC; color: #073B4C; font: 400 14px/1.45 'JetBrains Mono', monospace;
  -webkit-user-select: text; user-select: text;
}
.ss-sh-live { min-height: 24px; margin: 0; font-size: 16px; font-weight: 600; color: #073B4C; }
@media (hover: hover) {
  .ss-sh-act:hover, .ss-sh-x:hover { background: #E3F1F7; }
}

@media (max-width: 640px) {
  .ss-sh-ov { align-items: flex-end; padding: 0; }
  .ss-sh-pn {
    max-width: none; max-height: 92vh; border-radius: 18px 18px 0 0;
    padding: 18px 16px calc(24px + env(safe-area-inset-bottom, 0px));
  }
  .ss-sh-ttl { font-size: 21px; }
  .ss-sh-grid { grid-template-columns: minmax(0, 1fr); }
  .ss-sh-grid.ss-sh-nets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) { .ss-sb { transition: none; } }
