/* Demo polish pass — mobile shell only. Desktop (xl+) unchanged.
   Reversible: remove this stylesheet link from base.html. */

:root {
  --mv-demo-cta-primary: var(--mv-shell-green, #0c6b34);
  --mv-demo-cta-primary-hover: #0a5a2c;
  --mv-demo-cta-secondary-border: var(--mv-shell-border, rgba(31, 42, 36, 0.12));
}

/* ── 1. Homepage hero: less chrome under sticky shell ── */
@media (max-width: 639px) {
  body.mv-mobile-shell-on .mv-home-v0-hero-grid {
    gap: 1rem !important;
    padding: 0.85rem 1rem 1.25rem !important;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-copy h1,
  body.mv-mobile-shell-on .mv-home-v0-hero-title {
    font-size: 1.85rem !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-copy > p {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    margin-top: 0.5rem !important;
  }

  /* Jump chips compete with bottom nav + section tabs — hide on phone */
  body.mv-mobile-shell-on .mv-home-v0-jump {
    display: none !important;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-cta-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.55rem !important;
    margin-top: 0.85rem !important;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-cta-row .mv-home-v0-btn {
    width: 100% !important;
    justify-content: center !important;
    min-height: 2.75rem !important;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-media {
    margin-top: 0.35rem !important;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-carousel,
  body.mv-mobile-shell-on .mv-home-v0-hero-image {
    max-height: 12.5rem !important;
    object-fit: cover !important;
  }

  body.mv-mobile-shell-on .mv-home-v0-hero-image-wrap,
  body.mv-mobile-shell-on .mv-home-v0-hero-image-wrap--carousel {
    border-radius: 1rem !important;
  }
}

/* ── 2. Business detail: flatten nested desktop card ── */
@media (max-width: 639px) {
  body.mv-mobile-shell-on .mv-listing-detail {
    padding: 0 !important;
    background: #fff !important;
  }

  body.mv-mobile-shell-on .mv-listing-detail__inner {
    max-width: none !important;
  }

  body.mv-mobile-shell-on .mv-listing-detail__inner > .flex.items-center.justify-between {
    padding: 0.65rem 0.85rem 0.35rem !important;
    margin-bottom: 0 !important;
  }

  body.mv-mobile-shell-on .mv-listing-detail__card {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  body.mv-mobile-shell-on .mv-listing-detail__cta {
    position: sticky;
    bottom: calc(var(--mv-shell-bottom-h, 4.25rem) + env(safe-area-inset-bottom, 0px));
    z-index: 20;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom, 0px)) !important;
    border-top: 1px solid var(--mv-demo-cta-secondary-border);
    border-bottom: 0 !important;
    gap: 0.5rem !important;
  }

  body.mv-mobile-shell-on .mv-listing-detail__cta-primary {
    background: var(--mv-demo-cta-primary) !important;
    flex: 1 1 auto;
    justify-content: center;
    min-height: 2.75rem;
  }

  body.mv-mobile-shell-on .mv-listing-detail__cta-primary:hover {
    background: var(--mv-demo-cta-primary-hover) !important;
  }

  body.mv-mobile-shell-on .mv-listing-detail__cta > a:not(.mv-listing-detail__cta-primary) {
    min-height: 2.75rem;
    border-color: var(--mv-demo-cta-secondary-border) !important;
  }
}

/* ── 3. Square feed: drop duplicate entity chip under identity ── */
@media (max-width: 639px) {
  body.mv-mobile-shell-on.mv-village-square-canonical .sqc-feed-card__entity,
  body.mv-mobile-shell-on .sqc-feed-card__entity {
    display: none !important;
  }
}

/* ── 4. CTA consistency: Square change-village + shell accents ── */
@media (max-width: 639px) {
  body.mv-mobile-shell-on .sqc-change-village-btn.btn {
    border-radius: 9999px !important;
    border-color: var(--mv-demo-cta-secondary-border) !important;
    background: #fff !important;
    color: var(--mv-shell-fg, #1f2a24) !important;
    font-weight: 650 !important;
    min-height: 2.25rem !important;
    padding-inline: 0.9rem !important;
    box-shadow: none !important;
  }

  body.mv-mobile-shell-on .mv-mobile-explore-hub__card {
    border-radius: 0.9rem;
  }

  body.mv-mobile-shell-on .mv-home-v0-btn--primary {
    background: var(--mv-demo-cta-primary) !important;
    border-color: var(--mv-demo-cta-primary) !important;
  }
}

/* ── 5. Square title strip: compact under section tabs ── */
@media (max-width: 639px) {
  body.mv-mobile-shell-on .sqc-title-block {
    padding: 0.45rem 0.85rem 0.55rem !important;
    text-align: left !important;
  }

  body.mv-mobile-shell-on .sqc-village-eyebrow {
    letter-spacing: 0.1em !important;
    font-size: 0.65rem !important;
  }

  body.mv-mobile-shell-on .sqc-page-title {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
    margin-top: 0.2rem !important;
  }

  body.mv-mobile-shell-on .sqc-title-actions {
    margin-top: 0.45rem !important;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
  }

  body.mv-mobile-shell-on .sqc-viewed-home-meta,
  body.mv-mobile-shell-on .sqc-title-actions > p {
    font-size: 0.75rem !important;
    width: 100%;
  }
}
