/* Quark 2 Child: language switcher (dropdown) */
.lang-switcher {
  position: relative;
  display: inline-block;
}
.lang-switcher summary {
  cursor: pointer;
  padding: 0.375rem 0.75rem;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
}
.lang-switcher ul {
  position: absolute;
  bottom: 100%;
  left: 0;
  z-index: 10;
  min-width: 100%;
  margin: 0 0 0.25rem;
  padding: 0.25rem;
  list-style: none;
  background: var(--q2-bg, Canvas);
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  border-radius: 0.5rem;
}
.lang-switcher a {
  display: block;
  padding: 0.25rem 0.75rem;
  white-space: nowrap;
  text-decoration: none;
}
.lang-switcher a[aria-current] {
  font-weight: 700;
}

/* Quark 2 Child: footer useful links */
.helpful-links {
  margin-bottom: 1rem;
  text-align: left;
}
.helpful-links h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
}
.helpful-links p,
.helpful-links li {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
}
.helpful-links ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.helpful-links li span,
.helpful-links li a {
  color: #007bff;
  text-decoration: none;
}
.helpful-links li.featured span,
.helpful-links li.featured a {
  color: #28a745;
}
.helpful-links li.featured a {
  font-weight: 700;
}

/* Quark 2 Child: generator forms.
   Progressive enhancement: a field marked show_if is hidden while its radio is not selected.
   Browsers without :has() simply show every field. */
.gen-form:has(input[name="ntype"][value="1"]:not(:checked)) .show-if-ntype-1 {
  display: none;
}

/* Quark 2 Child: header keeps only the logo and the appearance toggle, so the toggle stays visible on small screens too */
@media (max-width: 860px) {
  .navbar-section.actions {
    display: flex;
  }
}

/* Quark 2 Child: cloud of links under the page text (buttons with an outline) */
.link-cloud {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem 0 1rem;
}
.link-cloud__title {
  flex-basis: 100%;
  font-weight: 700;
  text-align: center;
}
.link-cloud a[role="button"] {
  width: auto;
  margin: 0;
  padding: 0.4rem 0.9rem;
  font-size: 0.9375rem;
}

/* Quark 2 Child: "generate again" link looks and sizes like the submit button (Blades makes button[type=submit] full width) */
.gen-again[role="button"] {
  display: block;
  width: 100%;
}

/* Quark 2 Child: grouped fields (first/last name settings) and wide result tables */
.gen-group__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 0 1rem;
}
.gen-table {
  overflow-x: auto;
}

/* Quark 2 Child: footer copyright line */
.footer-copy {
  margin: 1rem 0 0;
  font-size: 0.875rem;
}

/* Quark 2 Child: home page, the country list is shown only for "real names" (select value 1) */
.gen-form:has(select[name="type"] option[value="1"]:not(:checked)) .show-if-type-1 {
  display: none;
}

/* Quark 2 Child: lists of names on category pages */
.name-list {
  columns: 12rem 3;
  column-gap: 1.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.name-list li {
  break-inside: avoid;
  margin-bottom: 0.25rem;
}

/* Quark 2 Child: favourite star, copy icon and the "copied" toast (markup and scripts come from the old site) */
[class^="icn-"] {
  display: inline-block;
  vertical-align: top;
  background: transparent url("../images/sprite.svg") no-repeat;
}
.icn-fvrt {
  width: 16px;
  height: 16px;
  background-position: -288px 0;
  cursor: pointer;
}
.icn-fvrt.in {
  background-position: -240px 0;
}
.icn-copy {
  position: relative;
  width: 16px;
  height: 16px;
  background: none;
  cursor: pointer;
}
.icn-copy::before,
.icn-copy::after {
  content: "";
  position: absolute;
  width: 11px;
  height: 13px;
  border: 1px solid currentColor;
  border-radius: 2px;
  background-color: var(--pico-background-color, Canvas);
}
.icn-copy::before {
  left: 0;
  top: 0;
  border-right-color: transparent;
  border-bottom-color: transparent;
}
.icn-copy::after {
  left: 4px;
  top: 3px;
}
.ulist {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}
.ulist li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid color-mix(in oklab, currentColor 25%, transparent);
  border-radius: 0.5rem;
}
.ulist li .icn-fvrt {
  order: -1;
  flex: none;
}
.ulist li .icn-copy {
  order: 1;
  flex: none;
  margin-left: auto;
}

.ulist.copied::before {
  display: block;
}
.ulist.copied::before {
  content: attr(data-copied);
  position: fixed;
  top: 20%;
  right: 20px;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background-color: #818181;
  color: #fff;
}
.gen-table .icn-copy {
  float: right;
  margin-left: 0.5rem;
}
.ulist--msg {
  display: none;
}

/* Quark 2 Child: favourites badge in the header (shown by main.js when the list is not empty) */
.fvrt-bdg {
  display: none;
  width: 32px;
  height: 32px;
  background: transparent url("../images/sprite.svg") -476px 3px no-repeat;
}

/* Quark 2 Child: random name picker (ported from the old site; ids and classes are used by js/name_picker.js) */
.hide {
  display: none !important;
}
.picker-helpers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.picker-helpers button {
  width: auto;
  margin: 0;
  padding: 0.35rem 0.8rem;
  font-size: 0.875rem;
}
.radio__note_picker {
  display: none;
  margin-top: 0.5rem;
  font-style: italic;
}
#F_picker_type_2:checked ~ .radio__note_picker,
#F_picker_type_3:checked ~ .radio__note_picker {
  display: block;
}
.typeItem {
  position: relative;
  width: 500px;
  max-width: 100%;
  margin: 1rem auto;
}
.typeItem canvas {
  max-width: 100%;
  background-color: #fff;
}
.typeItem__arrow {
  position: absolute;
  right: -41px;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -29px;
  border-style: solid;
  border-width: 25px 50px 25px 0;
  border-color: transparent #3797f0 transparent transparent;
}
.machine {
  position: relative;
  width: 500px;
  max-width: 100%;
  right: -30px;
}
.machine img {
  display: block;
  width: 100%;
  height: auto;
}
.machine__value {
  position: absolute;
  left: 63px;
  top: 77px;
  width: 309px;
  height: 96px;
  overflow: hidden;
  background-color: #fff;
  color: #262626;
}
.machine__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.machine__list li {
  box-sizing: border-box;
  margin: 0;
  overflow: hidden;
  font-size: 33px;
  font-weight: bold;
  line-height: 96px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.names-result__win {
  display: none;
  box-sizing: border-box;
  width: 350px;
  max-width: 100%;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 2rem;
  box-shadow: 0 0 15px -5px rgba(0, 0, 0, 0.53);
  background-color: #fff;
  color: #262626;
  text-align: center;
}
.names-result__win h2 {
  margin-top: 0;
  font-size: 1.9rem;
  text-transform: uppercase;
}
.names-result__win img {
  display: block;
  width: 120px;
  height: auto;
  margin: 0 auto 1rem;
}
.names-result__win__text {
  padding: 0.5rem 0;
  font-size: 1.75rem;
  font-weight: bold;
  color: #fdaa12;
  cursor: pointer;
}
.names-result__win__text + .names-result__win__text {
  border-top: 1px solid #dbdbdb;
}
.names-result__win .icn-copy {
  margin: 3px 0 0 6px;
}
.names-result {
  display: none;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #dbdbdb;
}
.names-result__hl {
  padding-right: 2.25rem;
  font-weight: bold;
  color: #fdaa12;
}
.names-result__table td {
  position: relative;
}
.names-result__table .icn-copy {
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}
.p-picker.copied::after {
  content: attr(data-copied);
  position: fixed;
  top: 50%;
  right: 20px;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background-color: #818181;
  color: #fff;
}
@media (max-width: 767px) {
  .typeItem {
    width: 280px;
  }
  .typeItem#typeWheel {
    height: 280px;
  }
  .typeItem__arrow {
    right: -15px;
    margin-top: -11px;
    border-width: 10px 22px 10px 0;
  }
  .machine {
    width: 280px;
    right: -8px;
  }
  .machine__value {
    left: 35px;
    top: 43px;
    width: 173px;
    height: 55px;
  }
  .machine__list li {
    font-size: 21px;
    line-height: 55px;
  }
}

/* Quark 2 Child: fake-name form, the field list is only for "full data", the state only for the USA */
.gen-form:has(input[name="datatype"][value="2"]:checked) .show-if-datatype-1 {
  display: none;
}
.gen-form:has(select[name="country"] option[value="1"]:not(:checked)) .show-if-country-1 {
  display: none;
}
.gen-table table th[colspan] {
  text-align: left;
}
.js_copy_all {
  width: auto;
}

/* Quark 2 Child: "was this helpful?" block, the vote counts sit inside the buttons */
.helpful {
  margin: 2rem 0;
  text-align: center;
}
.helpful__caption {
  margin-bottom: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}
.helpful__form {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 0;
}
.helpful .helpful__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: auto;
  margin: 0;
  padding: 0.55rem 1.1rem;
  border: 1px solid color-mix(in oklab, currentColor 40%, transparent);
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.helpful .helpful__btn:hover:not(:disabled) {
  border-color: var(--q2-accent, #f05454);
  background-color: color-mix(in oklab, var(--q2-accent, #f05454) 12%, transparent);
}
.helpful__count {
  min-width: 2rem;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background-color: color-mix(in oklab, currentColor 14%, transparent);
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
.helpful .helpful__btn:disabled {
  opacity: 0.6;
  cursor: default;
}
.helpful .helpful__btn.is-voted {
  border-color: var(--q2-accent, #f05454);
  background-color: var(--q2-accent, #f05454);
  color: #fff;
  opacity: 1;
}
.helpful .helpful__btn.is-voted .helpful__count {
  background-color: rgba(255, 255, 255, 0.25);
}
.helpful__msg {
  margin: 0.75rem 0 0;
}

/* Quark 2 Child: partner banner inside the header (hidden once the page is scrolled, so the sticky header stays thin) */
.header-promo {
  padding: 0 0 0.75rem;
}
.header-promo__link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.75rem;
  padding: 0.6rem 1rem;
  border: 1px solid color-mix(in oklab, var(--q2-accent, #8428df) 40%, transparent);
  border-radius: 0.75rem;
  background: linear-gradient(90deg, color-mix(in oklab, var(--q2-accent, #8428df) 16%, transparent), color-mix(in oklab, var(--q2-accent, #8428df) 6%, transparent));
  color: inherit;
  font-size: 0.9375rem;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, border-color 0.15s;
}
.header-promo__link:hover {
  border-color: var(--q2-accent, #8428df);
  background: color-mix(in oklab, var(--q2-accent, #8428df) 22%, transparent);
}
.header-promo__cta {
  font-weight: 700;
  color: var(--q2-accent, #8428df);
}
body.scrolled .header-promo {
  display: none;
}

/* Quark 2 Child: no list markers in the language dropdown and the footer links (the theme gives every li a square marker) */
.lang-switcher li,
.helpful-links li {
  list-style: none;
}
.lang-switcher li {
  margin: 0;
}

/* Quark 2 Child: HTML sitemap page */
.site-map__list {
  columns: 16rem 3;
  column-gap: 2rem;
  margin: 0 0 1.5rem;
  padding-left: 2rem;
}
ol.site-map__list li {
  list-style: decimal;
  font-weight: 600;
}
.site-map__list li {
  break-inside: avoid;
  margin-bottom: 0.4rem;
}
