/* ==========================================================================
   SABA V2V - Astra bridge.
   Loaded only when Astra is the active theme, after every other plugin sheet.

   Astra's own header and footer are removed in PHP (includes/chrome.php), so
   this file only has to deal with what Astra styles rather than what it
   renders: containers, the page title, the sidebar, and its colour palette.
   ========================================================================== */

/* --- Layout -------------------------------------------------------------
   Astra's boxed container caps content at its own width and adds padding.
   Sections handle their own width via .dmt-wrap and their own padding via
   .dmt-section, so the wrapper gets out of the way. */
.ast-container,
.ast-container-fluid,
.site-content .ast-container {
  max-width: none;
  width: 100%;
  padding-left: 0;
  padding-right: 0;
  margin-left: 0;
  margin-right: 0;
}

#page, #content, #primary,
.site-content #primary,
.ast-page-builder-template .site-content > .ast-container {
  margin: 0;
  padding: 0;
  max-width: none;
}

.ast-page-builder-template .entry-header,
.ast-page-builder-template .entry-content,
.site-main .entry-content { margin: 0; padding: 0; }

/* Astra prints its own page title above the content. Every DMT page opens on
   a hero band that already carries the h1, so a second one would be both a
   duplicate heading and a broken layout. */
.ast-page-builder-template .entry-header,
.ast-single-post .entry-header .entry-title,
h1.entry-title.ast-page-title,
.ast-archive-description { display: none; }

/* No sidebar on any page in this design. */
.widget-area, #secondary { display: none; }

/* --- Colour -------------------------------------------------------------
   Astra sets the page background from its palette through an inline <style>:
       .ast-plain-container, .ast-page-builder-template { background-color: var(--ast-global-color-5) }
   That is one class, so a bare `body` selector loses. Naming the element as
   well as the class settles it. */
body,
body.ast-plain-container,
body.ast-page-builder-template,
body.ast-separate-container,
.ast-separate-container { background-color: var(--dmt-grey); }

/* Astra styles every bare <button> from its palette, which turns the
   hamburger and the review carousel arrows solid. Those are chrome, and their
   appearance is fixed by the design. */
.dmt-header .dmt-burger,
.dmt-reviews .dmt-reviews__btn,
.dmt-accordion .dmt-accordion__q {
  background-color: transparent;
  background-image: none;
  border-radius: 0;
  box-shadow: none;
}
.dmt-reviews .dmt-reviews__btn { border: 2px solid var(--dmt-border-navy-btn); }
.dmt-reviews .dmt-reviews__btn:hover { background-color: transparent; border-color: var(--dmt-on-navy); }
.dmt-header .dmt-burger { border: 0; }

/* Astra also paints :hover and :focus from the same palette, and that half is
   easy to miss: the rule above only neutralises `background-color`, so what
   bleeds through is `color:#FFFFFF`.
   On the accordion question that is white text on a row this file has just
   made transparent, so the question disappears the moment it is clicked or
   hovered. It reads as "the text vanished", not as a colour conflict.
   Restore the design's own colours explicitly, for every interactive state. */
.dmt-accordion .dmt-accordion__q:hover,
.dmt-accordion .dmt-accordion__q:focus,
.dmt-accordion .dmt-accordion__q:focus-visible,
.dmt-accordion .dmt-accordion__q:active {
  background-color: transparent;
  background-image: none;
  color: var(--dmt-text);
  box-shadow: none;
}
.dmt-accordion .dmt-accordion__q:hover .dmt-accordion__icon,
.dmt-accordion .dmt-accordion__q:focus .dmt-accordion__icon { color: var(--dmt-olive); }

/* Same bleed, same fix, for the other two bare buttons in the chrome. */
.dmt-reviews .dmt-reviews__btn:hover,
.dmt-reviews .dmt-reviews__btn:focus,
.dmt-reviews .dmt-reviews__btn:active { color: var(--dmt-on-navy); }
.dmt-header .dmt-burger:hover,
.dmt-header .dmt-burger:focus,
.dmt-header .dmt-burger:active { background-color: transparent; color: var(--dmt-on-navy); }

/* Astra's focus styling was doing the keyboard-visibility job, badly. Replace
   it rather than just removing it, or keyboard users lose the focus indicator. */
.dmt-accordion .dmt-accordion__q:focus-visible,
.dmt-reviews .dmt-reviews__btn:focus-visible,
.dmt-header .dmt-burger:focus-visible {
  outline: 2px solid var(--dmt-olive);
  outline-offset: -2px;
}

/* Astra rounds buttons and inputs by default. Zero radius everywhere. */
.ast-button, .button, button,
input[type="submit"], input[type="button"], input[type="reset"],
.dmt-search .dmt-search__field { border-radius: 0; }

/* Astra's own heading colours would beat a bare h2 selector. Components scope
   their own headings, so this only catches anything outside them. */
.dmt-section h1, .dmt-section h2, .dmt-section h3,
.dmt-section h4, .dmt-section h5, .dmt-section h6 { color: var(--dmt-text); }

.dmt-section--navy h1, .dmt-section--navy h2, .dmt-section--navy h3,
.dmt-section--navy h4, .dmt-on-navy h1, .dmt-on-navy h2,
.dmt-on-navy h3, .dmt-on-navy h4 { color: var(--dmt-on-navy); }
