/* InfinityCTI 2026 — Divi compatibility layer.
   Loads before site.css. Neutralises Divi defaults inside the redesign's
   sections (.icti-raw) and the Theme Builder header/footer, so the design
   system in site.css behaves exactly as in the approved prototype. */

body.icti-2026 { font-size: 16px; line-height: normal; font-weight: 400; color: #0b1b33; background: #f4f6f5; }
body.icti-2026 #page-container { padding-top: 0 !important; margin-top: 0 !important; overflow: visible; overflow-x: clip; }
body.icti-2026 #main-content,
body.icti-2026 .et-l--header,
body.icti-2026 .et-l--footer { background: transparent; }
body.icti-2026 .et_pb_section.icti-raw { padding: 0 !important; margin: 0 !important; background: transparent; display: block; }
body.icti-2026 .icti-raw .et_pb_module,
body.icti-2026 .icti-raw .et_pb_code_inner { margin: 0 !important; padding: 0; width: 100%; max-width: none; }

/* Sticky header: the Theme Builder wrapper sticks, the utility bar scrolls away */
body.icti-2026 .et-l--header { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) - 36px); z-index: 80; }
body.icti-2026 .et-l--header .header { position: relative; top: auto; }
@media (max-width: 650px) {
  body.icti-2026 .et-l--header { top: calc(var(--wp-admin--admin-bar--height, 0px) - 42px); }
}
@media (max-width: 600px) {
  body.icti-2026.admin-bar .et-l--header { top: -42px; } /* WP admin bar is not fixed on small screens */
}

/* Typography resets. :where() keeps specificity at one element so these beat
   Divi's element rules (h1, p…) but never the design system's class rules. */
:where(body.icti-2026 .icti-raw, body.icti-2026 .et-l--header, body.icti-2026 .et-l--footer) :is(h1, h2, h3, h4, h5, h6) { padding: 0; line-height: normal; font-weight: 700; color: inherit; }
:where(body.icti-2026 .icti-raw, body.icti-2026 .et-l--header, body.icti-2026 .et-l--footer) p { padding-bottom: 0; }
/* Divi styles lists with higher specificity (.et-l--header ul, .entry-content ul); values match site.css */
body.icti-2026 .icti-raw :is(ul, ol),
body.icti-2026 .et-l--header :is(ul, ol),
body.icti-2026 .et-l--footer :is(ul, ol) { padding: 0; list-style: none; line-height: inherit; }
body.icti-2026 .icti-raw p:last-of-type { padding-bottom: 0; }
:where(body.icti-2026 .icti-raw) blockquote { margin: 0; padding: 0; border: 0; }
:where(body.icti-2026 .icti-raw) figure { margin: 0; }

/* Tables */
body.icti-2026 .icti-raw table { margin: 0; border: 0; border-radius: 0; }
body.icti-2026 .icti-raw table th,
body.icti-2026 .icti-raw table td { border-left: 0; border-right: 0; border-bottom: 0; }
body.icti-2026 .icti-raw .data-table th { padding: 18px 26px; border-top: 0; }
body.icti-2026 .icti-raw .data-table td { padding: 22px 26px; border-top: 1px solid var(--line); }

/* Form controls */
body.icti-2026 .icti-raw :is(input, textarea, select) { font-size: 15px; box-shadow: none; }
body.icti-2026 .icti-raw .field input:not([type="radio"]),
body.icti-2026 .icti-raw .field select { padding: 0 14px; }
body.icti-2026 .icti-raw .field textarea { padding: 13px 14px; }

/* Visual Builder: show everything immediately */
.et-fb .reveal, .et-fb-root-ancestor .reveal { opacity: 1 !important; transform: none !important; }

/* Adjacent-section rules from site.css, adapted to Divi's section wrappers */
body.icti-2026 .icti-raw:has(.applications) + .icti-raw .section.tight { padding-top: 0; }
