/* templates/marketplace/listing-detail.twig — SEO polish blocks
 *
 * Phase 5 elite editorial polish (2026-05-24). Same blocks, same DOM, same
 * schema selectors — lifted to the marketplace's coherent editorial
 * language: refined byline chips, polished inline body links, FAQ + mesh
 * blocks that match the .mp-faq / .mp-links-mesh treatment on browse pages.
 *
 * Contains:
 *   - Hero byline (Posted by + reading time + last-updated chip strip)
 *   - Inline body link styling (.mp-body-link)
 *   - Per-listing FAQ accordion (.mp-listing-faq) — hairline-list editorial Q&A
 *   - Keep-exploring 2-tile rail (.mp-explore) — category + guide tiles
 *   (Trust footnote .mp-footnote lives in marketplace-listing.css — full-bleed)
 *
 * Split from marketplace-listing.css because that file already passed the
 * 1500-line cap (per CLAUDE.md anti-bloat rule). The hero chrome itself
 * (.mp-hero, .mp-hero__title, .mp-cta-inline, etc.) lives in the parent
 * file — only Phase 4 SEO additions live here.
 */

/* ── BYLINE (under H1, above body) ────────────────────────────────────
 * Magazine-column treatment: small uppercase "Posted by" label, name as
 * bold body, then readtime + updated chips with soft indigo accent on
 * the clock icon. Reads as an article byline, not a metadata strip. */
.mp-hero__byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: -2px 0 16px;
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  line-height: 1.4;
}
.mp-hero__byline-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gray-700);
  font-weight: 500;
}
.mp-hero__byline-name {
  color: var(--color-gray-900);
  font-weight: 700;
  letter-spacing: -0.005em;
}
/* Linked variant — points at the poster's media kit when poster_slug
 * exists. Quiet by default (no underline so the byline rhythm stays
 * intact), indigo + underline on hover/focus to confirm interactivity. */
a.mp-hero__byline-name--link:link,
a.mp-hero__byline-name--link:visited {
  color: var(--color-gray-900);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 150ms ease, border-color 150ms ease;
}
a.mp-hero__byline-name--link:hover,
a.mp-hero__byline-name--link:focus-visible {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
}
.mp-hero__byline-dot {
  width: 3px;
  height: 3px;
  background: var(--color-gray-300);
  border-radius: 50%;
  font-size: 0;
  flex-shrink: 0;
}
.mp-hero__byline-read,
.mp-hero__byline-updated {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-gray-500);
  font-weight: 500;
  letter-spacing: 0.005em;
}
.mp-hero__byline-read i {
  font-size: 0.75rem;
  color: var(--color-primary);
}
.mp-hero__byline-updated i {
  font-size: 0.75rem;
  color: var(--color-gray-400);
}
@media (max-width: 767px) {
  .mp-hero__byline {
    gap: 8px;
    font-size: 0.75rem;
    margin: 0 0 14px;
  }
}

/* ── INLINE BODY LINKS — overlaid onto the listing body by the PHP
 * linkifyDescription pass. Matches the canonical site link rule
 * (typography.css:92): indigo color, NO underline, hover -> indigo-dark.
 * Weight-600 so they stand out from surrounding body copy. */
.mp-hero__body .mp-body-link,
.mp-hero__body a.mp-body-link:link,
.mp-hero__body a.mp-body-link:visited {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease;
}
.mp-hero__body .mp-body-link:hover,
.mp-hero__body .mp-body-link:focus-visible {
  color: var(--color-primary-dark);
  text-decoration: none;
}

/* ── PER-LISTING FAQ — confident card chrome composition (Phase 7, 2026-05-25).
 *
 * Rewrite: prior Phase 6 minimalist hairline-list stripped the card chrome
 * the founder valued. Restored to white-card-per-Q with elevated chrome
 * (18px radius, generous padding, big chevron pill that swaps gray->indigo
 * on open, soft indigo gradient + shadow on the open card). Added a
 * one-line intro under the heading so the block reads as a confident
 * editorial Q&A, not a bare SEO accordion. The card chrome carries the
 * visual weight; the spacing carries the rhythm. */
.mp-listing-faq {
  margin: 80px 0 0;
}
.mp-listing-faq__heading {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-gray-900);
  margin: 0 0 6px;
  letter-spacing: -0.022em;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-listing-faq__heading::before {
  content: 'About this collaboration';
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mp-listing-faq__intro {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-600);
  margin: 0 0 24px;
  max-width: 58ch;
}
.mp-listing-faq__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mp-listing-faq__item {
  background: #fff;
  border: 1px solid var(--color-gray-200);
  border-radius: 18px;
  overflow: hidden;
  transition:
    border-color 180ms ease,
    box-shadow 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mp-listing-faq__item:hover {
  border-color: var(--color-gray-300);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.mp-listing-faq__item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
}
.mp-listing-faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--color-gray-900);
  cursor: pointer;
  list-style: none;
  user-select: none;
  letter-spacing: -0.014em;
  line-height: 1.4;
  transition: color 150ms ease;
}
.mp-listing-faq__q::-webkit-details-marker { display: none; }
.mp-listing-faq__q:hover {
  color: var(--color-primary);
}
.mp-listing-faq__item[open] .mp-listing-faq__q {
  color: var(--color-primary-dark);
  padding-bottom: 14px;
}
.mp-listing-faq__chevron {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-gray-100);
  color: var(--color-gray-600);
  border-radius: 50%;
  font-size: 0.8125rem;
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    background 200ms ease,
    color 200ms ease,
    box-shadow 220ms cubic-bezier(0.22, 1, 0.36, 1);
  flex-shrink: 0;
}
.mp-listing-faq__q:hover .mp-listing-faq__chevron {
  background: var(--color-primary-soft);
  color: var(--color-primary);
}
.mp-listing-faq__item[open] .mp-listing-faq__chevron {
  transform: rotate(180deg);
  background: var(--color-primary);
  color: #fff;
}
.mp-listing-faq__a {
  padding: 0 22px 22px;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-gray-700);
  max-width: 68ch;
}
/* Inline links inside FAQ answers — match the canonical site link rule
 * (typography.css:92): indigo color, NO underline, hover -> indigo-dark.
 * Weight-600 so they stand out from surrounding body copy. */
.mp-listing-faq__a a.mp-listing-faq__link:link,
.mp-listing-faq__a a.mp-listing-faq__link:visited {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 150ms ease;
}
.mp-listing-faq__a a.mp-listing-faq__link:hover,
.mp-listing-faq__a a.mp-listing-faq__link:focus-visible {
  color: var(--color-primary-dark);
  text-decoration: none;
}
@media (max-width: 767px) {
  .mp-listing-faq {
    margin: 56px 0 0;
  }
  .mp-listing-faq__heading {
    font-size: 1.25rem;
    margin-bottom: 4px;
    gap: 6px;
  }
  .mp-listing-faq__heading::before {
    font-size: 0.625rem;
  }
  .mp-listing-faq__intro {
    font-size: 0.875rem;
    margin-bottom: 18px;
  }
  .mp-listing-faq__list {
    gap: 10px;
  }
  .mp-listing-faq__item {
    border-radius: 14px;
  }
  .mp-listing-faq__q {
    padding: 16px 18px;
    font-size: 0.9375rem;
    gap: 12px;
  }
  .mp-listing-faq__item[open] .mp-listing-faq__q {
    padding-bottom: 12px;
  }
  .mp-listing-faq__chevron {
    width: 28px;
    height: 28px;
    font-size: 0.75rem;
  }
  .mp-listing-faq__a {
    padding: 0 18px 18px;
    font-size: 0.875rem;
  }
}

/* ── KEEP EXPLORING — three rich destination cards (Phase 7, 2026-05-25).
 *
 * Rewrite: prior Phase 6 used 2 tiles inside a soft-indigo-wash box that
 * felt isolated from the rest of the page. Restored to 3 destination
 * cards (category, editorial guide, full marketplace) on a clean white
 * background — the card chrome itself does the heavy lifting. Each card
 * has its own icon-squircle giving it a distinct visual role within the
 * indigo accent family. Matches the visual richness of the hero card
 * and similar-listings rail above. */
.mp-explore {
  margin: 80px 0 0;
}
.mp-explore__heading {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--color-gray-900);
  margin: 0 0 6px;
  letter-spacing: -0.022em;
  line-height: 1.15;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-explore__heading::before {
  content: 'Related on CollabPals';
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.mp-explore__intro {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-gray-600);
  margin: 0 0 24px;
  max-width: 58ch;
}
.mp-explore__rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}
@media (min-width: 768px) {
  .mp-explore__rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }
}
.mp-explore__tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px 22px 22px;
  background: #fff;
  border: 1px solid var(--color-gray-200);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  transition:
    transform 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 220ms ease,
    box-shadow 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mp-explore__tile:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.32);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08), 0 3px 8px rgba(79, 70, 229, 0.1);
}
.mp-explore__tile:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}
.mp-explore__tile-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 1.0625rem;
  margin-bottom: 6px;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mp-explore__tile:hover .mp-explore__tile-icon {
  transform: scale(1.05);
}
/* All three tiles use the canonical indigo-as-action palette per the
   design system. Differentiation comes from icon glyph and content,
   not decorative color, so the page stays on-brand. */
.mp-explore__tile-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-primary);
}
.mp-explore__tile-title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  color: var(--color-gray-900);
  letter-spacing: -0.014em;
  line-height: 1.3;
  margin: 0;
}
.mp-explore__tile-sub {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-gray-600);
  margin: 0;
  flex-grow: 1;
}
.mp-explore__tile-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: -0.005em;
  transition: gap 180ms ease;
}
.mp-explore__tile-cta i {
  font-size: 0.75rem;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.mp-explore__tile:hover .mp-explore__tile-cta {
  color: var(--color-primary-dark);
  gap: 11px;
}
.mp-explore__tile:hover .mp-explore__tile-cta i {
  transform: translateX(3px);
}
@media (max-width: 767px) {
  .mp-explore {
    margin: 56px 0 0;
  }
  .mp-explore__heading {
    font-size: 1.25rem;
  }
  .mp-explore__heading::before {
    font-size: 0.625rem;
  }
  .mp-explore__intro {
    font-size: 0.875rem;
    margin-bottom: 18px;
  }
  .mp-explore__tile {
    padding: 20px 18px 18px;
    border-radius: 14px;
    gap: 8px;
  }
  .mp-explore__tile-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  .mp-explore__tile-title {
    font-size: 1rem;
  }
  .mp-explore__tile-sub {
    font-size: 0.8125rem;
  }
}

/* ── Reduced motion ──────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .mp-listing-faq__item,
  .mp-listing-faq__chevron,
  .mp-explore__tile,
  .mp-explore__tile-icon,
  .mp-explore__tile-cta,
  .mp-explore__tile-cta i,
  .mp-hero__body .mp-body-link {
    transition: none !important;
  }
  .mp-explore__tile:hover {
    transform: none !important;
  }
  .mp-explore__tile:hover .mp-explore__tile-icon {
    transform: none !important;
  }
}
