@use '../../../_chart-shared';

.publication-trend-container {
  width: 100%;
}

.trend-title-icon {
  font-size: 1.5rem;
  color: #06b6d4;
}

.year-range-badge {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #22d3ee;
  white-space: nowrap;
}

.chart-wrapper {
  position: relative;
  height: 380px;
  width: 100%;
}

.insights-section {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.insights-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.insight-item {
  flex: 1;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.75rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);

  .insight-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary-color);
    margin-bottom: 0.25rem;
  }

  .insight-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color, #ffffff);
  }

  .insight-detail {
    font-size: 0.75rem;
    color: var(--text-secondary-color);
    margin-top: 0.25rem;
  }

  &.peak {
    .insight-value {
      color: #f59e0b;
    }
  }

  &.recent {
    .insight-value {
      color: #06b6d4;
    }
  }

  &.average {
    .insight-value {
      color: #a78bfa;
    }
  }

  &.productive {
    .insight-value {
      color: #4ade80;
      font-size: 1.25rem;
    }
  }

  &.timespan {
    .insight-value {
      color: #f472b6;
    }
  }

  &.century21 {
    .insight-value {
      color: #38bdf8;
    }
  }

  &.classics {
    .insight-value {
      color: #fbbf24;
    }
  }

  &.unique {
    .insight-value {
      color: #c084fc;
    }
  }
}

@media (max-width: 768px) {
  .chart-wrapper {
    height: 320px;
  }

  .insights-row {
    gap: 0.75rem;
  }

  .insight-item {
    padding: 0.6rem;
    min-width: 100px;

    .insight-value {
      font-size: 1.25rem;
    }

    &.productive .insight-value {
      font-size: 1.1rem;
    }
  }
}

@media (max-width: 480px) {
  .chart-wrapper {
    height: 280px;
  }

  .year-range-badge {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
  }

  .insights-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  .insight-item {
    min-width: unset;
    padding: 0.5rem;

    .insight-value {
      font-size: 1.1rem;
    }

    .insight-label {
      font-size: 0.65rem;
    }

    &.productive .insight-value {
      font-size: 1rem;
    }
  }
}
