/* Social Sentiment Trend Widget Styles */

/* Proxima Nova Font Faces */
@font-face {
    font-family: 'Proxima Nova';
    src: url('../../web-fonts/fonts/proximanova-regular.woff2.woff') format('woff2'),
         url('../../web-fonts/fonts/proximanova-regular.woff.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('../../web-fonts/fonts/proximanova-medium.woff2.woff') format('woff2'),
         url('../../web-fonts/fonts/proximanova-medium.woff.woff') format('woff');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('../../web-fonts/fonts/proximanova-semibold.woff2.woff') format('woff2'),
         url('../../web-fonts/fonts/proximanova-semibold.woff.woff') format('woff');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Proxima Nova';
    src: url('../../web-fonts/fonts/proximanova-bold.woff2.woff') format('woff2'),
         url('../../web-fonts/fonts/proximanova-bold.woff.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.chart-card {
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.chart-header {
  margin-bottom: 15px;
}

.chart-title-row {
  margin-bottom: 12px;
}

.chart-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.chart-subtitle {
  font-size: 13px;
  color: #6b7280;
}

#subjectLabel {
  font-weight: 500;
  color: #374151;
}

#industryLabel {
  color: #9ca3af;
}

.header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.button-group {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.period-btn {
  height: 28px;
  padding: 4px 12px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: #374151;
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.period-btn:hover {
  background: #f3f4f6;
}

.period-btn.active {
  background: transparent;
  color: #374151;
  font-weight: 600;
}

.chart-container {
  flex: 1;
  min-height: 300px;
  margin-bottom: 0;
}

#sentimentChart {
  width: 100%;
  height: 100%;
}

.chart-legend {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-right: 90px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color {
  width: 16px;
  height: 3px;
  border-radius: 1px;
}

.legend-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .chart-card {
    padding: 15px;
  }
  
  .chart-title {
    font-size: 16px;
  }
  
  .chart-subtitle {
    font-size: 12px;
  }
  
  .header-controls {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .period-btn {
    height: 26px;
    padding: 4px 10px;
    font-size: 12px;
  }
  
  .chart-container {
    min-height: 300px;
  }
  
  .chart-legend {
    gap: 10px;
    margin-right: 0;
  }
  
  .legend-label {
    font-size: 11px;
  }
}

/* Small screens - keep 300px height */
@media (max-width: 360px) {
  .chart-card {
    padding: 12px;
  }
  
  .chart-container {
    min-height: 300px;
  }
}

/* Loading state */
.chart-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #9ca3af;
  font-size: 14px;
}

/* Error state */
.chart-error {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 300px;
  color: #dc2626;
  font-size: 14px;
}

/* Skeleton Loading */
@keyframes skeleton-shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}

.skeleton {
  background: linear-gradient(90deg, #f0f2f5 25%, #e4e7ec 50%, #f0f2f5 75%);
  background-size: 1200px 100%;
  animation: skeleton-shimmer 1.6s infinite linear;
  border-radius: 4px;
}

.skeleton-subtitle {
  height: 13px;
  width: 140px;
}

.chart-skeleton {
  width: 100%;
}

.skeleton-chart-area {
  width: 100%;
  height: 300px;
  border-radius: 4px;
}
