/**
 * =====================================================
 * BROADCAST PROGRESS BAR STYLES
 * =====================================================
 * 
 * Стили для real-time прогресс-бара массовых рассылок
 * 
 * @package FCNC_Chat_Extended
 * @since 1.3.0
 */

/* ============================================
   КОНТЕЙНЕР ПРОГРЕСС-БАРОВ
   ============================================ */
#fcnc-broadcast-progress-wrapper {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 99999;
  width: 400px;
  max-width: calc(100vw - 40px);
}

/* ============================================
   ПРОГРЕСС-БАР (КАРТОЧКА)
   ============================================ */
.fcnc-broadcast-progress-container {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
  margin-bottom: 16px;
  overflow: hidden;
  animation: fcncSlideIn 0.3s ease;
}

/* Анимация появления */
@keyframes fcncSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   ЗАГОЛОВОК
   ============================================ */
.fcnc-progress-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.fcnc-progress-title {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fcnc-progress-title i {
  font-size: 18px;
  animation: fcncPulse 2s infinite;
}

@keyframes fcncPulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.fcnc-progress-cancel {
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  padding: 6px 12px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.fcnc-progress-cancel:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.fcnc-progress-cancel:active {
  transform: scale(0.95);
}

/* ============================================
   ТЕЛО (ПРОГРЕСС)
   ============================================ */
.fcnc-progress-body {
  padding: 20px;
}

.fcnc-progress-stats {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  text-align: center;
}

.fcnc-progress-current {
  font-weight: 700;
  color: #667eea;
  font-size: 18px;
}

.fcnc-progress-total {
  font-weight: 600;
  color: #333;
}

/* ============================================
   ПРОГРЕСС-БАР
   ============================================ */
.fcnc-progress-bar-container {
  height: 24px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
  position: relative;
}

.fcnc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 40px; /* Минимальная ширина чтобы процент был виден */
}

.fcnc-progress-percent {
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Анимация полосок на прогресс-баре */
.fcnc-progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
  animation: fcncStripes 1s linear infinite;
}

@keyframes fcncStripes {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 20px 0;
  }
}

/* ============================================
   СТАТУС
   ============================================ */
.fcnc-progress-status {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.fcnc-progress-status.status-pending {
  background: #f8f9fa;
  color: #666;
}

.fcnc-progress-status.status-processing {
  background: #e3f2fd;
  color: #1976d2;
}

.fcnc-progress-status.status-completed {
  background: #d4edda;
  color: #155724;
  font-weight: 600;
}

.fcnc-progress-status.status-failed {
  background: #f8d7da;
  color: #721c24;
}

.fcnc-progress-status.status-cancelled {
  background: #fff3cd;
  color: #856404;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
  #fcnc-broadcast-progress-wrapper {
    width: 100%;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 0 10px 10px;
  }

  .fcnc-broadcast-progress-container {
    border-radius: 12px 12px 0 0;
  }

  .fcnc-progress-header {
    padding: 12px 16px;
  }

  .fcnc-progress-title {
    font-size: 14px;
  }

  .fcnc-progress-body {
    padding: 16px;
  }

  .fcnc-progress-bar-container {
    height: 20px;
  }

  .fcnc-progress-percent {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .fcnc-progress-cancel {
    padding: 4px 8px;
    font-size: 12px;
  }

  .fcnc-progress-cancel i {
    display: none; /* Скрываем иконку на очень маленьких экранах */
  }
}

