/* ==================================================================
   /tools/youtube-qr-code-generator on the foundation look.
   Loaded ONLY when the 'tools-qr-code-generator-fnd' redesign switch is
   on for this viewer (never in embed mode); the old page keeps its own
   three stylesheets.

   Layout unique to this page only. The first screen, the guide, the
   questions, the links and the close are the shared tool kit
   (foundation-tools.css); the input, segments, switch, range, upload box,
   accordion, badges and numbered heads are the foundation's and are NOT
   redrawn here.

   Same shape as the thumbnail downloader page: one centred column at
   every width. Paste a link, then the code right under the bar.
   ================================================================== */

/* ------------------------------------------------------------------
   1. THE FIRST SCREEN (copied from the thumbnail downloader page, not
   shared, so no page can move another)
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {
  .tqr3-top .fnd-tool-top__in { display: block; }
  .fnd .tqr3 .tqr3-out { position: relative; top: auto; }
}
.fnd .tqr3 .fnd-tool-lead,
.fnd .tqr3 .tqr3-ask,
.fnd .tqr3 .tqr3-out { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (min-width: 1024px) {
  .fnd .tqr3 .fnd-tool-lead { max-width: 960px; }
  .fnd .tqr3 .fnd-tool-lead .fnd-display { max-width: none; }
}
.fnd .tqr3 .fnd-tool-lead { text-align: center; }
.fnd .tqr3 .fnd-tool-lead .fnd-display,
.fnd .tqr3 .fnd-tool-lead__sub { margin-left: auto; margin-right: auto; text-align: center; }
.fnd .tqr3 .fnd-tool-lead__sub { text-wrap: balance; }
.fnd .tqr3 h1.fnd-display,
.fnd .tqr3-qa__list summary,
.fnd.tqr3-page .fnd-tool-close .fnd-btn { text-wrap: balance; }
/* "QR Code Generator" stays on one line under "YouTube", so on a phone
   the name scales with the screen instead of running off it. */
@media (max-width: 559px) {
  .fnd .tqr3 .fnd-tool-lead .fnd-display { font-size: min(2.5rem, 8vw); }
  .fnd .tqr3 .fnd-tool-lead { margin-bottom: var(--fnd-s4); }
}

/* The bar sits bare on the page like a search box: no card around it. */
.fnd .tqr3 .tqr3-ask { background: none; border: 0; border-radius: 0; box-shadow: none; }
.fnd .tqr3 .tqr3-ask > .fnd-card-body { padding: 0; }
.tqr3-ask,
.tqr3-out { scroll-margin-top: calc(var(--header-height, 61px) + 16px); }

.fnd .tqr3-bar {
  display: flex; align-items: center; gap: var(--fnd-s2);
  background: var(--fnd-card);
  border: 1px solid var(--fnd-edge);
  border-radius: 999px;
  padding: 5px 5px 5px 20px;
  box-shadow: 0 1px 2px rgba(23, 20, 31, .05), 0 12px 28px -16px rgba(23, 20, 31, .3);
  transition: border-color 140ms ease, box-shadow 140ms ease;
}
.fnd .tqr3-bar:focus-within {
  border-color: var(--fnd-text);
  box-shadow: 0 0 0 3px var(--fnd-accent-soft), 0 12px 28px -16px rgba(23, 20, 31, .3);
}
.tqr3-bar > .tqr3-mark { flex: 0 0 auto; font-size: 15px; color: var(--fnd-text-faint); }
.fnd .tqr3 .tqr3-bar .fnd-input {
  flex: 1 1 auto; width: auto; min-width: 0;
  padding: 0 var(--fnd-s1);
  background: transparent; border: 0; border-radius: 0;
}
.fnd .tqr3 .tqr3-bar .fnd-input:focus { box-shadow: none; }
.fnd .tqr3-bar .fnd-btn { flex: 0 0 auto; border-radius: 999px; white-space: nowrap; }
.fnd .tqr3-bar:has(.fnd-btn:focus-visible) {
  border-color: var(--fnd-edge);
  box-shadow: 0 1px 2px rgba(23, 20, 31, .05), 0 12px 28px -16px rgba(23, 20, 31, .3);
}
@media (max-width: 559px) {
  .fnd .tqr3-bar { padding-left: 16px; }
  .fnd .tqr3-bar .fnd-btn { padding: 0 var(--fnd-s2); }
  .fnd .tqr3 .tqr3-bar .fnd-input { padding: 0 2px; font-size: 16px; }
}
@media (max-width: 399px) {
  .fnd .tqr3-bar { padding-left: 14px; }
  .tqr3-bar > .tqr3-mark { display: none; }
}
.fnd .tqr3 .tqr3-ask .fnd-error { text-align: center; text-wrap: pretty; }

/* "Try:" and two examples, a dot in each gap. */
.fnd .tqr3 .tqr3-try {
  justify-content: center; margin: var(--fnd-s1) 0 0;
  column-gap: 21px; row-gap: 0; overflow: hidden;
  color: var(--fnd-text-soft); font-size: var(--fnd-t-meta);
}
.fnd .tqr3 .tqr3-try > span { position: relative; display: inline-flex; align-items: center; }
.fnd .tqr3 .tqr3-try span + span::before {
  content: "\00b7"; position: absolute; top: 50%; left: -21px; width: 21px;
  margin: 0; transform: translateY(-50%); text-align: center; opacity: .6;
}
.fnd .tqr3 .tqr3-try .tqr3-try__k + span::before { content: none; }
.fnd .tqr3 .tqr3-try__k { margin-right: -13px; }

/* Text buttons grown to a 44px tap, in the accent so they read as things
   to press. */
.fnd .tqr3 .tqr3-link.fnd-textbtn { --fnd-hit-y: 14px; font-size: var(--fnd-t-meta); color: var(--fnd-accent-deep); white-space: nowrap; }
.fnd .tqr3 .tqr3-link.fnd-textbtn:hover { color: var(--fnd-text); }
.fnd .tqr3 .tqr3-link i { margin-right: 4px; }
.fnd .tqr3 .tqr3-link[data-copied="true"] { color: var(--fnd-ok); }

/* ------------------------------------------------------------------
   2. THE ANSWER: the code, what it opens, the button to save it, every
   way to style it, the next step.
   ------------------------------------------------------------------ */
.fnd .tqr3 .tqr3-out { margin-top: var(--fnd-s5); }
.tqr3-out.tqr3-out--in { animation: tqr3-in 320ms cubic-bezier(.22, 1, .36, 1); }
@keyframes tqr3-in { from { opacity: .4; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .tqr3-out.tqr3-out--in { animation: none; }
}

/* The example: a badge saying so, and no buttons, so "Make QR code"
   stays the one main button until the code is theirs. */
.fnd .tqr3-exnote {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 4px var(--fnd-s2);
  margin: 0 0 var(--fnd-s4);
  font-size: var(--fnd-t-meta); line-height: 1.5; color: var(--fnd-text-soft);
}
.fnd .tqr3-exnote > span:last-child { text-wrap: pretty; }
.tqr3-out:not(.tqr3-out--example) .tqr3-exnote,
.tqr3-out--example .tqr3-acts,
.tqr3-out--example .tqr3-note,
.tqr3-out--example .tqr3-next { display: none; }
.tqr3-out--stale .tqr3-acts,
.tqr3-out--stale .tqr3-next { display: none; }
.tqr3-out--stale #tqr3-canvas,
.tqr3-out--stale .tqr3-opens { opacity: .3; transition: opacity 150ms ease; }

/* The code beside what it opens; stacked, code first, on a phone. */
.tqr3-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--fnd-s4); align-items: start; }
@media (min-width: 600px) {
  .tqr3-main { grid-template-columns: 240px minmax(0, 1fr); gap: var(--fnd-s5); }
}
.tqr3-pic { justify-self: center; width: 100%; max-width: 280px; }
.tqr3-pic canvas {
  display: block; width: 100%; height: auto; aspect-ratio: 1 / 1;
  border: 1px solid var(--fnd-rule); border-radius: var(--fnd-r-sm);
  background: #fff;
}
.tqr3-side { min-width: 0; }
.fnd .tqr3 .tqr3-kind { margin: 0 0 var(--fnd-s2); }
.fnd .tqr3 .tqr3-kind .fnd-badge i { margin-right: 4px; }
.fnd .tqr3-head__title {
  margin: 0; min-width: 0;
  font-family: var(--fnd-display-font); font-weight: 700;
  font-size: var(--fnd-t-h3-lg); line-height: 1.3; color: var(--fnd-text);
  overflow-wrap: anywhere; text-wrap: pretty;
}
.tqr3-head__title:focus { outline: none; }
.fnd .tqr3 .tqr3-opens { margin: var(--fnd-s1) 0 0; font-size: var(--fnd-t-meta); color: var(--fnd-text-soft); overflow-wrap: anywhere; }
.fnd .tqr3 .tqr3-opens__k { font-weight: 600; }
.fnd .tqr3 .tqr3-opens__a { color: var(--fnd-accent-deep); text-decoration: none; padding-block: 12px; }
.fnd .tqr3 .tqr3-opens__a:hover { text-decoration: underline; }
.fnd .tqr3-head__meta {
  display: flex; flex-wrap: wrap; column-gap: 21px; row-gap: 0; overflow: hidden;
  margin: 2px 0 0; font-size: var(--fnd-t-meta); color: var(--fnd-text-soft);
}
.fnd .tqr3-head__meta > span { position: relative; min-width: 0; }
.fnd .tqr3-head__meta > span + span::before {
  content: "\00b7"; position: absolute; top: 0; left: -21px; width: 21px; text-align: center; opacity: .6;
}

/* Channels only: the Subscribe pop-up switch. */
.tqr3-subrow { margin-top: var(--fnd-s3); }
.tqr3-subrow[hidden] { display: none; }
.fnd .tqr3 .tqr3-sub { min-height: 44px; font-size: var(--fnd-t-sm); font-weight: 600; }
.fnd .tqr3 .tqr3-sub__help { margin: 2px 0 0; text-wrap: pretty; }

/* Download first, the quiet buttons beside it. On a phone the main one
   takes the whole width and the rest share the line under it. */
.tqr3-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fnd-s2) var(--fnd-s4); margin-top: var(--fnd-s4); }
.tqr3-acts__more { display: flex; flex-wrap: wrap; align-items: center; gap: var(--fnd-s2) var(--fnd-s4); }
.tqr3-acts [hidden] { display: none; }
@media (max-width: 559px) {
  .fnd .tqr3 .tqr3-acts > .fnd-btn { flex: 1 1 100%; justify-content: center; }
  .tqr3-acts__more { width: 100%; justify-content: space-between; }
}
.fnd .tqr3 .tqr3-note { margin: var(--fnd-s2) 0 0; color: var(--fnd-text-soft); text-wrap: pretty; }
.tqr3-note[hidden] { display: none; }

/* A code a phone may not read, said plainly under the code. */
.fnd .tqr3 .tqr3-warn {
  display: flex; gap: var(--fnd-s2); align-items: flex-start;
  margin: var(--fnd-s4) 0 0; padding: var(--fnd-s2) var(--fnd-s3);
  border-radius: var(--fnd-r-sm);
  background: var(--fnd-warn-soft);
  font-size: var(--fnd-t-sm); line-height: 1.5; color: var(--fnd-text); text-wrap: pretty;
}
.fnd .tqr3 .tqr3-warn i { flex: none; margin-top: 3px; color: var(--fnd-warn); }
.tqr3-warn[hidden] { display: none; }

/* Make it yours: a heading, then the folded controls. */
.tqr3-style { margin-top: var(--fnd-s6); }
.fnd .tqr3 .tqr3-style .fnd-tool-h3 { margin: 0; font-size: var(--fnd-t-h3); text-wrap: balance; }
.fnd .tqr3 .tqr3-style > .fnd-help { margin: 4px 0 0; text-wrap: pretty; }
.tqr3-acc { margin-top: var(--fnd-s3); }
.tqr3-acc .fnd-acc-body > * + * { margin-top: var(--fnd-s3); }
/* The chosen value sits at the right of each row, before the chevron. */
.fnd .tqr3 .tqr3-acc summary::after { margin-left: 0; }
.fnd .tqr3 .tqr3-sumv {
  margin-left: auto; min-width: 0; max-width: 55%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--fnd-body-font); font-size: var(--fnd-t-meta); font-weight: 500; color: var(--fnd-text-soft);
}
.tqr3-seg { display: flex; width: 100%; }
.tqr3-seg button { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; white-space: nowrap; }
.tqr3-seg button:disabled { opacity: .45; cursor: not-allowed; }
.fnd .tqr3 .tqr3-acc .fnd-help { margin-bottom: 0; text-wrap: pretty; }

/* Colors: a swatch plus its code, twice, then quick dot colors. */
.tqr3-colors { display: flex; flex-wrap: wrap; gap: var(--fnd-s3) var(--fnd-s5); }
.tqr3-colorf { display: flex; align-items: center; gap: var(--fnd-s2); }
.tqr3-color {
  display: inline-flex; align-items: center; gap: var(--fnd-s2);
  min-height: 44px; font-size: var(--fnd-t-sm); font-weight: 600; cursor: pointer;
}
.tqr3-color input[type="color"] {
  flex: none; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--fnd-edge); border-radius: var(--fnd-r-sm);
  background: none; cursor: pointer;
  transition: transform 150ms ease, border-color 150ms ease;
}
.tqr3-color input[type="color"]:hover { transform: translateY(-1px); border-color: var(--fnd-text-faint); }
.tqr3-color input[type="color"]:focus-visible { outline: 2px solid var(--fnd-accent-deep); outline-offset: 2px; }
.tqr3-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 3px; }
.tqr3-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.tqr3-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 6px; }
.fnd .tqr3 .tqr3-hex { width: 7.5rem; min-height: 44px; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.fnd .tqr3 .tqr3-hex[aria-invalid="true"] { border-color: var(--fnd-danger); }
.fnd .tqr3 .tqr3-presets__k { margin: 0 0 var(--fnd-s1); }
.tqr3-presets { display: flex; flex-wrap: wrap; gap: var(--fnd-s1); }
.tqr3-preset {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--fnd-rule); border-radius: 999px; background: var(--fnd-card);
  cursor: pointer; transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.tqr3-preset span { display: block; width: 28px; height: 28px; border-radius: 999px; }
.tqr3-preset:hover { border-color: var(--fnd-edge); transform: translateY(-1px); }
.tqr3-preset:focus-visible { outline: 2px solid var(--fnd-accent-deep); outline-offset: 2px; }
.tqr3-preset[aria-pressed="true"],
.tqr3-preset[aria-pressed="true"]:hover { border-color: var(--fnd-ink); box-shadow: 0 0 0 1px var(--fnd-ink); }
/* Six 44px swatches need about 294px; on a narrow phone they sit in two even rows of three. */
@media (max-width: 419px) {
  .tqr3-presets { display: grid; grid-template-columns: repeat(3, 44px); gap: var(--fnd-s2) var(--fnd-s1); }
}

/* Logo: the picked picture in a row with its Remove. */
.tqr3-upload[hidden],
.tqr3-logo-pick[hidden] { display: none; }
.tqr3-logo-pick { display: flex; align-items: center; gap: var(--fnd-s3); }
.tqr3-logo-pick img {
  flex: none; width: 44px; height: 44px; object-fit: cover;
  border: 1px solid var(--fnd-rule); border-radius: 999px; background: var(--fnd-paper);
}
.fnd .tqr3 .tqr3-logo-pick__t { flex: 1 1 auto; min-width: 0; font-size: var(--fnd-t-meta); color: var(--fnd-text-soft); text-wrap: pretty; }

/* Size: the slider with its number. */
.tqr3-line__top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--fnd-s3); }
.fnd .tqr3 .tqr3-line__top .fnd-label { margin-bottom: 0; }
.tqr3-val { font-size: var(--fnd-t-meta); font-weight: 700; font-variant-numeric: tabular-nums; color: var(--fnd-text-soft); }
.fnd .tqr3 .tqr3-acc .tqr3-range { margin-top: var(--fnd-s1); }

/* The next step: under the answer, once it is theirs. */
.tqr3-next {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--fnd-s3) var(--fnd-s4);
  margin-top: var(--fnd-s6); padding-top: var(--fnd-s4);
  border-top: 1px solid var(--fnd-rule);
}
.tqr3-next[hidden] { display: none; }
.tqr3-next__t { flex: 1 1 300px; min-width: 0; }
.fnd .tqr3 .tqr3-next .fnd-tool-h3 { margin: 0; font-size: var(--fnd-t-h3); text-wrap: balance; }
.fnd .tqr3 .tqr3-next__t .fnd-help { margin: 4px 0 0; text-wrap: pretty; }
.tqr3-next__go { flex: 0 0 auto; }

@media (max-width: 767px) {
  .tqr3-style { margin-top: var(--fnd-s5); }
}
@media (max-width: 559px) {
  .tqr3-next__go { flex: 1 1 100%; }
  .fnd .tqr3 .tqr3-next__go .fnd-btn { width: 100%; justify-content: center; }
  .fnd .tqr3 .tqr3-sumv { max-width: 50%; }
}

/* ------------------------------------------------------------------
   3. THE GUIDE
   ------------------------------------------------------------------ */
.fnd .tqr3-guide .fnd-tool-read .fnd-h2 {
  margin-top: var(--fnd-s8);
  max-width: 24ch;
  scroll-margin-top: calc(var(--header-height, 61px) + var(--fnd-s4));
}
.tqr3-guide .fnd-tool-read .fnd-h2:focus { outline: none; }
.fnd .tqr3-guide .fnd-toc li > a:not(.fnd-btn) { text-wrap: pretty; }
@media (max-width: 767px) {
  .fnd .tqr3-guide .fnd-tool-read .fnd-h2 { margin-top: var(--fnd-s7); }
}
/* A link inside a sentence grows to a 45px press without moving the text. */
.fnd .tqr3-guide .fnd-tool-read p a:not(.fnd-btn),
.fnd .tqr3-guide .fnd-tool-read li a:not(.fnd-btn),
.fnd .tqr3-qa__list p a:not(.fnd-btn) { padding-block: 12px; }
.fnd .tqr3-guide .tqr3-steps-g + p,
.fnd .tqr3-guide .fnd-tbl + p { margin-top: var(--fnd-s3); }

.tqr3-steps-g { list-style: none; margin: var(--fnd-s4) 0 0; padding: 0; }
.tqr3-steps-g li + li { margin-top: var(--fnd-s5); }
.tqr3-steps-g .fnd-numhead { margin-bottom: var(--fnd-s2); }
.fnd .tqr3-steps-g .fnd-numhead__t { font-size: var(--fnd-t-h3); }
.tqr3-steps-g p { margin: 0; padding-left: calc(32px + var(--fnd-s3)); }
@media (max-width: 559px) {
  .tqr3-steps-g p { padding-left: 0; }
}
