.wave-animation {
  aspect-ratio: 2 / 1;
  background: #eee;
  border-radius: .45rem;
  display: block;
  height: auto;
  width: 100%;
}

.wave-animation:focus-visible,
.wave-localized-controls button:focus-visible {
  outline: 3px solid var(--ntnu-orange, #ef8114);
  outline-offset: 3px;
}

.wave-localized-frame {
  aspect-ratio: 2 / 1;
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: .45rem;
}

.wave-localized-frame .wave-animation {
  height: 100%;
  object-fit: contain;
}

.wave-localized-frame img.wave-localized-overlay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  margin: 0;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
}

.wave-localized-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
  margin-top: .6rem;
}

.wave-localized-controls[hidden] { display: none; }

.wave-localized-controls button {
  min-height: 44px;
  min-width: 44px;
  padding: .45rem .85rem;
  border: 1px solid var(--md-default-fg-color--light, #666);
  border-radius: .35rem;
  background: var(--md-default-bg-color, #fff);
  color: var(--md-default-fg-color, #222);
  font: inherit;
  font-size: .8rem;
  line-height: 1.4;
  cursor: pointer;
}

.wave-localized-player:fullscreen,
.wave-localized-player--expanded {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .5rem;
  width: 100%;
  height: 100%;
  padding: 1rem;
  background: var(--md-default-bg-color, #fff);
  color: var(--md-default-fg-color, #222);
  overflow: auto;
}

.wave-localized-player--expanded {
  position: fixed;
  inset: 0;
  z-index: 10000;
}

.wave-localized-player:fullscreen .wave-localized-frame,
.wave-localized-player--expanded .wave-localized-frame {
  flex: 0 0 auto;
  width: min(100%, calc((100vh - 7rem) * 2));
  width: min(100%, calc((100dvh - 7rem) * 2));
}

.wave-localized-player:fullscreen .wave-localized-controls,
.wave-localized-player--expanded .wave-localized-controls {
  flex: 0 0 auto;
  margin: 0;
}
