
:root {
  --background: #000;
  --foreground: #fff;
  --control-background: rgba(25, 25, 25, 0.85);
  --button-background: #333;
  --button-hover: #555;
  --exit-background: #922b2b;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Arial, sans-serif;
}

button {
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  background: var(--button-background);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover {
  background: var(--button-hover);
}

button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

/* Velkomstskærm */

.welcome {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}

.welcome h1 {
  font-size: clamp(28px, 5vw, 52px);
}

.welcome p {
  font-size: 20px;
  color: #ccc;
}

#startBtn {
  margin-top: 24px;
  background: #276749;
  font-size: 18px;
}

/* Slideshow */

.slideshow {
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  background: #000;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  /* transition: opacity 800ms ease;*/
  /* Gør dog ingen forskel hvilke kode der anvendes.*/
  /* Nedenståden kode giver media.json forrang*/
 transition: opacity var(--transition-duration, 800ms) ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img,
.slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Kontrolpanel */

.controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;

  width: max-content;
  max-width: calc(100% - 24px);
  padding: 12px;

  background: var(--control-background);
  border-radius: 12px;
}

#musicBtn[aria-pressed="false"] {
  background: #555;
  color: #ddd;
}

.exit-button {
  background: var(--exit-background);
}

.exit-button:hover {
  background: #b53232;
}

/* Mobil */

@media (max-width: 600px) {
  .controls {
    bottom: 10px;
    width: calc(100% - 20px);
    gap: 8px;
    padding: 10px;
  }

  .controls button {
    flex: 1 1 auto;
    min-height: 44px;
    padding: 10px;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .slide {
    transition-duration: 0ms !important;
  }
}
/* Skjul panelet uden at fjerne det fra layoutet */
.controls {
  transition: opacity 250ms ease, visibility 250ms ease;
}
.controls.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .controls { transition: none; }
}
