/* ==================================================================
   /tools/youtube-hashtag-generator on the foundation look.
   Loaded ONLY when the 'tools-hashtag-generator-fnd' redesign switch is
   on for this viewer; the old page keeps tools-hashtag-generator.css.

   Layout unique to this page only, laid out like the Tag Generator
   (tools-tag-generator-fnd.css). The first screen, the guide, the
   questions, the links and the close are the shared tool kit
   (foundation-tools.css); the tabs, segment, chips, inputs, badges, action
   bar, callout, toasts and the YouTube card are the foundation's and are
   NOT redrawn here. Every hashtag is a .fnd-chip-btn: tap it and it goes
   solid ink (aria-pressed).

   One centred column: the form, then the example hashtags (their own once
   they search), then their list with the preview by the title and the
   copy buttons. A sticky bar keeps "Copy" in reach while they pick.
   ================================================================== */

.hg3 [hidden] { display: none !important; }

/* ------------------------------------------------------------------
   1. THE FIRST SCREEN
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {
  .hg3-top .fnd-tool-top__in { display: block; }
}
.fnd .hg3 .fnd-tool-lead,
.fnd .hg3 .hg3-ask { max-width: 960px; margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) {
  .fnd .hg3 .fnd-tool-lead .fnd-display { max-width: none; }
}
.fnd .hg3 .fnd-tool-lead { text-align: center; }
.fnd .hg3 .fnd-tool-lead .fnd-display,
.fnd .hg3 .fnd-tool-lead__sub { margin-left: auto; margin-right: auto; text-align: center; }
.fnd .hg3 .fnd-tool-lead__sub,
.fnd .hg3 h1.fnd-display,
.fnd .hg3-qa__list summary,
.fnd.hg3-page .fnd-tool-close .fnd-btn,
.fnd .hg3 .hg3-group__t,
.fnd .hg3 .hg3-chk__t { text-wrap: balance; }
.fnd .hg3-qa__body p,
.fnd.hg3-page .fnd-tool-links p,
.fnd .hg3 .hg3-results__hint,
.fnd .hg3 .hg3-group__hint,
.fnd .hg3 .hg3-yt-note,
.fnd .hg3 .hg3-list__tip,
.fnd .hg3 .hg3-chk__sub,
.fnd .hg3 .hg3-issue,
.fnd .hg3 .hg3-next p { text-wrap: pretty; }
@media (max-width: 413px) {
  .fnd .hg3 .fnd-tool-lead .fnd-display { font-size: 2.15rem; }
}
/* 320 wide: "Hashtag Generator" stays on one line, and both tabs fit. */
@media (max-width: 359px) {
  .fnd .hg3 .fnd-tool-lead .fnd-display { font-size: 1.75rem; }
  .fnd .hg3 .hg3-tabs { gap: var(--fnd-s3); }
}
/* Up to 374 wide the second tab reads "Check hashtags", so both fit. */
@media (max-width: 374px) {
  .fnd .hg3 .hg3-tab-my { display: none; }
}
@media (max-width: 559px) {
  .fnd .hg3 .fnd-tool-lead { margin-bottom: var(--fnd-s4); }
}
/* Translated phones only: the two tabs share the row and their labels may
   wrap. Russian "Check my hashtags" was cut off past the card at 375
   (2026-11-06), and a cut-off tab does not look like something to press.
   A word never splits: when one is wider than half the row (Tamil), each
   tab takes its own row instead. */
@media (max-width: 767px) {
  html[class*="translated-"] .fnd .hg3 .hg3-tabs { flex-wrap: wrap; row-gap: 0; }
  html[class*="translated-"] .fnd .hg3 .hg3-tabs .fnd-tab {
    flex: 1 1 0; min-width: auto;
    white-space: normal; line-height: 1.25; text-align: left;
    font-size: 14px; overflow-wrap: break-word;
  }
  /* Long Tamil and Malayalam words also pushed the page sideways from the
     Long video / Short picker, the example label and the copy buttons
     (2026-11-07). Each wraps between words now; the copy bar puts its
     count on a line of its own, and the closing heading may break a word
     rather than lose it off the edge at 320. */
  html[class*="translated-"] .fnd .hg3 .hg3-kind .fnd-segment > button { white-space: normal; line-height: 1.2; }
  html[class*="translated-"] .fnd .hg3 #hg3-example-badge { display: inline-block; max-width: 100%; white-space: normal; }
  html[class*="translated-"] .fnd .hg3 .fnd-btn {
    flex-wrap: wrap; justify-content: center; max-width: 100%;
    white-space: normal; text-align: center; line-height: 1.25;
  }
  /* Google's word pieces start from their narrowest, so a button's icon
     stays beside its words instead of on a line of its own. */
  html[class*="translated-"] .fnd .hg3 .fnd-btn > font { flex: 1 1 0; }
  html[class*="translated-"] .fnd .hg3 .hg3-list__go > .fnd-btn { min-width: auto; }
  html[class*="translated-"] .fnd .hg3 .hg3-bar { flex-wrap: wrap; row-gap: var(--fnd-s2); }
  html[class*="translated-"] .fnd .hg3 .hg3-bar .fnd-actionbar-info { flex-basis: 100%; }
  html[class*="translated-"] .fnd .hg3 .hg3-bar .fnd-btn { flex: 1 1 0; }
  html[class*="translated-"] .fnd.hg3-page .fnd-tool-close h2 { font-size: min(1.85rem, 7.4vw); overflow-wrap: break-word; }
}
.hg3-ask,
.hg3-results,
.hg3-chk,
.hg3-list { scroll-margin-top: calc(var(--header-height, 61px) + 16px); }

/* ------------------------------------------------------------------
   2. THE FORM
   ------------------------------------------------------------------ */
.fnd .hg3 .hg3-panel > * + * { margin-top: var(--fnd-s4); }
.fnd .hg3 .hg3-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 200px;
  gap: var(--fnd-s3); align-items: end;
}
.fnd .hg3 .hg3-row .fnd-field,
.fnd .hg3 .hg3-row2 .fnd-field { margin-bottom: 0; min-width: 0; }
.fnd .hg3 .hg3-row .fnd-select { width: 100%; }
.fnd .hg3 .hg3-row2 {
  display: flex; flex-wrap: wrap; align-items: flex-end;
  justify-content: space-between; gap: var(--fnd-s3);
}
.fnd .hg3 .hg3-go { min-width: 220px; }
.fnd .hg3 .hg3-err { margin: 0; font-size: var(--fnd-t-sm); color: var(--fnd-danger); }
.fnd .hg3 .hg3-loading { font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }
.fnd .hg3 .hg3-loading > * { vertical-align: middle; }
.fnd .hg3 .hg3-loading .fnd-spin { margin-right: var(--fnd-s2); }
@media (max-width: 767px) {
  .fnd .hg3 .hg3-row { grid-template-columns: minmax(0, 1fr); }
  .fnd .hg3 .hg3-row2 { display: grid; grid-template-columns: minmax(0, 1fr); }
  .fnd .hg3 .hg3-go { width: 100%; min-width: 0; }
  .fnd .hg3 .hg3-kind .fnd-segment { display: flex; }
  .fnd .hg3 .hg3-kind .fnd-segment > button { flex: 1 1 0; }
}

/* ------------------------------------------------------------------
   3. THE HASHTAGS
   ------------------------------------------------------------------ */
.fnd .hg3 .hg3-results__head,
.fnd .hg3 .hg3-results__sub {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--fnd-s2) var(--fnd-s3);
}
.fnd .hg3 .hg3-results__head { padding-top: var(--fnd-s4); border-top: 1px solid var(--fnd-rule); }
.fnd .hg3 .hg3-results__sub { margin-top: var(--fnd-s2); }
.fnd .hg3 .hg3-results__n { margin: 0; font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }
.fnd .hg3 .hg3-results__n b {
  font-family: var(--fnd-display-font); font-weight: 800; font-size: 22px;
  color: var(--fnd-text); font-variant-numeric: tabular-nums;
}
.fnd .hg3 .hg3-results__hint { margin: 0; font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }

.fnd .hg3 .hg3-group { margin-top: var(--fnd-s5); }
.fnd .hg3 .hg3-group__head {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: var(--fnd-s2) var(--fnd-s3);
}
.fnd .hg3 .hg3-group__t {
  margin: 0; display: inline-flex; align-items: center; gap: var(--fnd-s2);
  font-family: var(--fnd-display-font); font-weight: 800; font-size: 17px; color: var(--fnd-text);
}
.fnd .hg3 .hg3-group__n {
  min-width: 26px; padding: 2px 8px; border-radius: 999px; text-align: center;
  background: var(--fnd-paper-2); color: var(--fnd-text-soft);
  font-family: var(--fnd-body-font); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums;
}
.fnd .hg3 .hg3-group__hint { margin: var(--fnd-s1) 0 0; font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }

.fnd .hg3 .hg3-cloud { display: flex; flex-wrap: wrap; gap: var(--fnd-s2); margin-top: var(--fnd-s3); min-width: 0; }
.fnd .hg3 .hg3-more { margin-top: var(--fnd-s3); }
/* A long hashtag wraps inside its chip instead of pushing the page. */
.fnd .hg3 .hg3-chip { max-width: 100%; text-align: left; line-height: 1.3; overflow-wrap: break-word; }
.fnd .hg3 .hg3-chip--list { gap: var(--fnd-s2); color: var(--fnd-text); }
.fnd .hg3 .hg3-chip--list > span { min-width: 0; }
.fnd .hg3 .hg3-chip--list > i { flex: 0 0 auto; color: var(--fnd-text-faint); font-size: 13px; }
.fnd .hg3 .hg3-chip--list:hover > i { color: var(--fnd-danger); }

/* Links inside guide sentences: a 24px tap area without moving the lines. */
.fnd .hg3-guide p a:not(.fnd-btn) { padding-block: 2px; }
@media (max-width: 767px), (pointer: coarse) {
  .fnd .hg3-guide p a:not(.fnd-btn) { padding-block: 12px; }
}

/* The copy bar, stuck to the bottom of the screen while the hashtags
   scroll. It bleeds to the card's edges so it reads as the card's footer. */
.fnd .hg3 .hg3-bar {
  flex-wrap: nowrap; align-items: center;
  margin-left: calc(-1 * var(--fnd-s4)); margin-right: calc(-1 * var(--fnd-s4));
}
.fnd .hg3 .hg3-bar .fnd-actionbar-info { flex: 1 1 0; min-width: 0; margin: 0; }
.fnd .hg3 .hg3-bar .fnd-btn { flex: 0 0 auto; }
@media (max-width: 767px) {
  body.fnd:has(.mobile-bottom-nav) .hg3 .hg3-bar { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
}

/* ------------------------------------------------------------------
   4. THEIR LIST, WITH THE PREVIEW BY THE TITLE
   ------------------------------------------------------------------ */
.fnd .hg3 .hg3-list {
  margin-top: var(--fnd-s5); padding: var(--fnd-s4); border-radius: var(--fnd-r);
  background: var(--fnd-paper-2);
}
.fnd .hg3 .hg3-list > * + * { margin-top: var(--fnd-s3); }
.fnd .hg3 .hg3-list__head {
  display: flex; flex-wrap: wrap; align-items: baseline;
  justify-content: space-between; gap: var(--fnd-s1) var(--fnd-s3);
}
.fnd .hg3 .hg3-list__t { margin: 0; font-family: var(--fnd-display-font); font-weight: 800; font-size: 20px; color: var(--fnd-text); }
.fnd .hg3 .hg3-list__n { margin: 0; font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }
.fnd .hg3 .hg3-list__n b { color: var(--fnd-text); font-variant-numeric: tabular-nums; }
.fnd .hg3 .hg3-list__verdict { margin-left: var(--fnd-s1); font-weight: 600; }
.fnd .hg3 .hg3-v--ok { color: var(--fnd-ok); }
.fnd .hg3 .hg3-v--warn { color: var(--fnd-warn); }
.fnd .hg3 .hg3-v--danger { color: var(--fnd-danger); }
.fnd .hg3 .hg3-yt { max-width: 560px; box-shadow: 0 0 0 1px var(--fnd-rule); }
/* YouTube cuts its line with dots; here all three must show, so it wraps. */
.fnd .hg3 .hg3-yt .fnd-ytcard-sub { white-space: normal; overflow-wrap: break-word; }
.fnd .hg3 .hg3-yt-note,
.fnd .hg3 .hg3-list__tip { margin-bottom: 0; font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }
.fnd .hg3 .hg3-list__go { display: flex; flex-wrap: wrap; gap: var(--fnd-s2); }
@media (max-width: 559px) {
  .fnd .hg3 .hg3-list { padding: var(--fnd-s3); }
  .fnd .hg3 .hg3-list__go > .fnd-btn { flex: 1 1 0; min-width: 0; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
  .fnd .hg3 .hg3-list__go > #hg3-copy { flex-basis: 100%; }
}

/* The next step after a copy. */
.fnd .hg3 .hg3-next { margin-top: var(--fnd-s4); }
.fnd .hg3 .hg3-next__in > * + * { margin-top: var(--fnd-s2); }
.fnd .hg3 .hg3-next p { margin: 0; }

/* ------------------------------------------------------------------
   5. CHECK MY HASHTAGS
   ------------------------------------------------------------------ */
.fnd .hg3 .hg3-chk { padding-top: var(--fnd-s4); border-top: 1px solid var(--fnd-rule); }
.fnd .hg3 .hg3-chk > * + * { margin-top: var(--fnd-s3); }
.fnd .hg3 .hg3-chk__t { margin: 0; font-family: var(--fnd-display-font); font-weight: 800; font-size: 20px; color: var(--fnd-text); }
.fnd .hg3 .hg3-chk__sub { margin: var(--fnd-s1) 0 0; font-size: var(--fnd-t-sm); color: var(--fnd-text-soft); }
.fnd .hg3 .hg3-found {
  max-width: 100%; padding: 4px 10px; border-radius: 999px;
  background: var(--fnd-paper-2); color: var(--fnd-text);
  font-size: var(--fnd-t-sm); line-height: 1.4; overflow-wrap: anywhere;
}
.fnd .hg3 .hg3-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--fnd-s2); }
.fnd .hg3 .hg3-issue {
  display: flex; align-items: flex-start; gap: var(--fnd-s2);
  padding: var(--fnd-s2) var(--fnd-s3); border-radius: var(--fnd-r-sm);
  background: var(--fnd-paper-2); font-size: var(--fnd-t-sm); line-height: 1.5;
  color: var(--fnd-text); overflow-wrap: anywhere;
}
.fnd .hg3 .hg3-issue i { flex: 0 0 auto; margin-top: 4px; }
.fnd .hg3 .hg3-issue--good i { color: var(--fnd-ok); }
.fnd .hg3 .hg3-issue--tip i { color: var(--fnd-text-soft); }
.fnd .hg3 .hg3-issue--warning i { color: var(--fnd-warn); }
.fnd .hg3 .hg3-issue--danger i { color: var(--fnd-danger); }
