/* KD Loadingscreen (komadev.dk/loadingscreen/). Builds on vendingmachine/vending.css and the tokens from assets/css/app.css. */

/* The loading screen's own accent: a warm sunset orange. */
.ls-page {
  --ls: #ff6a3d;
  --ls-2: #ffb36b;
}

.ls-grad {
  background: linear-gradient(110deg, var(--ls) 5%, var(--ls-2) 55%, var(--accent) 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.ls-frame {
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(255, 106, 61, 0.08), 0 0 90px -20px rgba(255, 106, 61, 0.35);
}

.ls-page .vm-feature__icon {
  color: var(--ls-2);
}

.ls-page .vm-tip {
  margin-top: 1.25rem;
}

.ls-page .vm-block__title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed var(--line-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.ls-page .vm-block__title a:hover {
  color: var(--ls-2);
  border-color: var(--ls-2);
}

.ls-close {
  max-width: 46rem;
}

/* ---------- Live demo player ---------- */

.ls-demo {
  position: relative;
  border: 1px solid var(--line-2);
  border-radius: calc(var(--radius) + 4px);
  background: var(--bg-2);
  overflow: hidden;
  box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.95), 0 0 120px -40px rgba(255, 106, 61, 0.45);
}

.ls-demo__bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.6rem 0.75rem 0.6rem 0.95rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
}

.ls-demo__url {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--faint);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ls-demo__live {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  background: rgba(255, 106, 61, 0.14);
  color: var(--ls-2);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
}

.ls-demo__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ls);
  color: rgba(255, 106, 61, 0.6);
  animation: pulse 2.2s ease-out infinite;
}

.ls-demo__tools {
  display: inline-flex;
  gap: 0.35rem;
  margin-left: auto;
}

.ls-demo__tool {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.38rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.ls-demo__tool:hover {
  border-color: var(--line-2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.ls-demo__tool svg {
  width: 0.95rem;
  height: 0.95rem;
}

.ls-demo__tool[hidden] {
  display: none;
}

.ls-demo__stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ls-demo__poster,
.ls-demo__stage iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.ls-demo__poster {
  object-fit: cover;
  filter: saturate(1.05) brightness(0.62);
  transition: filter 0.6s ease, transform 1.2s var(--ease);
}

.ls-demo:hover .ls-demo__poster {
  filter: saturate(1.1) brightness(0.5);
  transform: scale(1.015);
}

.ls-demo__play {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 1rem;
  border: 0;
  background: radial-gradient(60% 60% at 50% 50%, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55));
  color: #fff;
  font: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.ls-demo__play-ring {
  display: grid;
  place-items: center;
  width: clamp(64px, 9vw, 92px);
  height: clamp(64px, 9vw, 92px);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ls-2), var(--ls));
  color: #1a0a03;
  box-shadow: 0 0 0 10px rgba(255, 106, 61, 0.16), 0 0 0 22px rgba(255, 106, 61, 0.07), 0 20px 50px -10px rgba(255, 106, 61, 0.7);
  transition: transform 0.5s var(--ease), box-shadow 0.5s ease;
}

.ls-demo__play-ring svg {
  width: 40%;
  height: 40%;
  margin-left: 8%;
  fill: currentColor;
}

.ls-demo__play:hover .ls-demo__play-ring,
.ls-demo__play:focus-visible .ls-demo__play-ring {
  transform: scale(1.08);
  box-shadow: 0 0 0 14px rgba(255, 106, 61, 0.2), 0 0 0 30px rgba(255, 106, 61, 0.08), 0 24px 60px -10px rgba(255, 106, 61, 0.85);
}

.ls-demo__play-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.ls-demo__play-text strong {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  letter-spacing: -0.02em;
}

.ls-demo__play-text small {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

.ls-demo.is-live .ls-demo__poster,
.ls-demo.is-live .ls-demo__play {
  display: none;
}

.ls-demo__note {
  max-width: 46rem;
}

@media (max-width: 639px) {
  .ls-demo__tool span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .ls-demo__url {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ls-demo__live i {
    animation: none;
  }
}
