/* =====================================================================
   Toothwise V8: Elementor layout compatibility.
   Containers in the Toothwise layouts carry "fc-el" plus the theme's own
   layout class (fc-w, fc-wn, fc-split, fc-c, fc-s). Elementor's generic
   container rules are neutralised and the theme's layout rules re-asserted
   with the same values and breakpoints as fresh-clinic.css + v7.css, so an
   Elementor page lays out exactly like the PHP template. Spacing set in the
   Elementor panel (padding top/bottom, gap) still applies.
   Loaded only when the Toothwise Elementor layouts are active.
   ===================================================================== */

.fc .e-con.fc-el{
  --container-default-padding-top:0px;--container-default-padding-right:0px;
  --container-default-padding-bottom:0px;--container-default-padding-left:0px;
  --widgets-spacing:0px;--widgets-spacing-row:0px;--widgets-spacing-column:0px;
  --margin-top:0px;--margin-bottom:0px;--position:static;
  padding-block-start:var(--padding-block-start);padding-block-end:var(--padding-block-end);
}
/* plain slots (no theme class) keep full width, no side padding */
.fc .e-con.fc-el:not(.fc-w):not(.fc-wn){padding-inline:var(--padding-inline-start) var(--padding-inline-end)}

/* page width wrappers */
.fc .e-con.fc-w{max-width:1200px;margin-inline:auto;padding-inline:48px;width:auto}
.fc .e-con.fc-wn{max-width:760px;margin-inline:auto;padding-inline:48px;width:auto}
.fc .e-con.fc-wn.fc-el-w980{max-width:980px}
@media (max-width:760px){.fc .e-con.fc-w,.fc .e-con.fc-wn{padding-inline:20px}}

/* article + sidebar split */
.fc .e-con.fc-split{display:flex;flex-direction:row;flex-wrap:wrap;gap:64px;width:auto}
@media (max-width:760px){.fc .e-con.fc-split{gap:40px}}
.fc .e-con.fc-split>.e-con.fc-c{flex:999 1 600px;min-width:0;display:flex;flex-direction:column;gap:40px;width:auto}
.fc .e-con.fc-split>.e-con.fc-s{flex:0 1 300px;display:flex;flex-direction:column;gap:20px;width:auto}
.fc .e-con.fc-split .fc-s>.elementor-widget{position:static}

/* sticky pieces: the sticky element is now the widget wrapper */
.fc .e-con.fc-s .fc-toc{position:static} /* live: the sidebar list is static (.fc-split .fc-s>* wins over .fc-toc) */
/* mobile bar: its slot and wrapper pass through (display:contents) so .fc-mbar sticks as in the PHP page */
.fc .elementor-location-header{position:sticky;top:0;z-index:30}
@media (max-width:600px){.fc .elementor-location-header{position:static}} /* as .fc-hd in fresh-clinic.css */

/* widgets carry no spacing of their own; the theme components do */
.fc .e-con.fc-el>.elementor-widget{margin:0;width:auto;max-width:100%}
.fc .e-con.fc-el>.elementor-widget>.elementor-widget-container{padding:0;margin:0}


/* wrappers that are plain blocks in the PHP templates */
.fc .e-con.fc-el.fc-el-block{display:block}

/* a component with nothing to show for this page leaves no gap */
.fc .e-con.fc-el>.elementor-widget:empty,.fc .e-con.fc-el>.elementor-widget:has(>.elementor-widget-container:empty){display:none}

/* theme image sizing re-asserted over Elementor's generic `.elementor img` rule */
.fc .elementor .fc-card .fc-th img{width:100%;height:100%;border-radius:12px}
.fc .elementor .fc-art{width:100%;height:auto;max-width:100%}
.fc .elementor .fc-ph-art{max-width:340px;max-height:300px;width:auto}
.fc .elementor img.fc-art[src*="t1-smiling-tooth"]{max-height:200px}
.fc .elementor .fc-hero-art{max-width:560px}
.fc .elementor .fc-sec-art{max-width:260px}
.fc .elementor .fc-close-art{max-width:520px;margin:0 auto}
@media (max-width:1000px){.fc .elementor .fc-ph-art{max-width:260px}}
@media (max-width:1000px){.fc .elementor .fc-hero-art{max-width:420px}}
@media (max-width:760px){.fc .elementor .fc-ph-art{max-width:280px;max-height:220px}}
@media (max-width:760px){.fc .elementor .fc-hero-art{max-width:300px}}
@media (max-width:760px){.fc .elementor .fc-sec-art{max-width:220px}}
@media (max-width:760px){.fc .elementor .fc-trust-art{max-width:240px}}
@media (max-width:760px){.fc .elementor .fc-close-art{max-width:280px}}

/* components that print several sibling blocks (count + grid, toolbar + list, chips + list, card + text + note)
   hand them straight to the layout container, exactly as the PHP template places them */
.fc .e-con.fc-el>:is(.elementor-widget-tw-search-results,.elementor-widget-tw-guide-list,.elementor-widget-tw-city-directory,.elementor-widget-tw-practice-profile,.elementor-widget-tw-calculator,.elementor-widget-tw-mobile-bar,.elementor-widget-tw-vh-heading),
.fc .e-con.fc-el>:is(.elementor-widget-tw-search-results,.elementor-widget-tw-guide-list,.elementor-widget-tw-city-directory,.elementor-widget-tw-practice-profile,.elementor-widget-tw-calculator,.elementor-widget-tw-mobile-bar,.elementor-widget-tw-vh-heading)>.elementor-widget-container,
.fc .e-con.fc-el.fc-el-contents{display:contents}
body.elementor-editor-active .e-con.fc-el>.elementor-widget,body.elementor-editor-active .e-con.fc-el>.elementor-widget>.elementor-widget-container,body.elementor-editor-active .e-con.fc-el.fc-el-contents{display:block}

/* Hello reset keeps hr content-box; Elementor's generic rule would flip it */
.fc .elementor hr{box-sizing:content-box}
