/*
 * USO quote form styles (wp-content/mu-plugins/uso-leads/quote.css)
 * Loaded by uso-leads.php only on /pages/get-a-quote and /pages/contact (the pages with the Zoho Forms iframe).
 * Ported from the live Shopify quote page body (uso-quote-fix, uso-quote-mobile-fold, uso-quote-desktop-fold).
 */

/* Keep the live-chat widget from covering the Submit button on the form pages only (same rule as the old site).
   The chat stays active on every other page. */
#zsiq_float, .zsiq_floatmain, #siqiframe, .siqembed, div[id^="zsiq"], div[id^="siq"] {
  display: none !important;
  visibility: hidden !important;
}

/* Form frame height (measured on the live site 2026-08-27 at the real iframe widths):
   desktop 1250px for a ~1131px-wide frame; phones 1360px (worst case 1270px with all required-field errors).
   Since 2026-10-28 these are only the starting heights: quote-loader.js then sets the height the form reports
   (2026-10-28: 1107px at 347px wide, 1260px at 1131px) plus a margin for error lines. Desktop raised 1250 -> 1320px
   the same day (the form now reports 1260px there), for the paths where the form sends no height. */
#getaquote { width: 100% !important; height: 1320px !important; display: block; border: none; }
@media (max-width: 749px) { #getaquote { height: 1360px !important; } }
/* The contact page shows the form in a narrow column, where it lays out like the phone version. */
.uso-quote-form--contact #getaquote { height: 1360px !important; }

/* Intro box (same look as the old quote page). */
#uso-quote-intro {
  max-width: 900px; margin: 0 auto 22px; padding: 18px 20px;
  border: 1px solid #d8e0ea; border-left: 4px solid #1a4f9c; border-radius: 6px;
  background: #f6f9fc; font-size: 16px; line-height: 1.55; color: #1f2933;
}
#uso-quote-intro strong { color: #12386e; }
#uso-quote-intro .uso-alt {
  display: block; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid #e2e8f0; font-size: 15px; color: #47515c;
}
#uso-quote-intro a { color: #1a4f9c; font-weight: 600; text-decoration: underline; }

/* Above-the-fold: the generic page template adds 140px of empty space above the content
   (inline style on main.uso-page). On the form pages the form should start as high as possible. */
main.uso-page { padding-top: 32px !important; }
@media (min-width: 750px) {
  .uso-quote-hero { padding: 36px 40px !important; margin-bottom: 20px !important; }
  .uso-quote-hero .uso-quote-hero__title { font-size: 38px !important; }
  .uso-quote-hero__sub { margin-bottom: 18px !important; }
  #uso-quote-intro { padding: 12px 18px; margin-bottom: 14px; line-height: 1.45; }
  #uso-quote-intro .uso-alt { margin-top: 8px; padding-top: 8px; }
}
@media (max-width: 749px) {
  main.uso-page { padding-top: 12px !important; }
  main.uso-page .uso-page__container { padding: 0 14px !important; }
  /* Tighter spacing so the form starts higher on phones (old site: form top at 489px on a 375px screen).
     The hero sub-line is hidden on phones only: the intro box right below says the same thing. */
  .uso-quote-hero { padding: 14px 14px 12px !important; margin-bottom: 12px !important; border-radius: 14px !important; }
  .uso-quote-hero::before, .uso-quote-hero::after { display: none !important; }
  .uso-quote-hero__eyebrow { margin-bottom: 6px !important; padding: 3px 10px !important; font-size: 10px !important; }
  .uso-quote-hero .uso-quote-hero__title { font-size: 21px !important; margin-bottom: 8px !important; }
  .uso-quote-hero__sub { display: none !important; }
  .uso-quote-hero__points { flex-direction: row !important; flex-wrap: wrap !important; justify-content: center !important; gap: 2px 12px !important; }
  .uso-quote-hero__point { font-size: 12px !important; gap: 5px !important; }
  .uso-quote-hero__check { width: 16px !important; height: 16px !important; font-size: 9px !important; }
  #uso-quote-intro { padding: 10px 12px; margin-bottom: 12px; font-size: 14px; line-height: 1.42; }
  #uso-quote-intro .uso-alt { margin-top: 6px; padding-top: 6px; font-size: 13px; }
}

/* "Your quote: <product>" (uso_leads_quote_for_html(), quote page only). Desktop: just the product line, right above
   the form. Phones: the product line, the reply promise and the toll-free line in one box, then the form; the hero
   (with the H1) and the intro box move below the form. Paid phone visitors who clicked REQUEST QUOTE finished the
   form far less often than desktop ones (Shopify: 20% vs 50%), and on phones only the first field was in view. */
.uso-quote-for { max-width: 900px; margin: 0 auto 12px; }
.uso-quote-for p { margin: 0; }
.uso-quote-for__item { font-size: 17px; line-height: 1.4; color: #1f2933; overflow-wrap: anywhere; }
.uso-quote-for__item span { color: #47515c; font-weight: 600; margin-right: 2px; }
.uso-quote-for__item strong { color: #12386e; }
.uso-quote-for__note, .uso-quote-for__call, .uso-quote-for--generic { display: none; }
@media (max-width: 749px) {
  .uso-quote-page { display: flex; flex-direction: column; }
  .uso-quote-page > .uso-quote-for { order: 1; }
  .uso-quote-page > .uso-quote-form { order: 2; }
  .uso-quote-page > .uso-quote-hero { order: 3; margin: 18px 0 12px !important; }
  .uso-quote-page > #uso-quote-intro { order: 4; }
  .uso-quote-for, .uso-quote-for--generic {
    display: block; margin: 0 0 10px; padding: 10px 12px;
    border: 1px solid #d8e0ea; border-left: 4px solid #1a4f9c; border-radius: 6px; background: #f6f9fc;
  }
  .uso-quote-for__item { font-size: 16px; }
  .uso-quote-for__note, .uso-quote-for__call { display: block; margin-top: 3px; font-size: 14px; line-height: 1.45; color: #47515c; }
  .uso-quote-for__call a { color: #1a4f9c; font-weight: 700; text-decoration: underline; white-space: nowrap; }
}

/* Contact page (theme template page-contato.php; this file is only loaded on the form pages): the banner was
   sized for a short form. With the taller quote form, keep the title at the top and the photo beside it. */
@media (min-width: 991px) {
  .s-bannercontato { align-items: flex-start !important; }
  .s-bannercontato .photo { position: sticky; top: 64px; }
  .s-bannercontato .container .info { padding: 48px 0 40px; }
}
@media (max-width: 990px) {
  /* Phones/tablets: the decorative photo (320px tall) would push the form below the first screen. */
  .s-bannercontato .photo { display: none !important; }
  .s-bannercontato .container .info { padding: 8px 0 32px; }
}

/* Contact page: short copy and direct lines above the form (inside the theme's banner column). */
.uso-contact-direct { margin: 0 0 16px; font-size: 16px; line-height: 1.55; color: #1f2933; }
.uso-contact-direct p { margin: 0 0 8px; }
.uso-contact-direct ul { list-style: none; margin: 0 0 4px; padding: 0; }
.uso-contact-direct li { margin: 0 0 6px; }
.uso-contact-direct a { color: #1a4f9c; font-weight: 600; text-decoration: underline; }

/* 'Loading the quote form' note shown over the empty form box until the Zoho form has loaded (quote-loader.js
   removes it on the form's load event, or after 20 s at the latest). */
.uso-quote-form { position: relative; }
#uso-quote-loading {
  position: absolute; top: 28px; left: 0; right: 0; z-index: 1;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 16px; color: #47515c; pointer-events: none;
}
#uso-quote-loading::before {
  content: ""; width: 18px; height: 18px; border-radius: 50%;
  border: 3px solid #c9d6e6; border-top-color: #1a4f9c; animation: uso-quote-spin .8s linear infinite;
}
@keyframes uso-quote-spin { to { transform: rotate(360deg); } }
