/*
 * Bootstrap rules beyond the grid, extracted from the live homepage's
 * stylesheet — only the ones a replicated block has been shown to depend on.
 *
 * Same source and reasoning as grid.css: taken from the LiteSpeed UCSS bundle
 * (wordpress/live/2022-home/styles.css), Bootstrap as the live site applies
 * it. Add a rule here when a block's measurements trace a difference to it,
 * not speculatively.
 */

/* Reboot. Without it an inline <img> sits on the baseline and its line box
 * adds a descender gap under it — 6px of extra height under footer_cta's
 * product image. */
img,svg{vertical-align:middle}
/* Reboot: form controls inherit the page's font instead of the browser's own.
 * Without this a <button> falls back to 13.333px, which makes Content Module
 * 1's indicator rows 10px taller than live. */
button,input,select{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}
/* Reboot: the hand cursor. A <button> shows the arrow without this one. */
[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}

/* Reboot's page background (--bs-body-bg is #fff, from grid.css). Sections
 * without a background of their own, like the logo carousel, show the page —
 * white on live, the app's grey --bg without this. Only the background is
 * taken from Bootstrap's body rule; nothing else in it has shown up in a
 * measurement. */
body{background-color:var(--bs-body-bg)}

/* Lists. Theme blocks put <ul> inside sections — the products card's feature
 * lists — and without reboot they keep the browser's own 1em top margin and
 * 40px indent: 16px of extra height in that card, traced by measuring it
 * against live. */
dl,ol,ul{margin-top:0;margin-bottom:1rem}
ol,ul{padding-left:2rem}

/* Carousel. content_module_2.php gives its slider wrapper Bootstrap's
 * `carousel` class, and only this rule of Bootstrap's carousel reaches it —
 * the slide stacking itself is stacked-slider.css. (app/globals.css renamed
 * its own .carousel to ab- so the two no longer collide.) */
.carousel{position:relative}

/* Modal. footer_cta.php appends a video modal after EVERY footer CTA — the
 * template builds the video markup before it checks the variation, so a
 * product or simple footer carries a hidden, empty one too. Bootstrap is what
 * hides it; without these rules it renders as a visible box under the section.
 * components/blocks/VideoModalBehaviour.tsx stands in for Bootstrap's JS. */
.fade{transition:opacity .15s linear}
@media (prefers-reduced-motion:reduce){.fade{transition:none}}
.fade:not(.show){opacity:0}
.modal{display:none}
.modal{position:fixed;top:0;left:0;z-index:1055;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;outline:0}
.modal-dialog{position:relative;width:auto;margin:.5rem;pointer-events:none}
.modal.fade .modal-dialog{transition:transform .3s ease-out;transform:translate(0,-50px)}
@media (prefers-reduced-motion:reduce){.modal.fade .modal-dialog{transition:none}}
.modal.show .modal-dialog{transform:none}
.modal-backdrop{position:fixed;top:0;left:0;z-index:1050;width:100vw;height:100vh;background-color:#000}
.modal-backdrop.fade{opacity:0}
.modal-backdrop.show{opacity:.5}
.modal-dialog-centered{display:flex;align-items:center;min-height:calc(100% - 1rem)}
.modal-content{position:relative;display:flex;flex-direction:column;width:100%;pointer-events:auto;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.2);border-radius:.3rem;outline:0}
.modal-body{position:relative;flex:1 1 auto;padding:1rem}
@media (min-width:576px){.modal-dialog{max-width:500px;margin:1.75rem auto}.modal-dialog-centered{min-height:calc(100% - 3.5rem)}}
@media (min-width:992px){.modal-lg{max-width:800px}}

/* Reboot: labels. HubSpot's forms (la_hero_4's sign-up, the newsletters) print
 * an empty <label> above each input; as an inline-block it still takes a line
 * box, which is the 21px live has above every field. Inline, it collapses and
 * the form came out 41px shorter than live's. */
label{display:inline-block}

/* Reboot: tables. Posts carry tables (Shortcodes Ultimate's su-table); live
 * collapses their borders and resets cell borders and header alignment. */
table{caption-side:bottom;border-collapse:collapse}
th{text-align:inherit;text-align:-webkit-match-parent}
tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}

/* hr, as Bootstrap's reboot sets it: no border, a 1px currentColor fill at
 * 25% opacity. From the Referrals page's UCSS bundle; its step cards use one. */
hr{margin:1rem 0;color:inherit;background-color:currentColor;border:0;opacity:.25}
hr:not([size]){height:1px}

/* Form controls and iframes, as Bootstrap's reboot sets them. Live's per-page
 * bundle leaves these out because its forms arrive by script; LiteSpeed swaps
 * in the full stylesheet once its scripts run, and these come with it. Without
 * them the HubSpot form's textarea falls back to a 13px monospace font. */
button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}
textarea{resize:vertical}
iframe{border:0}

/* Headings, as Bootstrap's reboot sizes them. main.css sets its own size for
 * h1–h5, so in practice this gives h6 its 1rem: without it the footer CTA's
 * "Case Study" overtitle fell to the browser's 0.67em and the block was 8px
 * short. From live's full stylesheet, which LiteSpeed loads once scripts run. */
.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}
.h1,h1{font-size:calc(1.375rem + 1.5vw)}
@media (min-width:1200px){.h1,h1{font-size:2.5rem}}
.h2,h2{font-size:calc(1.325rem + .9vw)}
@media (min-width:1200px){.h2,h2{font-size:2rem}}
.h3,h3{font-size:calc(1.3rem + .6vw)}
@media (min-width:1200px){.h3,h3{font-size:1.75rem}}
.h4,h4{font-size:calc(1.275rem + .3vw)}
@media (min-width:1200px){.h4,h4{font-size:1.5rem}}
.h5,h5{font-size:1.25rem}
.h6,h6{font-size:1rem}

/* sub and sup, as Bootstrap's reboot sets them: without these a superscript
 * keeps its full line height, and Referral Terms' "3rd" grew its line by 3px. */
sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}
sub{bottom:-.25em}
sup{top:-.5em}

/* Tables, as Bootstrap styles them: the competitor comparison's table uses
 * .table and .table-striped, and without these its cells lose their 8px
 * padding, colour and stripes. From live's full stylesheet. */
table{caption-side:bottom;border-collapse:collapse}
th{text-align:inherit;text-align:-webkit-match-parent}
tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}
.table{--bs-table-bg:transparent;--bs-table-accent-bg:transparent;--bs-table-striped-color:#212529;--bs-table-striped-bg:rgba(0, 0, 0, 0.05);--bs-table-active-color:#212529;--bs-table-active-bg:rgba(0, 0, 0, 0.1);--bs-table-hover-color:#212529;--bs-table-hover-bg:rgba(0, 0, 0, 0.075);width:100%;margin-bottom:1rem;color:#212529;vertical-align:top;border-color:#dee2e6}
.table>:not(caption)>*>*{padding:.5rem .5rem;background-color:var(--bs-table-bg);border-bottom-width:1px;box-shadow:inset 0 0 0 9999px var(--bs-table-accent-bg)}
.table>tbody{vertical-align:inherit}
.table>thead{vertical-align:bottom}
.table>:not(:first-child){border-top:2px solid currentColor}
.table-striped>tbody>tr:nth-of-type(odd)>*{--bs-table-accent-bg:var(--bs-table-striped-bg);color:var(--bs-table-striped-color)}
.table-responsive{overflow-x:auto;-webkit-overflow-scrolling:touch}

/* Bootstrap's text-alignment utilities. The comparison table is .text-center
 * with .text-start label cells; without these its marks sat at the left. */
.text-start{text-align:left!important}
.text-end{text-align:right!important}
.text-center{text-align:center!important}
