/* ══════════════════════════════════════════════════════════════
   Ailo Chat — Видео-плеер (попап)
   Полноэкранный overlay, открывается из welcome-карусели.
   Свои селекторы (.ailo-video-modal__*), независимы от сторонних
   сниппетов. Поверх всей страницы и поверх drawer'а чата.
   ══════════════════════════════════════════════════════════════ */

.ailo-video-modal {
  position: fixed;
  inset: 0;
  /* fallback для старых Chrome Android — см. README known gotchas */
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

.ailo-video-modal.is-open {
  display: flex;
}

.ailo-video-modal__backdrop {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;
  background: rgba(0, 0, 0, 0.78);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.ailo-video-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 960px;
  max-height: calc(100vh - 32px);
  background: #1a1a1a;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.ailo-video-modal__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ailo-video-modal__title {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.ailo-video-modal__close {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background 150ms ease;
}

.ailo-video-modal__close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ailo-video-modal__close svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  fill: #fff;
}

.ailo-video-modal__body {
  flex: 1;
  min-height: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ailo-video-modal__video {
  width: 100%;
  height: auto;
  max-height: 100%;
  display: block;
}

.ailo-video-modal__foot {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px;
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ailo-video-modal__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: var(--ailo-brand, #FF2D87);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 100px;
  transition: opacity 150ms ease;
}

.ailo-video-modal__cta:hover {
  opacity: 0.9;
  color: #fff;
}

.ailo-video-modal__cta svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Блок прокрутки страницы пока попап открыт */
body.ailo-video-modal-open {
  overflow: hidden;
}

/* Mobile: 9:16 видео, dialog почти на весь экран */
@media (max-width: 768px) {
  .ailo-video-modal {
    padding: 0;
  }
  .ailo-video-modal__dialog {
    max-height: 100vh;
    border-radius: 0;
  }
}
