/* News & Social Media Panel Styles */

/* Placeholder for News & Social Media Panel Image */
.news-social-panel-placeholder {
  width: 300px;
  height: 220px;
  background: var(--card-bg, rgba(26, 26, 26, 0.8));
  border: 2px solid var(--border-color, rgba(102, 126, 234, 0.2));
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  padding: 1rem;
}

.news-social-panel-placeholder::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.15), transparent);
  animation: shimmer 4s infinite;
}

.news-social-panel-placeholder:hover {
  transform: scale(1.05) rotate(1deg);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(102, 126, 234, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.panel-icon-container {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

.panel-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  animation: float 4s ease-in-out infinite;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.panel-icon:nth-child(2) {
  animation-delay: 1s;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.panel-icon:nth-child(3) {
  animation-delay: 2s;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.panel-icon:hover {
  transform: scale(1.1) rotate(5deg);
}

.panel-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color, #ffffff);
  text-align: center;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.panel-subtitle {
  font-size: 0.8rem;
  color: var(--secondary-text, #a1a1aa);
  text-align: center;
  opacity: 0.8;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.panel-metrics {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  justify-content: space-between;
  gap: 0.375rem;
}

.panel-metric {
  background: rgba(102, 126, 234, 0.15);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  text-align: center;
  flex: 1;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  min-width: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.panel-metric::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1), transparent);
  transition: left 0.5s ease;
}

.panel-metric:hover::before {
  left: 100%;
}

.panel-metric:hover {
  transform: translateY(-2px);
  background: rgba(102, 126, 234, 0.25);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.metric-number {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-color, #ffffff);
  display: block;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-label {
  font-size: 0.55rem;
  color: var(--secondary-text, #71717a);
  margin-top: 0.125rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Animated data streams */
.data-stream {
  position: absolute;
  width: 2px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 1px;
  opacity: 0.6;
  animation: dataFlow 2s linear infinite;
}

.stream-1 {
  height: 16px;
  top: 25%;
  left: 15%;
  animation-delay: 0s;
}

.stream-2 {
  height: 12px;
  top: 45%;
  right: 20%;
  animation-delay: 0.5s;
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.stream-3 {
  height: 20px;
  top: 65%;
  left: 65%;
  animation-delay: 1s;
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* Hide data streams on very small screens to reduce clutter */
@media (max-width: 480px) {
  .data-stream {
    display: none;
  }
}

@keyframes dataFlow {
  0% {
    transform: translateY(-10px);
    opacity: 0;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(10px);
    opacity: 0;
  }
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

/* Light mode adjustments */
html.light .news-social-panel-placeholder,
[data-theme="light"] .news-social-panel-placeholder {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(102, 126, 234, 0.2);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.light .news-social-panel-placeholder:hover,
[data-theme="light"] .news-social-panel-placeholder:hover {
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(59, 130, 246, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html.light .panel-metric,
[data-theme="light"] .panel-metric {
  background: rgba(102, 126, 234, 0.08);
  border-color: rgba(102, 126, 234, 0.15);
}

html.light .panel-metric:hover,
[data-theme="light"] .panel-metric:hover {
  background: rgba(102, 126, 234, 0.12);
  border-color: rgba(102, 126, 234, 0.25);
}

html.light .panel-title,
[data-theme="light"] .panel-title {
  color: var(--text-color, #0f172a);
}

html.light .panel-subtitle,
[data-theme="light"] .panel-subtitle {
  color: var(--secondary-text, #475569);
}

html.light .metric-number,
[data-theme="light"] .metric-number {
  color: var(--text-color, #0f172a);
}

html.light .metric-label,
[data-theme="light"] .metric-label {
  color: var(--secondary-text, #64748b);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .news-social-panel-placeholder {
    width: 280px;
    height: 200px;
  }
  
  .panel-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  
  .panel-title {
    font-size: 0.95rem;
  }
  
  .panel-subtitle {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  .news-social-panel-placeholder {
    width: 100%;
    max-width: 320px;
    height: 180px;
    padding: 0.75rem;
    margin: 0 auto;
  }
  
  .panel-icon-container {
    gap: 0.5rem;
    margin-bottom: 0.5rem;
  }
  
  .panel-icon {
    width: 32px;
    height: 32px;
    font-size: 1rem;
    border-radius: 8px;
  }
  
  .panel-title {
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
  }
  
  .panel-subtitle {
    font-size: 0.7rem;
    margin-bottom: 0.75rem;
  }
  
  .panel-metric {
    padding: 0.2rem 0.3rem;
    border-radius: 6px;
  }
  
  .metric-number {
    font-size: 0.7rem;
  }
  
  .metric-label {
    font-size: 0.5rem;
  }
}

@media (max-width: 640px) {
  .news-social-panel-placeholder {
    width: 100%;
    max-width: 280px;
    height: 160px;
    padding: 0.625rem;
    margin: 0 auto;
  }
  
  .panel-icon-container {
    gap: 0.375rem;
    margin-bottom: 0.375rem;
    margin-top: 0.25rem;
  }
  
  .panel-icon {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    border-radius: 6px;
  }
  
  .panel-title {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  
  .panel-subtitle {
    font-size: 0.65rem;
    margin-bottom: 0.5rem;
  }
  
  .panel-metric {
    padding: 0.15rem 0.3rem;
  }
  
  .metric-number {
    font-size: 0.65rem;
  }
  
  .metric-label {
    font-size: 0.45rem;
  }
}

@media (max-width: 480px) {
  .news-social-panel-placeholder {
    width: 100%;
    max-width: 260px;
    height: 140px;
    padding: 0.5rem;
    margin: 0 auto;
  }
  
  .panel-icon-container {
    gap: 0.25rem;
    margin-bottom: 0.25rem;
    margin-top: 0.125rem;
  }
  
  .panel-icon {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
    border-radius: 4px;
  }
  
  .panel-title {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
  }
  
  .panel-subtitle {
    font-size: 0.6rem;
    margin-bottom: 0.375rem;
  }

  
  .panel-metric {
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
  }
  
  .metric-number {
    font-size: 0.6rem;
  }
  
  .metric-label {
    font-size: 0.4rem;
  }
}

@media (max-width: 360px) {
  .news-social-panel-placeholder {
    width: 100%;
    max-width: 240px;
    height: 120px;
    padding: 0.375rem;
    margin: 0 auto;
  }
  
  .panel-icon-container {
    gap: 0.2rem;
    margin-bottom: 0.2rem;
  }
  
  .panel-icon {
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
  }
  
  .panel-title {
    font-size: 0.75rem;
    margin-bottom: 0.15rem;
  }
  
  .panel-subtitle {
    font-size: 0.55rem;
    margin-bottom: 0.25rem;
  }
  
  
  .panel-metric {
    padding: 0.1rem 0.2rem;
  }
  
  .metric-number {
    font-size: 0.55rem;
  }
  
  .metric-label {
    font-size: 0.35rem;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .news-social-panel-placeholder,
  .panel-icon,
  .data-stream {
    animation: none !important;
  }
  
  .news-social-panel-placeholder:hover,
  .panel-icon:hover {
    transform: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .news-social-panel-placeholder {
    border-width: 3px;
    box-shadow: none;
  }
  
  .panel-metric {
    border-width: 2px;
  }
}