/* KOTO Site compat layer, loaded before site.css on KOTO pages.
   1. Elementor's atomic base styles (padding, width, flex, all: unset) must not reach the
      static markup: they are rolled back to the browser defaults here. This rule is
      (1,1,1) specific; every site.css rule carries :not(#koto):not(#koto) (2,0,0) and wins.
   2. Elementor's document wrappers do not take part in layout.
   3. Placeholders (data-koto-tag) look right before koto-dom.js runs and in the editor. */

body.koto:not(#koto) :where(.e-con, .e-atomic-element, .e-div-block-base, .e-flexbox-base,
  .e-paragraph-base, .e-heading-base, .e-button-base, .e-image-base, .e-svg-base),
body.koto-shell:not(#koto) :where(.elementor-location-header, .elementor-location-footer)
  :where(.e-con, .e-atomic-element, .e-div-block-base, .e-flexbox-base, .e-paragraph-base,
  .e-heading-base, .e-button-base, .e-image-base, .e-svg-base) {
  all: revert;
}
/* Other pages (body.koto-shell) carry the KOTO header and footer: only those two are reset,
   so the page's own Elementor content keeps its Style tab settings. */

body.koto .elementor,
body.koto .elementor-location-header,
body.koto .elementor-location-footer,
body.koto .elementor-section-wrap,
body.koto-shell .elementor-location-header,
body.koto-shell .elementor-location-footer {
  display: contents;
}

body:is(.koto, .koto-shell):not(#koto) :is([data-koto-tag="ul"], [data-koto-tag="ol"], [data-koto-tag="figure"],
  [data-koto-tag="figcaption"], [data-koto-tag="dl"], [data-koto-tag="dt"], [data-koto-tag="dd"],
  [data-koto-tag="details"], [data-koto-tag="summary"], [data-koto-tag="form"],
  [data-koto-tag="fieldset"], [data-koto-tag="legend"], [data-koto-tag="blockquote"],
  [data-koto-tag="h1"], [data-koto-tag="h2"], [data-koto-tag="h3"], [data-koto-tag="h4"],
  [data-koto-tag="p"], [data-koto-tag="div"]) { display: block; }
body:is(.koto, .koto-shell):not(#koto) [data-koto-tag="li"] { display: list-item; }
body:is(.koto, .koto-shell):not(#koto) [data-koto-tag="table"] { display: table; }
body:is(.koto, .koto-shell):not(#koto) [data-koto-tag="thead"] { display: table-header-group; }
body:is(.koto, .koto-shell):not(#koto) [data-koto-tag="tbody"] { display: table-row-group; }
body:is(.koto, .koto-shell):not(#koto) [data-koto-tag="tr"] { display: table-row; }
body:is(.koto, .koto-shell):not(#koto) :is([data-koto-tag="td"], [data-koto-tag="th"]) { display: table-cell; }
body:is(.koto, .koto-shell):not(#koto) :is([data-koto-tag="input"], [data-koto-tag="textarea"]) { display: inline-block; }
body:is(.koto, .koto-shell):not(#koto) [data-koto-tag="source"] { display: none; }

/* Elementor editor preview: site.js does not run, so reveal-on-scroll content stays visible. */
body.koto-edit .rv,
body.koto-edit .rv-clip::after { opacity: 1 !important; transform: none !important; }

/* Reserve page: the KOTO header replaces the page's own logo and opening-hours block. */
body.koto-reserve .koto-top { display: none !important; }
body.koto-reserve .koto-page { padding-top: var(--hd); }
