/* Story-Ring um das Header-Logo. Viewer-CSS liegt hier, das Video selbst
   wird erst beim Tippen vom Storage geladen. */

.glass-nav .logo-container {
  height: 48px;
}

.mt-story-ring {
  position: relative;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: transparent;
  flex: none;
  -webkit-tap-highlight-color: transparent;
}

.mt-story-ring__spin {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  animation: mt-story-spin 7s linear infinite;
}

.mt-story-ring__disc {
  position: relative;
  z-index: 1;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  background: #0a0a12;
}

.mt-story-ring .logo-img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 50%;
}

.mt-story-ring:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@keyframes mt-story-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mt-story-ring__spin { animation: none; }
}

/* Nach dem letzten Clip: Ring weg, Logo wieder wie zuvor. */
html.mt-stories-seen .mt-story-ring__spin { display: none; }

html.mt-stories-seen .glass-nav .logo-container,
html.mt-stories-seen .mt-story-ring {
  width: 40px;
  height: 40px;
}

html.mt-stories-seen .mt-story-ring__disc {
  width: 40px;
  height: 40px;
  background: transparent;
}

a.footer-home {
  display: inline-block;
  text-decoration: none;
  color: inherit;
}

.mt-stories {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  background: #000;
}

.mt-stories.is-open { display: flex; }

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

.mt-stories__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  display: block;
}

.mt-stories__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 12px 28px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0));
}

.mt-stories__bars {
  flex: 1;
  display: flex;
  gap: 4px;
  min-width: 0;
}

.mt-stories__bar {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.35);
  overflow: hidden;
}

.mt-stories__bar > span {
  display: block;
  height: 100%;
  width: 100%;
  background: #fff;
  transform: scaleX(0);
  transform-origin: left center;
}

.mt-stories__close {
  width: 32px;
  height: 32px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mt-stories__hit {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 32%;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.mt-stories__hit--prev { left: 0; }
.mt-stories__hit--next { right: 0; width: 68%; }

@media (min-width: 900px) {
  .mt-stories { background: rgba(0, 0, 0, 0.88); }
  .mt-stories__frame {
    width: min(420px, calc(100vw - 48px));
    height: auto;
    max-height: 92dvh;
    aspect-ratio: 9 / 16;
    border-radius: 18px;
  }
}

body.mt-stories-open { overflow: hidden; }
