/* Typephoria conversion layer — loaded after styles.css and saved-fonts.css */

/* ---------- Save: compact icon button so it never covers the font name ---------- */
html body #home #feed .tile .save-font .save-font-label { display: none !important; }
html body #home #feed .tile .save-font {
  width: 36px !important; min-width: 36px !important;
  height: 36px !important; min-height: 36px !important;
  padding: 0 !important; gap: 0 !important;
  justify-content: center !important;
  top: 20px !important; right: 20px !important;
}
@media (max-width: 620px) {
  html body #home #feed .tile .save-font {
    width: 30px !important; min-width: 30px !important;
    height: 30px !important; min-height: 30px !important;
    top: 12px !important; right: 12px !important;
  }
}

/* ---------- Style filter ---------- */
.style-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 26px;
  padding: 0 12px;
  scroll-margin-top: 90px;
}
.style-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #d7c9bb;
  border-radius: 999px;
  background: #fffaf3;
  color: #060512;
  font: 700 14px/1 'DM Sans', Arial, sans-serif;
  cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.style-chip span { font-weight: 500; color: #8c7665; font-size: 12px; }
.style-chip:hover { border-color: #ff3150; }
.style-chip[aria-pressed="true"] { background: #ff3150; border-color: #ff3150; color: #fff; }
.style-chip[aria-pressed="true"] span { color: rgba(255,255,255,.8); }
.style-chip:focus-visible { outline: 3px solid #060512; outline-offset: 2px; }

/* ---------- Two-column compact cards on phones ---------- */
@media (max-width: 920px) {
  #home #feed.masonry { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  #home #feed .masonry-column { gap: 12px !important; }
}
@media (max-width: 620px) {
  .style-filter {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    margin: 0 -12px 18px;
    padding: 2px 12px 6px;
    scrollbar-width: none;
  }
  .style-filter::-webkit-scrollbar { display: none; }
  .style-chip { flex: 0 0 auto; min-height: 38px; padding: 0 14px; font-size: 13px; }

  /* Same side margins as the hero and the reviews block (12px) */
  html body #home #picks { padding-left: 0 !important; padding-right: 0 !important; }
  html body #home .feed-cta { margin-left: 0 !important; margin-right: 0 !important; }

  #home #feed .tile { padding: 6px !important; border-radius: 12px !important; }

  /* Pinterest-style varied heights in the two-column feed */
  html body #home #feed .masonry-column .tile .specimen.specimen {
    position: relative !important;
    height: auto !important; min-height: 0 !important;
    aspect-ratio: 1 / .8 !important;
    padding: 0 !important; overflow: hidden !important;
  }
  html body #home #feed .masonry-column .tile:nth-child(4n+2) .specimen.specimen { aspect-ratio: 1 / 1.06 !important; }
  html body #home #feed .masonry-column .tile:nth-child(4n+3) .specimen.specimen { aspect-ratio: 1 / .9 !important; }
  html body #home #feed .masonry-column .tile:nth-child(4n) .specimen.specimen { aspect-ratio: 1 / 1.18 !important; }
  html body #home #feed .masonry-column:nth-child(2) .tile:nth-child(4n+1) .specimen.specimen { aspect-ratio: 1 / 1.06 !important; }
  html body #home #feed .masonry-column:nth-child(2) .tile:nth-child(4n+2) .specimen.specimen { aspect-ratio: 1 / .8 !important; }
  html body #home #feed .masonry-column .tile .specimen.specimen picture,
  html body #home #feed .masonry-column .tile .specimen.specimen img {
    position: absolute !important; inset: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important; object-position: center !important;
  }
  #home #feed .tile-body { padding: 8px 4px 4px !important; }
  #home #feed .tile .meta { font-size: 9px !important; margin-bottom: 2px !important; }
  #home #feed .tile h3 { font-size: 17px !important; line-height: 1.1 !important; margin: 0 0 8px !important; }
  html body #home #feed .masonry-column .tile .tile-character { display: block !important; max-height: none !important; height: auto !important; overflow: visible !important; -webkit-line-clamp: unset !important; transform: none !important; font-size: 12px !important; line-height: 1.4 !important; margin: 0 0 10px !important; }
  html body #home #feed .masonry-column .tile .btn.btn {
    height: auto !important;
    display: flex !important;
    min-height: 36px !important;
    width: 100% !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    letter-spacing: .02em;
  }
  html body #home #feed .masonry-column .story-tile.story-tile { padding: 16px 12px !important; min-height: 0 !important; height: auto !important; justify-content: flex-start !important; gap: 10px; }
  html body #home #feed .story-tile:before, html body #home #feed .story-tile:after { display: none !important; }
  html body #home #feed .masonry-column .story-tile .eyebrow { position: static !important; margin: 0 !important; }
  html body #home #feed .masonry-column .story-tile h3 { font-size: 21px !important; line-height: 1.1 !important; position: static !important; top: auto !important; transform: none !important; margin: 0 !important; height: auto !important; max-height: none !important; overflow: visible !important; -webkit-line-clamp: unset !important; display: block !important; }
  html body #home #feed .masonry-column .story-tile .story-description { display: block !important; position: static !important; transform: none !important; translate: none !important; font-size: 12px !important; line-height: 1.4 !important; margin: 0 !important; max-width: none !important; }
  html body #home #feed .masonry-column .story-tile .btn.btn { height: auto !important; margin-top: 6px !important; width: 100% !important; justify-content: center !important; min-height: 36px !important; font-size: 11px !important; padding: 0 10px !important; }
}

/* ---------- Free fonts bar ---------- */
.free-bar {
  position: fixed;
  left: 50%;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(760px, calc(100% - 24px));
  padding: 10px 10px 10px 20px;
  box-sizing: border-box;
  border-radius: 999px;
  background: #060512;
  color: #fff;
  box-shadow: 0 12px 34px rgba(6,5,18,.28);
  transform: translate(-50%, calc(100% + 30px));
  transition: transform .3s ease;
}
.free-bar.is-visible { transform: translate(-50%, 0); }
.free-bar-text { margin: 0; flex: 1 1 auto; font: 400 14px/1.35 'DM Sans', Arial, sans-serif; }
.free-bar-text strong { font-weight: 700; }
.free-bar-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #ff3150;
  color: #fff !important;
  font: 800 13px/1 'DM Sans', Arial, sans-serif;
  text-decoration: none;
  white-space: nowrap;
}
.free-bar-link:hover { background: #e8213f; }
.free-bar-link:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
html.has-free-bar .footer { padding-bottom: 90px; }

@media (max-width: 620px) {
  .free-bar {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
    padding: 8px 8px 8px 16px;
    border-radius: 18px;
  }
  .free-bar-text span { display: none; }
  .free-bar-link { min-height: 40px; padding: 0 14px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .free-bar { transition: none; }
}

/* ---------- Bundle cards: a proper button instead of the round arrow badge ---------- */
html body .bundle-card .bundle-action { display: block; border-top: 0 !important; padding-top: 22px !important; }
html body .bundle-card .bundle-action span:last-child {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  height: auto !important;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 2px solid #ff3150;
  border-radius: 999px;
  background: transparent !important;
  color: #ff3150 !important;
  font: 800 13px/1 'DM Sans', Arial, sans-serif;
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: none !important;
  transition: background-color .15s, color .15s;
}
html body .bundle-card:hover .bundle-action span:last-child,
html body .bundle-card:focus-visible .bundle-action span:last-child {
  background: #ff3150 !important;
  color: #fff !important;
}
