/*!
 * CDO Global — кнопка «Поделиться» для встроенных видео (пара к /assets/video-share.js).
 * Самодостаточные цвета: панель и кнопка выглядят одинаково на тёмных и светлых страницах.
 * Установлено: 2026-09-17.
 */
.cdo-share-host { position: relative; }

/* Кнопка в правом верхнем углу плеера */
.cdo-share-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(10, 14, 12, 0.62);
  color: #fff;
  font: 600 14px/1 Manrope, Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: background 0.18s ease, border-color 0.18s ease, opacity 0.25s ease, transform 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}
.cdo-share-btn svg { flex: 0 0 auto; }
.cdo-share-btn:hover { background: rgba(10, 14, 12, 0.85); border-color: rgba(255, 255, 255, 0.6); transform: translateY(-1px); }
.cdo-share-btn:active { transform: translateY(0); }
.cdo-share-btn:focus-visible { outline: 3px solid #84cc16; outline-offset: 2px; }

/* Во время воспроизведения кнопка уходит в тень и появляется при наведении или фокусе */
.video-frame.is-playing .cdo-share-btn { opacity: 0; }
.video-frame.is-playing:hover .cdo-share-btn,
.video-frame.is-playing:focus-within .cdo-share-btn,
.video-frame.is-playing .cdo-share-btn:focus-visible { opacity: 1; }
@media (hover: none) {
  .video-frame.is-playing .cdo-share-btn { opacity: 0.85; }
}

@media (max-width: 560px) {
  .cdo-share-btn { top: 10px; right: 10px; padding: 9px; font-size: 13px; }
  .cdo-share-btn-label { display: none; }
}

/* Подсветка плеера при переходе по ссылке с якорем */
.video-frame.is-share-target { animation: cdo-share-target 2.4s ease-out; }
@keyframes cdo-share-target {
  0%   { box-shadow: 0 0 0 0 rgba(132, 204, 22, 0.0); }
  15%  { box-shadow: 0 0 0 6px rgba(132, 204, 22, 0.75); }
  100% { box-shadow: 0 0 0 6px rgba(132, 204, 22, 0); }
}

/* Панель под плеером */
.cdo-share-panel {
  box-sizing: border-box;
  max-width: 1000px;
  margin: 14px auto 0;
  padding: 16px 18px 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: #10151a;
  color: #e7ece8;
  font-family: Manrope, Inter, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  animation: cdo-share-in 0.22s ease-out;
}
.cdo-share-panel[hidden] { display: none; }
.cdo-share-panel * { box-sizing: border-box; }
@keyframes cdo-share-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.cdo-share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.cdo-share-title { font-size: 15px; font-weight: 700; line-height: 1.35; color: #fff; }
.cdo-share-close {
  flex: 0 0 auto;
  width: 32px; height: 32px;
  margin: -6px -8px 0 0;
  border: 0; border-radius: 8px;
  background: transparent; color: #a9b3ad;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.cdo-share-close:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.cdo-share-close:focus-visible { outline: 3px solid #84cc16; outline-offset: 1px; }

.cdo-share-status {
  display: flex; align-items: center; gap: 8px;
  margin: 10px 0 0;
  font-size: 13.5px; font-weight: 600;
  color: #b7f26a;
}
.cdo-share-status.is-fail { color: #ffb4a2; }
.cdo-share-status-ico { display: inline-flex; width: 20px; height: 20px; align-items: center; justify-content: center; border-radius: 50%; background: rgba(132, 204, 22, 0.18); }
.cdo-share-status.is-fail .cdo-share-status-ico { display: none; }
.cdo-share-status:empty { display: none; }

.cdo-share-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.cdo-share-url {
  flex: 1 1 260px;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font: 500 14px/42px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-overflow: ellipsis;
}
.cdo-share-url:focus { outline: 2px solid #84cc16; outline-offset: 0; border-color: transparent; }
.cdo-share-copy, .cdo-share-native {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 7px;
  height: 42px; padding: 0 16px;
  border-radius: 10px; cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.cdo-share-copy { border: 0; background: #84cc16; color: #10210a; }
.cdo-share-copy:hover { background: #9be32a; }
.cdo-share-native { border: 1px solid rgba(255, 255, 255, 0.28); background: transparent; color: #fff; }
.cdo-share-native:hover { background: rgba(255, 255, 255, 0.08); }
.cdo-share-copy:focus-visible, .cdo-share-native:focus-visible { outline: 3px solid #84cc16; outline-offset: 2px; }

.cdo-share-desc { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: #cfd6d1; }
.cdo-share-hint { margin: 10px 0 0; font-size: 12.5px; line-height: 1.45; color: #8f9a93; }

@media (max-width: 560px) {
  .cdo-share-panel { padding: 14px 14px 12px; border-radius: 14px; }
  .cdo-share-url { flex-basis: 100%; }
  .cdo-share-copy, .cdo-share-native { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .cdo-share-btn, .cdo-share-panel, .video-frame.is-share-target { transition: none; animation: none; }
  .video-frame.is-share-target { box-shadow: 0 0 0 4px rgba(132, 204, 22, 0.7); }
}
