/* Self-contained video component. The home entry occupies existing spacing. */
.ccn-app-video-entry--home {
  position: absolute;
  z-index: 3;
  top: 24px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

/* Zero-height bridge: fits between the existing plans sections without moving them. */
.ccn-app-video-entry--plans {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  height: 0;
}

.ccn-app-video-entry--plans .ccn-app-video-link {
  position: absolute;
  top: 0;
  width: max-content;
  max-width: calc(100vw - 32px);
  transform: translateY(-50%);
  border-color: #d6c7ed;
  background: #fff;
  box-shadow: 0 4px 16px rgba(53, 22, 99, .12);
  color: #60359c;
  font-family: var(--sans, "Inter", system-ui, sans-serif);
}

.ccn-app-video-entry--plans .ccn-app-video-link__play {
  border-color: #ddd0f4;
  background: #f1ebfc;
  color: #7c3aed;
}

.ccn-app-video-entry--plans .ccn-app-video-link:hover {
  border-color: #a78bdb;
  background: #faf7ff;
  color: #4c1d95;
}

.ccn-app-video--plans { --font-sans: "Inter", system-ui, sans-serif; }

/* Let the video invitation remain readable when the floating assistant crosses it. */
ccn-assistant.ccn-app-video-clearance { opacity: 0; }

.ccn-app-video-entry--plans .ccn-app-video-link:focus-visible {
  outline-color: #4c1d95;
  box-shadow: 0 0 0 5px #fff;
}

.ccn-app-video-link {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  max-width: 100%;
  padding: 8px 19px 8px 12px;
  border: 1px solid rgba(167, 139, 250, .38);
  border-radius: 999px;
  background: linear-gradient(115deg, #211a32, #14131d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
  color: #eee8ff;
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: center;
  text-decoration: none;
  text-transform: none;
  pointer-events: auto;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.ccn-app-video-link__play {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid rgba(196, 181, 253, .27);
  border-radius: 50%;
  background: rgba(139, 92, 246, .14);
  color: #c4b5fd;
}

.ccn-app-video-link__play svg {
  display: block;
  width: 12px;
  height: 12px;
  margin-left: 2px;
}

@media (hover: hover) {
  .ccn-app-video-link:hover {
    border-color: rgba(196, 181, 253, .72);
    background: linear-gradient(115deg, #2a2042, #1a1725);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .15), inset 0 1px 0 rgba(255, 255, 255, .055);
    color: #fff;
  }
}

.ccn-app-video-link:focus-visible,
.ccn-app-video__close:focus-visible,
.ccn-app-video__external:focus-visible {
  outline: 2px solid #c4b5fd;
  outline-offset: 4px;
}

html.ccn-app-video-open {
  overflow: hidden;
}

html.ccn-app-video-open.ccn-app-video-keep-gutter {
  scrollbar-gutter: stable;
  background: #05060b;
}

.ccn-app-video {
  box-sizing: border-box;
  width: min(960px, calc(100vw - 32px), calc((100dvh - 176px) * 16 / 9));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(196, 181, 253, .24);
  border-radius: 20px;
  background: #11121b;
  color: #e7e9ee;
  box-shadow: 0 28px 100px rgba(0, 0, 0, .65);
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif);
  text-align: left;
}

.ccn-app-video::backdrop {
  background: rgba(5, 6, 11, .86);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.ccn-app-video__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px 14px 22px;
}

.ccn-app-video .ccn-app-video__title {
  margin: 0;
  color: #f2edff;
  font-family: var(--font-sans, "Manrope", system-ui, sans-serif) !important;
  font-size: 17px !important;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0 !important;
  text-transform: none !important;
  text-shadow: none !important;
}

.ccn-app-video__close {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 50%;
  background: rgba(255, 255, 255, .045);
  color: #e7e9ee;
  cursor: pointer;
}

.ccn-app-video__close:hover {
  border-color: rgba(196, 181, 253, .6);
  background: rgba(139, 92, 246, .13);
}

.ccn-app-video__close svg {
  display: block;
  width: 19px;
  height: 19px;
}

.ccn-app-video__player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
}

.ccn-app-video__player iframe {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.ccn-app-video__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 14px 22px;
  font-size: 12px;
  line-height: 1.5;
}

.ccn-app-video__footer span { color: #a6a4b5; }
.ccn-app-video__external { color: #c4b5fd; text-underline-offset: 3px; }
.ccn-app-video__external:hover { color: #fff; }

@media (max-width: 820px) {
  .ccn-app-video-entry--home { top: 68px; }
}

@media (max-width: 480px) {
  .ccn-app-video { border-radius: 16px; }
  .ccn-app-video__header { gap: 8px; padding: 12px; }
  .ccn-app-video .ccn-app-video__title { font-size: 15px !important; }
  .ccn-app-video__footer { padding: 12px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .ccn-app-video-link { transition: none; }
}
