/* CPSG page (site 718, group 381647): phone layout. Only applies on the page with the job search box.
   Each group becomes a compact row (small logo, name and description), and the banner fits the screen.
   Desktop is unchanged. To undo: remove the cpsg-mobile.css line from the template head. Hubb, Nov 2026. */
@media (max-width: 600px) {
  body:has(#cpsg-search) section.TW_overlap-container.LogoArea2023 { grid-template-columns: minmax(0, 1fr); }
  body:has(#cpsg-search) section.TW_overlap-container.LogoArea2023 .TW_overlap-item,
  body:has(#cpsg-search) section.TW_overlap-container.LogoArea2023 .TW_CP_banner { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  body:has(#cpsg-search) section.TW_overlap-container.LogoArea2023 img.TW_CP_banner-image { width: 100%; max-width: 100%; height: auto; }
  body:has(#cpsg-search) section.TW_overlap-container.LogoArea2023 div.TW_CP_logo-container,
  body:has(#cpsg-search) section.LogoFooter2023 > div,
  body:has(#cpsg-search) section.LogoFooter2023 div.TW_CP_logo-container { width: auto; max-width: calc(100% - 20px); }
  body:has(#cpsg-search) section.TW_overlap-container.LogoArea2023 img.TW_CP_logo--TW,
  body:has(#cpsg-search) section.LogoFooter2023 img { width: 100%; max-width: 300px; height: auto; }

  body:has(#cpsg-search) section.TW_CP_section { padding: 40px 0 32px; }
  body:has(#cpsg-search) section.TW_CP_section > section { gap: 0; margin-top: 16px; padding: 8px 12px 0; }
  body:has(#cpsg-search) section.TW_CP_section > section > div { display: grid; grid-template-columns: 76px 1fr; column-gap: 14px; align-items: start; width: 100%; max-width: none; margin: 0; padding: 14px 0; text-align: left; border-top: 1px solid rgba(255, 255, 255, 0.15); box-sizing: border-box; }
  body:has(#cpsg-search) section.TW_CP_section > section > div:first-child { border-top: 0; }
  body:has(#cpsg-search) section.TW_CP_section > section > div > .TW_CP_logo-container { grid-row: 1 / span 4; width: 76px; height: 76px; margin: 0; border-width: 4px; box-sizing: border-box; }
  body:has(#cpsg-search) section.TW_CP_section > section > div > .TW_CP_logo-container img { width: 100% !important; height: 100% !important; margin: 0 !important; float: none !important; object-fit: contain; }
  body:has(#cpsg-search) section.TW_CP_section > section > div > h4 { margin: 2px 0 4px; font-size: 18px; line-height: 1.3; text-align: left; }
  body:has(#cpsg-search) section.TW_CP_section > section > div > p { margin: 0; text-align: left; font-size: 15px; line-height: 1.45; }
  body:has(#cpsg-search) section.TW_CP_section > section > .cpsg-empty,
  body:has(#cpsg-search) section.TW_CP_section > section > div > p.cpsg-empty { display: none; }
  body:has(#cpsg-search) section.TW_CP_section > section.LogoFooter2023 > div { display: block; width: 100%; max-width: none; margin: 0; padding: 0; border-top: 0; }
  body:has(#cpsg-search) section.TW_CP_section > section.LogoFooter2023 > div > .TW_CP_logo-container { width: calc(100% - 20px); max-width: 360px; height: auto; margin: 0 auto; border-width: 0; }
  body:has(#cpsg-search) section.TW_CP_section > section.LogoFooter2023 > div > .TW_CP_logo-container img { width: 100% !important; max-width: 340px; height: auto !important; }
}
