/* ==========================================================================
   ТВ ПОВТОР — СТИЛИ СОЦИАЛЬНОГО ШАРИНГА И ГЛУБОКИХ ССЫЛОК (DEEP LINKING)
   Премиальное модальное окно, кнопки социальных сетей,
   копирование с таймкодом и поддержка системного меню обмена.
   ========================================================================== */

/* Кнопка шаринга в контролах плеера */
.ctrl-share-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 1rem;
}

.ctrl-share-btn:hover {
  background: rgba(59, 130, 246, 0.3);
  border-color: #3b82f6;
  color: #93c5fd;
  transform: scale(1.06);
}

/* Кнопка шаринга в карточках EPG */
.epg-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  cursor: pointer;
  font-size: 0.78rem;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.epg-share-btn:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: #3b82f6;
  color: #60a5fa;
  transform: scale(1.1);
}

/* Модальное окно «Поделиться» */
.share-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10005;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  animation: shareFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.share-modal-backdrop.active {
  display: flex;
}

@keyframes shareFadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to { opacity: 1; transform: scale(1); }
}

.share-modal-card {
  background: #0d1322;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-sizing: border-box;
  position: relative;
}

/* Шапка модального окна */
.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 14px;
}

.share-modal-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.share-modal-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.15s ease;
}

.share-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Информационная карточка расшариваемой передачи */
.share-preview-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #131b2e;
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.share-preview-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #080c16;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  flex-shrink: 0;
}

.share-preview-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.share-preview-details {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1;
}

.share-preview-channel {
  font-size: 0.82rem;
  font-weight: 700;
  color: #60a5fa;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-preview-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  letter-spacing: 0.4px;
}

.share-preview-badge.live {
  background: #ef4444;
  color: #ffffff;
}

.share-preview-badge.archive {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
}

.share-preview-title {
  font-size: 0.96rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

.share-preview-time {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* Опция привязки таймкода */
.share-timestamp-option {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  cursor: pointer;
  user-select: none;
}

.share-timestamp-option input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: #3b82f6;
  cursor: pointer;
}

.share-timestamp-label {
  font-size: 0.88rem;
  color: #cbd5e1;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.share-timestamp-value {
  font-weight: 800;
  color: #60a5fa;
  background: rgba(59, 130, 246, 0.15);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.82rem;
}

/* Поле ссылки и кнопка копирования */
.share-link-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.share-link-input {
  flex: 1;
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  padding: 11px 14px;
  font-size: 0.88rem;
  color: #94a3b8;
  font-family: monospace;
  outline: none;
  box-sizing: border-box;
}

.share-link-input:focus {
  border-color: #3b82f6;
  color: #ffffff;
}

.share-copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border: none;
  color: #ffffff;
  padding: 11px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.35);
}

.share-copy-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(59, 130, 246, 0.5);
}

.share-copy-btn.copied {
  background: #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Кнопки соцсетей */
.share-networks-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.share-networks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.share-network-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.share-network-btn.telegram {
  background: rgba(36, 161, 222, 0.15);
  border-color: rgba(36, 161, 222, 0.4);
}
.share-network-btn.telegram:hover {
  background: #24a1de;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(36, 161, 222, 0.4);
}

.share-network-btn.vk {
  background: rgba(0, 119, 255, 0.15);
  border-color: rgba(0, 119, 255, 0.4);
}
.share-network-btn.vk:hover {
  background: #0077ff;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 119, 255, 0.4);
}

.share-network-btn.whatsapp {
  background: rgba(37, 211, 102, 0.15);
  border-color: rgba(37, 211, 102, 0.4);
}
.share-network-btn.whatsapp:hover {
  background: #25d366;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(37, 211, 102, 0.4);
}

.share-network-btn.ok {
  background: rgba(238, 130, 8, 0.15);
  border-color: rgba(238, 130, 8, 0.4);
}
.share-network-btn.ok:hover {
  background: #ee8208;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(238, 130, 8, 0.4);
}

.share-network-icon {
  font-size: 1.3rem;
  line-height: 1;
}

/* Системное меню обмена (на мобильных) */
.share-native-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.share-native-btn:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

/* Адаптив для мобильных экранов */
@media (max-width: 480px) {
  .share-modal-card {
    padding: 18px 14px;
    gap: 14px;
  }
  .share-networks-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
