/* OG 100 size and color tokens
   Pete, WhereTheyAsk — use with og100-icon.svg and the chip markup in og100-chip.html
   Fill is #E20079. Text / hover is #C4006A. #EB007E is a decorative accent only; do not use it for the seal or chip type. */

:root {
  /* Icon sizes */
  --og100-icon-sm: 16px; /* comments, feed meta */
  --og100-icon-md: 20px; /* feed post names, profile header name */
  --og100-icon-lg: 28px; /* optional, large desktop headers */

  /* Icon alignment next to a display name */
  --og100-name-gap: 6px;       /* space between the name and the icon */
  --og100-icon-valign: -0.12em; /* baseline offset when the icon is inline (not in a flex row) */

  /* Chip ("OG 100 · #NN") under the profile display name */
  --og100-chip-h: 24px;
  --og100-chip-pad-y: 3px;
  --og100-chip-pad-right: 10px;
  --og100-chip-pad-left: 4px;
  --og100-chip-radius: 999px;
  --og100-chip-fs: 12px;
  --og100-chip-fw: 700;
  --og100-chip-gap: 6px;       /* icon to label inside the chip */
  --og100-chip-offset: 8px;    /* gap from the name / handle block to the chip */
  --og100-chip-lh: 1;
  --og100-hit: 44px;           /* minimum tap / hover target, via an expanded hit area */

  /* Colors */
  --og100-fill: #E20079;       /* seal fill (also the default currentColor) */
  --og100-hover: #C4006A;      /* chip text, hover / press */
  --og100-chip-bg: #FDF0F7;    /* soft pink tint; #C4006A on this is 5.34:1 */
  --og100-chip-border: #E20079;
  --og100-ring-dark: #111;     /* outer ring, holds the seal on white */
  --og100-ring-light: #fff;    /* inner ring, holds the seal on #111 / #000 */
  --og100-tip-bg: #111;
  --og100-tip-fg: #fff;
}

/* ---- recommended component rules ---- */

.og100-icon {
  display: inline-block;
  width: var(--og100-icon-md);
  height: var(--og100-icon-md);
  flex: 0 0 auto;
  vertical-align: var(--og100-icon-valign);
  color: var(--og100-fill);
  overflow: visible;
}
.og100-icon--sm { width: var(--og100-icon-sm); height: var(--og100-icon-sm); }
.og100-icon--md { width: var(--og100-icon-md); height: var(--og100-icon-md); }
.og100-icon--lg { width: var(--og100-icon-lg); height: var(--og100-icon-lg); }

/* Preferred: keep the name and icon on one row */
.og100-name {
  display: inline-flex;
  align-items: center;
  gap: var(--og100-name-gap);
  min-width: 0;
}

.og100-chip {
  --og100-tip-shift: 8px;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--og100-chip-gap);
  box-sizing: border-box;
  height: var(--og100-chip-h);
  margin: var(--og100-chip-offset) 0 0;
  padding: var(--og100-chip-pad-y) var(--og100-chip-pad-right) var(--og100-chip-pad-y) var(--og100-chip-pad-left);
  border: 1px solid var(--og100-chip-border);
  border-radius: var(--og100-chip-radius);
  background: var(--og100-chip-bg);
  color: var(--og100-hover);
  font-family: Arial, Helvetica, sans-serif;
  font-size: var(--og100-chip-fs);
  font-weight: var(--og100-chip-fw);
  letter-spacing: 0.01em;
  line-height: var(--og100-chip-lh);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  white-space: nowrap;
  cursor: default;
}
.og100-chip:hover,
.og100-chip:focus-visible {
  border-color: var(--og100-hover);
}
.og100-chip:focus-visible {
  outline: 2px solid #EB007E;
  outline-offset: 2px;
}
/* Expand the hover / tap target to at least 44×44 without enlarging the visible pill */
.og100-chip::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  min-width: var(--og100-hit);
  min-height: var(--og100-hit);
  transform: translate(-50%, -50%);
}
.og100-chip-label {
  font-variant-numeric: tabular-nums;
}
.og100-chip .og100-icon {
  width: var(--og100-icon-sm);
  height: var(--og100-icon-sm);
}

.og100-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 8;
  box-sizing: border-box;
  width: max-content;
  max-width: 240px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--og100-tip-bg);
  color: var(--og100-tip-fg);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  white-space: normal;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.og100-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -6px;
  border: 6px solid transparent;
  border-top-color: var(--og100-tip-bg);
}
.og100-chip:hover .og100-tip,
.og100-chip:focus-visible .og100-tip,
.og100-chip:active .og100-tip {
  opacity: 1;
  visibility: visible;
}
@media (prefers-reduced-motion: no-preference) {
  .og100-tip {
    transition: opacity 120ms ease, visibility 120ms ease;
  }
}

/* ---- WhereTheyAsk placement (Mitchell) ---- */
.og100-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 4px; }
.og100-row .og100-chip { margin-top: 0; }
.profile-copy h1 .og100-name { display: inline; }
.profile-copy h1 .og100-tail { white-space: nowrap; }
.profile-copy h1 .og100-icon { margin-left: var(--og100-name-gap); vertical-align: var(--og100-icon-valign); }
.og100-card-links { margin: 0; }
.og100-card-links a { color: var(--og100-hover); font-weight: 600; }
.person-name .og100-name, .story-name .og100-name, .friend .og100-name { gap: 4px; }
/* Profile header ships both icons: 20px (no ring) on mobile, 28px (ring) on desktop. */
.profile-copy h1 .og100-icon--lg { display: none; }
@media (min-width: 801px) {
  .profile-copy h1 .og100-icon--md { display: none; }
  .profile-copy h1 .og100-icon--lg { display: inline-block; }
}
