/* Contextual Help 0.005: Scoped compact arrow tooltips / extended info panels. */
.slch-info-button {
  display: inline-flex; vertical-align: middle; align-items: center; justify-content: center;
  width: 25px; height: 25px; padding: 0; border: 1px solid currentColor;
  border-radius: 50%; margin-inline-start: 6px; background: transparent;
  color: #6d7782; opacity: .84; cursor: pointer; box-shadow: none;
  font: inherit; line-height: 1; flex: 0 0 auto;
}
.slch-info-button svg { width: 15px; height: 15px; pointer-events: none; }
.slch-info-button:hover, .slch-info-button:focus-visible { color: #188144; opacity: 1; outline-offset: 2px; }
.slch-info-button:focus-visible { outline: 2px solid #1d9d56; }
.slch-popup {
  position: fixed; z-index: 2147483000; box-sizing: border-box;
  width: min(312px, calc(100vw - 20px)); max-height: min(75vh, 470px);
  overflow: auto; overscroll-behavior: contain; background: #fff; color: #23352b;
  border: 1px solid #d5e3d8; border-radius: 14px; box-shadow: 0 12px 36px rgba(0, 0, 0, .19);
  padding: 11px 12px; line-height: 1.55; font-family: inherit; font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.slch-popup * { box-sizing: border-box; }
.slch-popup-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.slch-popup-summary { color: inherit; font-weight: 650; font-size: 14px; line-height: 1.6; }
.slch-popup-close { border: 0; background: transparent; color: inherit; font-size: 22px; line-height: 1;
  padding: 0 3px; opacity: .75; cursor: pointer; flex: 0 0 auto; }
.slch-popup-close:hover { opacity: 1; }
.slch-popup-detail { margin: 8px 0 10px; font-size: 13px; line-height: 1.65; opacity: .92; }
.slch-popup-more { display: block; margin-block-start: 7px; color: #147f46; cursor: pointer;
  font-size: 12px; font-weight: 650; text-decoration: underline; background: transparent; border: 0;
  padding: 3px 0; text-align: start; }
.slch-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.slch-actions a, .slch-actions button { display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px; padding: 6px 10px; border: 1px solid #18834a; background: #178549;
  color: #fff; text-decoration: none; font-weight: 650; font-family: inherit; font-size: 12px;
  cursor: pointer; }
.slch-actions button { background: transparent; color: #147f46; }
.slch-reset { display: block; padding: 4px 0 0; margin-top: 8px; border: 0;
  background: none; color: #66756b; text-decoration: underline; text-align: start;
  font: inherit; font-size: 11px; cursor: pointer; }
.slch-popup[data-slch-theme="dark"] { background: #18212c; color: #f4f7f8;
  border-color: #45505e; box-shadow: 0 12px 38px rgba(0,0,0,.56); }
.slch-popup[data-slch-theme="dark"] .slch-popup-more,
.slch-popup[data-slch-theme="dark"] .slch-actions button { color: #74df9f; }
.slch-popup[data-slch-theme="dark"] .slch-actions a { background: #248c55; border-color: #5abe80; color: #fff; }
.slch-popup[data-slch-theme="dark"] .slch-reset { color: #b5c3d1; }
.sl-dark-mode .slch-info-button, .sl-share-v2-overlay .slch-info-button { color: #aeb8c8; }
@media (max-width: 650px) {
  .slch-info-button { width: 25px; height: 25px; }
  .slch-popup { font-size: 14px; width: min(310px, calc(100vw - 20px)); max-height: 65vh; }
  .slch-popup[lang="ar"] .slch-popup-summary { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { .slch-popup { scroll-behavior: auto; } }

/* v0.004 — no fixed-width panels or controls in short tooltips. */
.slch-popup[data-slch-expanded="false"] {
  display: inline-flex; align-items: center; justify-content: center;
  width: max-content; max-width: calc(100vw - 20px);
  min-width: 0; height: auto; max-height: none;
  padding: 6px 10px; border-radius: 8px;
  overflow: visible; white-space: normal; text-align: center;
  line-height: 1.25; font-size: 12px;
  pointer-events: none; user-select: none;
  box-shadow: 0 4px 12px rgba(0,0,0,.16);
}
.slch-popup[data-slch-expanded="false"] .slch-popup-summary {
  display: block; width: auto; font-size: 12px !important;
  font-weight: 600; line-height: 1.25;
}
.slch-popup[data-slch-expanded="false"]::after {
  content: ""; position: absolute; left: var(--slch-arrow-x,50%);
  width: 9px; height: 9px; background: #fff;
  border: solid #d5e3d8; border-width: 0 1px 1px 0;
  pointer-events: none;
}
.slch-popup[data-slch-expanded="false"][data-slch-placement="above"]::after {
  bottom: -5px; transform: translateX(-50%) rotate(45deg);
}
.slch-popup[data-slch-expanded="false"][data-slch-placement="below"]::after {
  top: -5px; border-width: 1px 0 0 1px;
  transform: translateX(-50%) rotate(45deg);
}
.slch-popup[data-slch-expanded="false"][data-slch-theme="dark"]::after {
  background: #18212c; border-color: #45505e;
}
.slch-popup[data-slch-expanded="true"] {
  width: min(312px, calc(100vw - 20px));
}
.slch-popup[data-slch-expanded="true"]::after { content: none; }
@media (max-width:650px) {
  .slch-popup[data-slch-expanded="false"] {
    width: max-content; max-width: calc(100vw - 20px);
    padding: 6px 10px; font-size: 12px;
  }
}

/* v0.005 — readable compact mobile discovery; preserve width-to-text and arrow. */
@media (hover: none) and (pointer: coarse) {
  .slch-popup[data-slch-expanded="false"] {
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 9px 13px;
    border-radius: 10px;
    font-size: 16px;
    line-height: 1.3;
  }
  .slch-popup[data-slch-expanded="false"] .slch-popup-summary {
    font-size: 16px !important;
    font-weight: 650;
    line-height: 1.3;
  }
  .slch-popup[data-slch-expanded="false"]::after {
    width: 10px;
    height: 10px;
  }
}
