/*
 * Cẩm Nang Baccarat — Elementor compatibility layer.
 *
 * Imported pages use Elementor Containers that carry the original layout classes
 * (.section, .section.alt, .container, .article, .prose, .two-col, .faq) plus the helper
 * class "bcr-flow". These rules make such containers behave exactly like the plain
 * <section>/<div> elements of the original site (normal block flow, collapsing margins,
 * no Elementor default padding/gap), so assets/css/site.css renders them 1:1.
 *
 * Remove "bcr-flow" from a container's CSS Classes (Advanced tab) to get a normal
 * Elementor flexbox container back.
 */

/* Containers: plain block flow, no default padding/gap. Values set in the Elementor panel still win. */
.e-con.bcr-flow,
.e-con.bcr-flow > .e-con-inner {
  display: block;
}
.e-con.bcr-flow {
  --padding-top: 0px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
  --gap: 0px;
  --row-gap: 0px;
  --column-gap: 0px;
  --width: 100%;
}
.e-con.bcr-flow > .elementor-widget,
.e-con.bcr-flow > .e-con-inner > .elementor-widget {
  margin-block-end: 0;
}

/* Layout classes from the original markup. */
.e-con.bcr-flow.section {
  --padding-top: 40px;
  --padding-bottom: 8px;
}
.e-con.bcr-flow.container {
  --padding-left: 16px;
  --padding-right: 16px;
  --margin-left: auto;
  --margin-right: auto;
  max-width: var(--max);
}
.e-con.bcr-flow.article {
  --margin-left: auto;
  --margin-right: auto;
  --margin-bottom: 48px;
  max-width: var(--prose);
}
.e-con.bcr-flow.two-col {
  display: grid;
}
.e-con.bcr-flow.two-col > .e-con {
  min-width: 0;
}

/* `.section > .container > h2:first-child { margin-top: 0 }` through Elementor's widget wrappers. */
.section > .container > :nth-child(1 of .elementor-element) > h2:first-child,
.section > .container > :nth-child(1 of .elementor-element) > .elementor-widget-container > h2:first-child,
.section > .container > :nth-child(1 of .elementor-element) > .elementor-text-editor > h2:first-child,
.section > .container > :nth-child(1 of .elementor-element) > .elementor-widget-container > .elementor-text-editor > h2:first-child {
  margin-top: 0;
}

/* Common header: the sticky element is the location wrapper, so it sticks for the whole page. */
.bcr-location-header {
  position: sticky;
  top: 0;
  z-index: 50;
}
.bcr-location-header .site-header {
  position: relative;
}
.admin-bar .bcr-location-header {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .bcr-location-header {
    top: 46px;
  }
}
@media (max-width: 600px) {
  .admin-bar .bcr-location-header {
    top: 0;
  }
}

/* Template wrappers of header/footer must not add any spacing. */
.bcr-location > .elementor > .e-con:not(.bcr-flow) {
  --padding-top: 0px;
  --padding-right: 0px;
  --padding-bottom: 0px;
  --padding-left: 0px;
}

/* WordPress core classes used in the editor. */
.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;
  width: 1px;
  word-wrap: normal !important;
}
.alignleft { float: left; margin: 0 1.2em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.2em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }
.nav-links .page-numbers { padding: 4px 10px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; background: var(--surface); }
.nav-links .page-numbers.current { background: var(--felt); color: #fff; border-color: var(--felt); }

/* Elementor's frontend.css removes link underlines (`.elementor a`) and figure margins.
   Restore the browser/original defaults for content that comes from the original site. */
.elementor .elementor-widget-text-editor a,
.elementor .elementor-widget-bcr-note a,
.elementor .elementor-widget-bcr-responsible a,
.elementor .elementor-widget-bcr-toc a,
.elementor .elementor-widget-bcr-breadcrumb a,
.elementor .elementor-widget-bcr-article-header a {
  text-decoration: revert;
}
.elementor .elementor-element.elementor-widget-bcr-page-banner.elementor-widget figure.page-banner {
  margin: 4px 0 24px;
}
/* `.elementor img { max-width: 100% }` is stronger than `.hero-art { max-width: … }`. */
.elementor img.hero-art {
  max-width: 440px;
}
@media (max-width: 760px) {
  .elementor img.hero-art {
    max-width: 300px;
  }
}
