/* ============================================================
   Dr. Yakir Clinic - WordPress / Elementor bridge
   Loads after Elementor's CSS and css/style.css.
   mu-plugins/dryakir-design.php prints Elementor's base stylesheets
   inside @layer elementor, so every unlayered rule (style.css, this
   file, Elementor's per-page CSS) beats them whatever its specificity.
   This file makes the Elementor / WordPress wrappers invisible.
   ============================================================ */

@layer elementor, dyk-restore;

/* Elementor's base CSS strips link underlines and figure / hr margins
   inside .elementor; the original markup (html / shortcode / text-editor
   widgets) keeps the browser defaults. Restored one layer above Elementor,
   still below every style.css rule. Native Elementor widgets keep the reset. */
@layer dyk-restore {
  .elementor :is(.elementor-widget-html, .elementor-widget-shortcode, .elementor-widget-text-editor) a { text-decoration: revert; }
  .elementor :is(.elementor-widget-html, .elementor-widget-shortcode, .elementor-widget-text-editor) hr { margin: revert; background-color: revert; }
  .elementor :is(.elementor-widget-html, .elementor-widget-shortcode) figure { margin: revert; }
}

/* ---------- Page shell (.dyk-page = <main id="main">) and section containers (.dyk-sec) ---------- */
.elementor .e-con.dyk-page,
.elementor .e-con.dyk-sec,
.elementor .e-con:is(.dyk-page, .dyk-sec) > .e-con-inner {
  --display: block;
  --position: static;
  --width: 100%;
  --min-height: 0px;
  --height: auto;
  --content-width: 100%;
  --container-max-width: 100%;
  --margin-top: 0px;
  --margin-right: 0px;
  --margin-bottom: 0px;
  --margin-left: 0px;
  --padding-top: 0px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  --container-default-padding-top: 0px;
  --container-default-padding-right: 0px;
  --container-default-padding-bottom: 0px;
  --container-default-padding-left: 0px;
  --gap: 0px;
  --row-gap: 0px;
  --column-gap: 0px;
  --widgets-spacing: 0px;
  --widgets-spacing-row: 0px;
  --widgets-spacing-column: 0px;
  --kit-widget-spacing: 0px;
  --border-radius: 0;
  --border-top-width: 0px;
  --border-right-width: 0px;
  --border-bottom-width: 0px;
  --border-left-width: 0px;
  --z-index: auto;
  --overflow: visible;
  display: block;
  position: static;
  width: auto;
  min-width: 0;
  max-width: none;
  min-height: 0;
  height: auto;
  margin: 0;
  padding: 0;
  gap: normal;
  border: 0;
  border-radius: 0;
  overflow: visible;
  z-index: auto;
  flex: none;
  order: 0;
  align-self: auto;
  text-align: inherit;
  transform: none;
  transition: none;
}
.elementor .e-con:is(.dyk-page, .dyk-sec)::before,
.elementor .e-con:is(.dyk-page, .dyk-sec)::after { content: none; }

/* Widget wrappers inside the section containers: full width, no spacing */
.elementor .dyk-sec > .elementor-widget,
.elementor .dyk-sec > .e-con-inner > .elementor-widget,
.elementor .dyk-sec .elementor-widget > .elementor-widget-container,
.elementor .dyk-sec .elementor-widget-shortcode .elementor-shortcode {
  --kit-widget-spacing: 0px;
  --container-widget-width: 100%;
  display: block;
  position: static;
  width: auto;
  min-width: 0;
  max-width: none;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  flex: none;
  transform: none;
  transition: none;
}

/* Outside the editor the section wrappers drop out of the box tree, so the
   original sections lay out exactly as direct children of <main>. */
body:not(.elementor-editor-active) .elementor .e-con.dyk-sec,
body:not(.elementor-editor-active) .elementor .e-con.dyk-sec > .e-con-inner,
body:not(.elementor-editor-active) .elementor .dyk-sec > .elementor-widget,
body:not(.elementor-editor-active) .elementor .dyk-sec > .e-con-inner > .elementor-widget,
body:not(.elementor-editor-active) .elementor .dyk-sec .elementor-widget > .elementor-widget-container,
body:not(.elementor-editor-active) .elementor .dyk-sec .elementor-widget-shortcode .elementor-shortcode {
  display: contents;
}

/* In the editor the wrappers keep a box so they stay selectable, and
   sections re-rendered while editing must not wait for main.js. */
body.elementor-editor-active .elementor .e-con:is(.dyk-page, .dyk-sec) { position: relative; }
body.elementor-editor-active .reveal { opacity: 1; transform: none; }

/* ---------- Theme Builder locations and document wrappers ---------- */
.elementor-location-header,
.elementor-location-footer,
.elementor-location-single,
.elementor-location-archive,
[data-elementor-type="wp-page"],
[data-elementor-type="wp-post"] {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
  width: auto;
  max-width: none;
}
.elementor.elementor-location-header::before,
.elementor.elementor-location-footer::before { content: none; display: none; }

/* ---------- WordPress basics (Hello Elementor CSS is not loaded) ---------- */
body[class] {
  background: var(--paper);
  color: var(--text);
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute !important;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  clip: auto !important;
  clip-path: none;
  height: auto;
  width: auto;
  z-index: 100000;
}

/* Lead form honeypot */
.dyk-hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Logged-in admin bar: keep the fixed header, progress bar and skip link below it ---------- */
body.admin-bar .site-header,
body.admin-bar .scroll-progress { top: 32px; }
body.admin-bar .skip-link:focus { top: 32px; }
html:has(> body.admin-bar) { scroll-padding-top: calc(var(--header-h) + 48px); }
@media screen and (max-width: 782px) {
  body.admin-bar .site-header,
  body.admin-bar .scroll-progress,
  body.admin-bar .skip-link:focus { top: 46px; }
  html:has(> body.admin-bar) { scroll-padding-top: calc(var(--header-h) + 62px); }
}
@media screen and (min-width: 601px) and (max-width: 760px) {
  body.admin-bar .main-nav { top: calc(var(--header-h) + 46px); }
}
/* Below 601px the admin bar scrolls away with the page */
@media screen and (max-width: 600px) {
  body.admin-bar .site-header,
  body.admin-bar .scroll-progress { top: 0; }
}
