/* RoofRated: fixes for the Pro/Cornerstone theme layer (contrast, spacing, mobile). Loaded site-wide. */
html:root { --cs-gc-primary: #d32f2f; --cs-gc-rose: #d32f2f; --cs-gc-primary-deep: #b71c1c; }
/* Trust marquee: white text on navy */
.cr-trust .cc-trust li, .cr-marquee__track li { color: #fff !important; }
/* Red eyebrow on pink chips */
.cr-eyebrow { color: #b71c1c !important; }
/* "Top-rated roofers by city": same gutter and centering as its grid */
.cr-cities .cr-head { text-align: center; padding: 0 20px; }
.cr-cities .cr-head p { margin-left: auto; margin-right: auto; }
/* Featured (red) service card: readable link */
.cr-svc:first-child .cr-more, .cr-svc:first-child .cr-svc__foot { color: #fff !important; }
/* Mobile menu: light links on a dark panel */
.cc-oc .x-off-canvas-content { background: #13283a !important; }
.cc-oc .x-off-canvas-content .x-anchor-text-primary { color: #fff !important; }
/* Footer: one link style, wrapping bottom row */
.cc-ftr__roofers { line-height: 2; }
.cc-ftr__roofers a { color: #c7d2dc !important; text-decoration: none; }
.cc-ftr__roofers a:hover { color: #fff !important; }
.cc-ftr__bottom .x-menu, .cc-ftr__bottom ul { flex-wrap: wrap !important; row-gap: 6px; }
@media (max-width: 640px) {
  .cc-ftr__bottom { flex-direction: column; align-items: flex-start; }
  .cc-ftr__bottom .x-menu-inline { width: 100% !important; max-width: 100%; justify-content: flex-start; }
  /* Sticky "Get matched" bar: keep content clear of it */
  body.rr-has-callbar { padding-bottom: 84px; }
  .cr-callbar.is-hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
  .cr-callbar { transition: transform .25s, opacity .25s; }
}
body:has(.rr-list .rr-card) .cr .rr-empty { display: none; }
/* Theme wrappers use overflow:hidden, which breaks sticky maps/filters; clip keeps the same look. */
.x-root, .x-site, .x-main, .site, #x-root, #x-site { overflow-x: clip !important; overflow-y: visible !important; }
/* Button standard (theme buttons): centered text; buttons in the same group share width and height. */
.x-anchor-button .x-anchor-content, .cr-btn { justify-content: center !important; text-align: center !important; }
*:has(> .x-anchor-button + .x-anchor-button), *:has(> .cr-btn + .cr-btn) { display: inline-grid !important; max-width: 100%; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; align-items: stretch; }
*:has(> .x-anchor-button + .x-anchor-button) > .x-anchor-button, *:has(> .cr-btn + .cr-btn) > .cr-btn { width: 100%; margin: 0 !important; }
@media (max-width: 640px) {
  *:has(> .x-anchor-button + .x-anchor-button), *:has(> .cr-btn + .cr-btn) { grid-auto-flow: row; }
}

/* Home hero: "Free for homeowners" pill inherited black text on the dark photo. */
.cr-hero .cr-hero__copy { color: #fff; }
.cr-hero .cr-live { color: #fff !important; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .28); }

/* Home service cards: bigger, high-contrast line icons (emoji are swapped for SVG in copy.php). */
.cr-svc .cr-svc__icon { width: 4rem !important; height: 4rem !important; border-radius: 16px !important; background: #fdecea !important; color: #d32f2f; margin-bottom: .75rem !important; }
.cr-svc .cr-svc__icon svg { width: 2.1rem; height: 2.1rem; }
.cr-bento > :first-child .cr-svc .cr-svc__icon { background: #fff !important; color: #d32f2f; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, .35); }

/* Home city map (injected in copy.php) */
.cr-cities .rr-homemap { width: min(1200px, 100% - 32px); margin: 1.5rem auto 2rem; }
.cr-cities .rr-homemap .rr-citymap__hint { text-align: center; }

/* Gravity Forms: RoofRated form card (add company, contact). */
.rr-gform { background: #fff; border: 1px solid #e1e5ea; border-radius: 16px; padding: 28px; box-shadow: 0 18px 40px -28px rgba(19, 40, 58, .35); }
.rr-gform .gform-theme--framework { --gf-ctrl-border-color: #cfd6dd; --gf-ctrl-border-color-focus: #d32f2f; --gf-ctrl-outline-color-focus: rgba(211, 47, 47, .18); --gf-color-primary: #d32f2f; --gf-radius: 10px; }
.gform-theme--framework .gform_fields { row-gap: 18px !important; column-gap: 16px !important; }
.gform-theme--framework .gfield { margin-bottom: 0 !important; }
.rr-gform .gfield_label { font-size: 15px !important; font-weight: 600 !important; color: #13283a !important; margin-bottom: 6px !important; }
.rr-gform .gfield_required, .rr-gform .gfield_required_text { color: #d32f2f !important; font-size: 0 !important; }
.rr-gform .gfield_label > .gfield_required::after { content: "*"; font-size: 15px; margin-left: 2px; }
.rr-gform input[type="text"], .rr-gform input[type="email"], .rr-gform input[type="tel"], .rr-gform input[type="url"], .rr-gform select, .rr-gform textarea { width: 100% !important; min-height: 48px; padding: 11px 14px !important; font-size: 16px !important; color: #13283a !important; background: #fff !important; border: 1px solid #cfd6dd !important; border-radius: 10px !important; box-shadow: none !important; transition: border-color .15s, box-shadow .15s; }
.rr-gform select { height: auto !important; line-height: 1.4 !important; padding-right: 36px !important; }
.rr-gform textarea { min-height: 110px; }
.rr-gform input::placeholder, .rr-gform textarea::placeholder { color: #8a96a3; }
.rr-gform input:focus, .rr-gform select:focus, .rr-gform textarea:focus { outline: none !important; border-color: #d32f2f !important; box-shadow: 0 0 0 4px rgba(211, 47, 47, .15) !important; }
.rr-gform .gfield_description { margin-top: 6px !important; font-size: 13px !important; line-height: 1.45; color: #5f6b77 !important; }
.rr-gform .gfield_error input, .rr-gform .gfield_error select, .rr-gform .gfield_error textarea { border-color: #b3261e !important; }
.rr-gform .validation_message, .rr-gform .gfield_validation_message { font-size: 13px !important; margin-top: 6px !important; }
.rr-gform .gform_footer { margin-top: 22px !important; padding: 0 !important; }
.rr-gform .gform_footer input[type="submit"], .rr-gform .gform_footer button { width: 100% !important; min-height: 52px; justify-content: center; text-align: center; font-size: 17px !important; font-weight: 700 !important; color: #fff !important; background: #d32f2f !important; border: 0 !important; border-radius: 10px !important; cursor: pointer; }
.rr-gform .gform_footer input[type="submit"]:hover, .rr-gform .gform_footer button:hover { background: #b3261e !important; }
.rr-gform .gform_confirmation_message { padding: 18px; border-radius: 10px; background: #e8f5ee; color: #13283a; }
@media (max-width: 640px) { .rr-gform { padding: 20px 16px; } .rr-gform .gfield { grid-column: 1 / -1 !important; } }

/* Contact page (Cornerstone): centered info cards; Gravity Forms contact form inside the form card. */
.rr-p-contact .cc-block--grid .x-text, .rr-p-contact .cc-block--grid h3, .rr-p-contact .cc-block--grid p { text-align: center; }
.rr-p-contact .cc-form-card .rr-gform { border: 0; box-shadow: none; padding: 0; background: none; }
.rr-p-contact .cc-form-card { width: min(760px, 100%); margin-inline: auto !important; }

/* Business Info cards (Contact page: Call, Visit, Hours) with nothing filled in are hidden instead of showing
   a heading over a blank box. The plugin's inline script also drops the section once all its cards are gone,
   and blank buttons. Ported from House Repair Pro 0.5.4–0.5.5. */
.cc-card:has(> .cc-t:empty):has(> .cc-btn > .x-anchor-content:empty),
.cc-card:has(.cc-address:empty),
.cc-card:has(dl.cc-hours:empty):not(:has(.cc-hours-note)) { display: none; }
.cc-btn:has(> .x-anchor-content:empty) { display: none; }
/* Buttons built from an empty Business Info field ("Call" → tel: with no number) go nowhere: hide them. */
a[href="tel:"], a[href="mailto:"] { display: none !important; }
