/* Music Coast — YouTube language preference + floating mini-player */

.mc-video-slot {
  position: relative;
}

.mc-video-slot.is-floating-active {
  height: var(--mc-video-slot-height, auto);
}

.mc-video-shell {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #000;
}

.mc-video-shell iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.mc-video-float-close,
.mc-video-float-badge {
  position: absolute;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.mc-video-float-close {
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 15, 20, 0.8);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

.mc-video-float-close:hover,
.mc-video-float-close:focus-visible {
  background: rgba(15, 15, 20, 0.92);
}

.mc-video-float-badge {
  top: 14px;
  left: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(15, 15, 20, 0.72);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transform: translateY(-4px);
}

.mc-video-shell.is-floating {
  position: fixed;
  top: calc(var(--header-height, 84px) + 18px);
  right: max(18px, env(safe-area-inset-right));
  width: min(420px, 34vw);
  max-width: calc(100vw - 24px);
  aspect-ratio: 16 / 9;
  margin: 0;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
  z-index: 900;
  transform: translateY(0) scale(1);
}

.mc-video-shell.is-floating .mc-video-float-close,
.mc-video-shell.is-floating .mc-video-float-badge {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.mc-video-shell.is-floating iframe {
  background: #000;
}

body.page-article .mc-video-slot,
body.page-interview .mc-video-slot {
  margin: var(--space-xl) 0;
}

@media (prefers-reduced-motion: no-preference) {
  .mc-video-shell {
    transition: box-shadow 200ms ease, border-color 200ms ease, transform 220ms ease;
  }

  .mc-video-shell.is-floating {
    animation: mcVideoFloatIn 180ms ease-out;
  }

  @keyframes mcVideoFloatIn {
    from {
      opacity: 0;
      transform: translateY(10px) scale(0.985);
    }
    to {
      opacity: 1;
      transform: translateY(0) scale(1);
    }
  }
}

@media (max-width: 920px) {
  .mc-video-shell.is-floating {
    width: min(82vw, 360px);
    top: auto;
    bottom: calc(14px + env(safe-area-inset-bottom));
    right: 12px;
  }
}

@media (max-width: 640px) {
  .mc-video-float-close {
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .mc-video-float-badge {
    font-size: 0.76rem;
    padding: 7px 11px;
  }

  .mc-video-shell.is-floating {
    width: min(88vw, 330px);
  }
}
