/* Ace Markets Tool Page Layout Only
   Use this in child theme tools.css only if your Hestia page still adds a white card wrapper.
   The economic calendar visual styling now lives inside the plugin and is scoped to .ace-ecp-root.
*/
/* =========================================================
   Ace Markets Tool Pages
   Remove Hestia white card wrapper and allow tool to own layout
   ========================================================= */

body.ace-tool-page {
  background: #020816 !important;
  overflow-x: hidden !important;
}

/* Remove Hestia raised/card layout on tool pages */
body.ace-tool-page .main,
body.ace-tool-page .main-raised,
body.ace-tool-page .hestia-blogs,
body.ace-tool-page .blog-post,
body.ace-tool-page .section,
body.ace-tool-page .section-text,
body.ace-tool-page .single-page-content,
body.ace-tool-page .page-content,
body.ace-tool-page .content-area,
body.ace-tool-page .entry-content {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Hestia often puts the white card on .main-raised */
body.ace-tool-page .main-raised {
  margin: 0 !important;
  padding: 0 !important;
}

/* Remove boxed Bootstrap containers */
body.ace-tool-page .container,
body.ace-tool-page .row,
body.ace-tool-page .col-md-12,
body.ace-tool-page .col-sm-12,
body.ace-tool-page .col-xs-12 {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Remove only the card/article wrapper that contains the calendar */
body.ace-tool-page article:has(.ace-ecp-root),
body.ace-tool-page .card:has(.ace-ecp-root),
body.ace-tool-page .blog-post:has(.ace-ecp-root),
body.ace-tool-page .page-content:has(.ace-ecp-root),
body.ace-tool-page .entry-content:has(.ace-ecp-root),
body.ace-tool-page .single-page-content:has(.ace-ecp-root) {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Calendar fills the available parent cleanly */
body.ace-tool-page .ace-ecp-root,
body.ace-tool-page .ace-ecp-root .ace-ecp-shell,
body.ace-tool-page .ace-ecp-root .ace-ecp-bg {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}
body.ace-tool-page,
body.ace-tool-page .main,
body.ace-tool-page .main-raised,
body.ace-tool-page .blog-post,
body.ace-tool-page .page-content,
body.ace-tool-page .content-area,
body.ace-tool-page .entry-content,
body.ace-tool-page article.hentry,
body.ace-tool-page article.page,
body.ace-tool-page article.post,
body.ace-tool-page .card,
body.ace-tool-page .single-page-content {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.ace-tool-page .container,
body.ace-tool-page .row,
body.ace-tool-page .col-md-12,
body.ace-tool-page .col-sm-12,
body.ace-tool-page .col-xs-12,
body.ace-tool-page .section,
body.ace-tool-page .hestia-blogs {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.ace-tool-page .ace-ecp-root,
body.ace-tool-page .ace-ecp-root .ace-ecp-shell,
body.ace-tool-page .ace-ecp-root .ace-ecp-bg {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
/* =========================================================
   FIX HEADER / NAVBAR WIDTH ON STANDARD PAGES
   Keeps page CSS from spreading the top menu/logo
   ========================================================= */

body.page:not(.home) .navbar .container,
body.page:not(.home) .navbar.navbar-default .container,
body.page:not(.home) header .container {
  width: min(1280px, calc(100% - 72px)) !important;
  max-width: 1280px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
}

body.page:not(.home) .navbar .navbar-header {
  flex: 0 0 320px !important;
}

body.page:not(.home) .navbar .navbar-collapse {
  flex: 1 1 auto !important;
}

body.page:not(.home) .navbar .navbar-nav {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 6px !important;
  width: 100% !important;
  margin: 0 !important;
}
/* =========================================================
   TOOL PAGES - REMOVE PAGE HERO HEADER
   ========================================================= */

body.ace-tool-page .page-header,
body.ace-tool-page .page-header.header-filter,
body.ace-tool-page .page-header.header-small,
body.ace-tool-page .header-filter,
body.ace-tool-page .title-header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* Remove the gap left behind by the hidden header */
body.ace-tool-page .main,
body.ace-tool-page .main-raised {
  margin-top: 0 !important;
}