/*
 * Home page styles (front page only). Layout and colours live in Elementor; this file only does what
 * Elementor's controls can't: hide empty sections (from the sbx-no-<section> body classes added in
 * mu-plugins/speakerboxx-snippets.php), and the hero pause button. The play buttons are in players.css.
 */

/* ---- Empty sections ---- */
.sbx-no-event .sbx-home-event,
body:not(.sbx-no-event) .sbx-home-event-empty,
.sbx-no-album .sbx-home-album,
.sbx-no-video .sbx-home-video,
.sbx-no-mix .sbx-home-mix,
.sbx-no-release .sbx-home-release,
.sbx-no-mix.sbx-no-release .sbx-home-music {
  display: none !important;
}

/* One music card left: keep it card-sized and centred instead of stretching across the row. */
.sbx-no-mix .sbx-home-release,
.sbx-no-release .sbx-home-mix {
  max-width: 560px;
  margin-inline: auto;
}

/* ---- Hero pause button ---- */
.sbx-hero {
  position: relative;
}

/* Elementor's widget wrapper is position: relative, which would pin the button next to Booking.
   Making the wrapper static lets the button sit in the hero's corner; the wrapper itself takes no space. */
.sbx-hero > .elementor-widget-html,
.sbx-hero > .elementor-widget-html > .elementor-widget-container {
  position: static;
  margin: 0;
}

.sbx-hero > .elementor-widget-html {
  height: 0;
  margin-top: -24px; /* cancel the hero's 24px flex gap for this empty item */
}

.sbx-hero-toggle.sbx-hero-toggle {
  position: absolute;
  right: 24px;
  bottom: 24px;
  z-index: 3;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--e-global-color-fieldbd, #757575);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.sbx-hero-toggle[hidden] {
  display: none;
}

/* Two bars = pause; a triangle when paused = play. Drawn in CSS so no icon font is needed. */
.sbx-hero-toggle::before {
  content: '';
  width: 12px;
  height: 14px;
  border-left: 4px solid currentColor;
  border-right: 4px solid currentColor;
  box-sizing: border-box;
}

.sbx-hero-toggle.is-paused::before {
  width: 0;
  height: 0;
  border-right: 0;
  border-left: 13px solid currentColor;
  border-top: 8px solid transparent;
  border-bottom: 8px solid transparent;
  margin-left: 4px;
}
