/* Tuotu Astro-projektista: src/styles/mobile/hinnasto.css (bin/sync-astro.py). */
/* Mobile round (Tapio, 2026-09-25): The pricing pages (/hinnasto/, /hakukoneoptimointi-hinta/, /en/pricing/, /en/seo-pricing/) on phones: order, price section, tighter lists.
   Loaded after wp.css (src/layouts/Site.astro). Phone and tablet rules only: desktop stays as it is. */

/* Phones: the pricing pages' blocks tighter and in one clear order. ID selectors
   (#hinnat, #sisalto, unique on these pages; on the English ones #prices and
   #whats-included, in the same :is() so the weight stays an id's)
   outrank the components' scoped rules; !important only where the component or
   global rule already has it. */
@media (max-width: 767px) {
  /* Hero (PricingHero.astro): the portrait smaller, less air under it. */
  .pricing-hero .split-hero-card { padding: 0.5rem 0 2.5rem !important; }
  .pricing-hero .split-hero-card img { max-height: 12rem !important; }

  /* Price section (PriceEstimator.astro): the monthly service over the custom quote, the
     columns' content on the page gutter like the intro above it. */
  :is(#hinnat, #prices) .est-intro { padding: 3rem 0 1.5rem; }
  :is(#hinnat, #prices) :is(.est-strip, .est-pick, .est-price, .est-options, .est-foot) { padding-inline: 0; }
  :is(#hinnat, #prices) .est-strip { min-height: 2.25rem; }
  :is(#hinnat, #prices) .est-pick { padding-block: 1.1rem 0.75rem; }
  :is(#hinnat, #prices) .est-pick::after { content: none; }
  :is(#hinnat, #prices) .est-name { font-size: 1.25rem; }
  :is(#hinnat, #prices) .est-col.is-full .est-name { font-size: 1.45rem; }
  :is(#hinnat, #prices) .est-pitch { margin-top: 0.15rem; font-size: 0.98rem; }
  :is(#hinnat, #prices) .est-price { padding-block: 0 1.25rem; }
  :is(#hinnat, #prices) .est-price .est-amount { font-size: 1.6rem; }
  :is(#hinnat, #prices) .est-col.is-full .est-price .est-amount { font-size: 2rem; }
  :is(#hinnat, #prices) .est-options { gap: 1.25rem; padding-block: 0 1.25rem; }
  :is(#hinnat, #prices) .est-foot { padding-bottom: 1.5rem; }
  :is(#hinnat, #prices) .est-includes { gap: 0.6rem; }
  /* Cases. */
  :is(#hinnat, #prices) .est-cases { padding: 2.5rem 0 3rem; }
  :is(#hinnat, #prices) .est-cases-title { font-size: 1.3rem; }
  :is(#hinnat, #prices) .est-case-list { column-gap: 1.5rem; }
  :is(#hinnat, #prices) .est-case-body { gap: 0.75rem; padding: 1.25rem; }
  :is(#hinnat, #prices) .est-fig strong { font-size: 1.75rem; }

  /* Services table (ServiceFeatures.astro): the tabs pinned under the fixed header while
     the table scrolls; --svc-stick is the header's visible height (its script). */
  :is(#sisalto, #whats-included) .svc-intro { padding-top: 3rem; }
  :is(#sisalto, #whats-included):not(.is-tabbed) .svc-intro { padding-bottom: 1.25rem; }
  :is(#sisalto, #whats-included).is-tabbed .svc-tabbar {
    position: sticky;
    top: var(--svc-stick, 0px);
    z-index: 20;
    margin-top: 1.25rem;
    padding: 0.5rem 0;
    background: var(--gh-bg);
    box-shadow: 0 1px 0 var(--svc-rule);
    transition: top 0.25s ease;
  }
  :is(#sisalto, #whats-included) .svc-tabs { width: 100%; padding: 0.25rem; }
  :is(#sisalto, #whats-included) .svc-tab { flex: 1 1 0; padding: 0.45rem 0.5rem; font-size: 0.95rem; }

  /* The article and reference card lists at the end of the pricing pages, tighter. */
  body.is-pricing .wp-cards.is-compact .icon-card { padding-block: 1.25rem; }
  body.is-pricing main .wp-cards .icon-card .wp-card-title:where(:not(.tk-sec, .tk-sec *, .tk-results, .tk-results *, .tk-fp-hero, .tk-fp-hero *)) { max-width: none; margin-bottom: 0.75rem; font-size: 1.15rem !important; }
  body.is-pricing .wp-cards .icon-card .icon-card-label { margin-bottom: 0.6rem; }
}

@media (max-width: 767px) and (prefers-reduced-motion: reduce) {
  :is(#sisalto, #whats-included) .svc-tabbar { transition: none; }
}

/* Services table rows: block rows start at 760 px (global.css .compare-table--rails,
   ServiceFeatures.astro), so these follow that breakpoint. Title over text, tight
   (Tapio: "On big lists like in hinnasto make it tighter so it's easier to read"). */
@media (max-width: 760px) {
  :is(#sisalto, #whats-included) tbody tr { padding: 0.55rem 0; }
  :is(#sisalto, #whats-included) tbody th { margin-bottom: 0.1rem; font-size: 1rem; line-height: 1.3; }
  :is(#sisalto, #whats-included) tbody td { font-size: 0.95rem !important; line-height: 1.4 !important; }
  :is(#sisalto, #whats-included) tbody tr.svc-group { padding: 1.75rem 0 0.35rem; }
  :is(#sisalto, #whats-included) tbody:first-of-type tr.svc-group { padding-top: 1rem; }
  :is(#sisalto, #whats-included) tbody tr.svc-group::after { content: none; }
  :is(#sisalto, #whats-included) .svc-group th { font-size: 1.1rem; line-height: 1.3; }
  :is(#sisalto, #whats-included) .svc-note { padding-block: 1.25rem 2.5rem; }
}
