/* Flat public buttons, including hover, pressed and disabled states.
   This stylesheet is loaded by the public header only, after the legacy theme. */
body :is(.btn, .btn-ico, button, input[type="button"], input[type="reset"], input[type="submit"]) {
  background-image: none !important;
  box-shadow: none !important;
}

/* A two-tone keyboard focus ring stays visible on light and dark backgrounds.
   The outer outline and white inner ring do not add a bevel to the button. */
body :is(.btn, .btn-ico, button, input[type="button"], input[type="reset"], input[type="submit"]):focus-visible {
  outline: 3px solid #111 !important;
  outline-offset: 3px;
  box-shadow: 0 0 0 3px #fff !important;
}

/* Keyboard focus reveals controls at the original hover edge positions. */
.owl-carousel-fluid:focus-within .owl-nav button.owl-prev,
.owl-carousel-fluid:focus-within .owl-nav button.owl-next {
  transform: translate(0, -50%);
}

/* Native accordion buttons retain the heading/link appearance. */
.accordion-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-align: inherit;
  text-transform: inherit;
  white-space: normal;
}

/* Anchor the control above the intro panel, inside the opening hero area. */
.template-home #intro-body {
  position: relative;
}

.hero-playback {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: calc(100% + 1.5rem);
  z-index: 1020;
}

.hero-playback,
.story-playback,
.gallery-playback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: #111;
  color: #777;
  cursor: pointer;
}

.hero-playback svg,
.story-playback svg,
.gallery-playback svg {
  width: 22px;
  height: 22px;
}

.hero-playback[hidden],
.hero-playback svg[hidden],
.story-playback[hidden],
.story-playback svg[hidden],
.gallery-playback[hidden],
.gallery-playback svg[hidden] {
  display: none;
}

.home-stories-section,
.community-stories-section {
  position: relative;
}

.story-playback {
  position: absolute;
  right: max(1rem, env(safe-area-inset-right));
  bottom: 1.5rem;
  z-index: 2;
}

/* Light playback controls for galleries and blue story sections. */
.gallery-playback,
.bg-primary .story-playback,
.home-stories-section .story-playback {
  background: #ddd;
  color: #555;
}

.community-story-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1rem;
  padding-right: max(1rem, env(safe-area-inset-right));
  padding-left: max(1rem, env(safe-area-inset-left));
}

.community-story-actions .story-playback {
  position: static;
  flex-shrink: 0;
}

.gallery-playback {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 5;
}
