/* Streamline Industrial universal responsive fit pass
   2026-09-16
   Purpose: preserve current visual theme while preventing horizontal overflow,
   image clipping, oversized forms, Turnstile/button collisions, and desktop/mobile layout breakage.
*/

:root {
  --sl-page-gutter: clamp(16px, 3vw, 36px);
  --sl-content-max: 1440px;
}

/* Foundation */
html {
  box-sizing: border-box;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}

img,
video {
  height: auto;
}

iframe {
  max-width: 100%;
}

/* Keep existing site containers fluid instead of allowing hard-width overflow. */
.wrap,
.container {
  width: min(calc(100% - (var(--sl-page-gutter) * 2)), var(--sl-content-max));
  max-width: var(--sl-content-max);
  margin-left: auto;
  margin-right: auto;
}

main,
section,
header,
footer,
nav,
.contact,
.contact-panel,
.form-panel,
.split,
.grid,
.cards,
.service-grid,
.contact-grid,
.hero,
.hero-inner,
.header-inner,
.nav-inner {
  min-width: 0;
}

/* Grid/flex children are allowed to shrink instead of forcing overflow. */
.grid > *,
.cards > *,
.service-grid > *,
.contact > *,
.contact-grid > *,
.split > *,
.hero > *,
.hero-inner > *,
.header-inner > *,
.nav-inner > * {
  min-width: 0;
}

/* Form controls should always stay inside their panel. */
form,
form input,
form textarea,
form select,
form button {
  max-width: 100%;
}

form input,
form textarea,
form select {
  width: 100%;
}

/* Prevent long email addresses / URLs from widening cards. */
a,
p,
li,
span,
strong,
small,
h1,
h2,
h3,
h4 {
  overflow-wrap: anywhere;
}

textarea {
  resize: vertical;
}

/* Turnstile responsive layout.
   The markup is also patched to request Cloudflare's flexible widget size. */
#support-request-form .cf-turnstile,
#support-request-form [data-sitekey] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 18px 0 16px;
  overflow: hidden;
}

#support-request-form .cf-turnstile > div,
#support-request-form .cf-turnstile iframe {
  max-width: 100% !important;
}

#support-request-form button[type="submit"],
#support-request-form .btn[type="submit"] {
  position: static !important;
  display: inline-flex;
  width: auto;
  max-width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 0;
  white-space: normal;
}

/* Contact form: widget and button get their own rows so they can never overlap. */
#support-request-form {
  display: block;
}

#support-request-form .form-status {
  width: 100%;
  margin-top: 12px;
}

/* Preserve full office / company-presence images on differing desktop aspect ratios. */
.company-photo img,
.company-presence img,
[data-company-presence] img,
img[src*="company-presence"],
img[src*="office-lobby"] {
  width: 100%;
  height: auto !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: center center !important;
}

/* Cards can still use cropped imagery where the site's existing design expects it. */
.card img,
.service-card img {
  width: 100%;
}

/* Hero typography scales instead of blowing past medium/small monitors. */
.hero h1,
main h1 {
  font-size: clamp(2.35rem, 5.2vw, 5.75rem);
  line-height: 0.98;
}

main h2,
.section h2 {
  font-size: clamp(1.8rem, 3vw, 3.5rem);
  line-height: 1.06;
}

/* Wide desktop / ultrawide */
@media (min-width: 1800px) {
  :root {
    --sl-content-max: 1500px;
  }
}

/* Standard laptops and narrow desktop windows */
@media (max-width: 1200px) {
  .contact,
  .split,
  .automation-service-hero-grid,
  .automation-section-grid {
    gap: clamp(22px, 3vw, 36px);
  }

  header .wrap,
  .header-inner,
  .nav-inner {
    min-width: 0;
  }

  nav,
  .nav,
  .main-nav {
    min-width: 0;
  }
}

/* Tablet */
@media (max-width: 900px) {
  .contact,
  .split,
  .automation-service-hero-grid,
  .automation-section-grid,
  .automation-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .contact-panel,
  .form-panel {
    width: 100%;
  }

  .hero {
    min-height: auto;
  }

  .hero-actions,
  .actions {
    flex-wrap: wrap;
  }

  .hero-actions .btn,
  .actions .btn {
    max-width: 100%;
  }

  #support-request-form button[type="submit"],
  #support-request-form .btn[type="submit"] {
    width: 100%;
  }
}

/* Phones */
@media (max-width: 640px) {
  :root {
    --sl-page-gutter: 14px;
  }

  body {
    font-size: 16px;
  }

  .wrap,
  .container {
    width: min(calc(100% - 28px), var(--sl-content-max));
  }

  .contact-grid,
  .grid,
  .cards,
  .service-grid,
  .automation-capability-grid,
  .automation-detail-grid {
    grid-template-columns: 1fr !important;
  }

  .hero h1,
  main h1 {
    font-size: clamp(2.1rem, 12vw, 3.5rem);
  }

  main h2,
  .section h2 {
    font-size: clamp(1.65rem, 8vw, 2.5rem);
  }

  #support-request-form .cf-turnstile,
  #support-request-form [data-sitekey] {
    width: 100% !important;
  }

  #support-request-form button[type="submit"],
  #support-request-form .btn[type="submit"] {
    width: 100%;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  :root {
    --sl-page-gutter: 10px;
  }

  .wrap,
  .container {
    width: calc(100% - 20px);
  }

  .btn,
  button {
    max-width: 100%;
    white-space: normal;
  }
}

/* STREAMLINE SURGICAL LAYOUT FIX 2026-09-17 */
#support-request-form button[type="submit"],
#support-request-form .btn[type="submit"] {
  align-self: start !important;
  height: auto !important;
  min-height: 52px !important;
  padding: 14px 22px !important;
  border-radius: 999px !important;
  font-family: inherit !important;
  font-size: 1rem !important;
  line-height: 1.1 !important;
}

@media (min-width: 881px) and (max-width: 1180px) {
  .nav-inner {
    gap: 12px !important;
  }

  .brand {
    min-width: 0 !important;
    gap: 10px !important;
  }

  header .brand img,
  .brand img {
    width: auto !important;
    height: 68px !important;
    max-height: 68px !important;
  }

  .brand span {
    font-size: 1rem !important;
  }

  .nav-links {
    gap: 10px !important;
    font-size: .88rem !important;
  }

  .nav-call {
    display: none !important;
  }

  #employee-portal-login.streamline-portal-login-btn {
    min-height: 40px !important;
    margin-left: 0 !important;
    padding-inline: 15px !important;
    font-size: .9rem !important;
  }
}
