/**
 * Masters Audience Metrics Plugin Styles
 * Version: 0.1.0
 */

/* Hero Cards */
.mr-metrics-hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.mr-metric-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: box-shadow 0.3s ease;
}

.mr-metric-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mr-metric-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  margin-bottom: 0.75rem;
  text-transform: capitalize;
}

.mr-metric-kpi {
  font-size: 1.5rem;
  font-weight: 600;
  color: #4A90E2;
  margin-bottom: 0.5rem;
}

.mr-metric-sub {
  font-size: 0.875rem;
  color: #666;
  line-height: 1.6;
}

.mr-metric-sub span {
  display: inline-block;
  margin-right: 0.5rem;
}

/* Freshness Display */
.mr-metrics-freshness {
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
}

.mr-metrics-freshness h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
}

.mr-fresh-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

.mr-fresh-row:last-child {
  border-bottom: none;
}

.mr-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.mr-badge-success {
  background: #d4edda;
  color: #155724;
}

.mr-badge-warning {
  background: #fff3cd;
  color: #856404;
}

.mr-badge-error {
  background: #f8d7da;
  color: #721c24;
}

/* Channel Cards with Sparklines */
.mr-channel-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.mr-channel-card {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.mr-channel-card h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #333;
  font-size: 1.125rem;
}

.mr-sparkline {
  margin-bottom: 1rem;
}

.mr-sparkline-svg {
  width: 100%;
  height: auto;
}

.mr-stats {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #666;
}

.mr-stats div {
  display: flex;
  justify-content: space-between;
}

/* Top Content */
.mr-top-content {
  margin: 2rem 0;
}

.mr-top-content h3 {
  margin-bottom: 1.5rem;
  color: #333;
}

.mr-content-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.mr-content-item {
  display: flex;
  gap: 1rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1rem;
  transition: box-shadow 0.3s ease;
}

.mr-content-item:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.mr-content-thumb {
  flex-shrink: 0;
  width: 120px;
  height: 90px;
  overflow: hidden;
  border-radius: 4px;
}

.mr-content-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mr-content-info {
  flex-grow: 1;
}

.mr-content-info h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.mr-content-info h4 a {
  color: #333;
  text-decoration: none;
}

.mr-content-info h4 a:hover {
  color: #4A90E2;
  text-decoration: underline;
}

.mr-content-stats {
  font-size: 0.875rem;
  color: #666;
}

.mr-content-stats span {
  margin-right: 0.75rem;
}

/* Error/Empty States */
.mr-metrics-error,
.mr-metrics-empty {
  background: #fff3cd;
  border: 1px solid #ffc107;
  border-radius: 8px;
  padding: 1.5rem;
  margin: 2rem 0;
  color: #856404;
  text-align: center;
}

.mr-metrics-empty {
  background: #f9f9f9;
  border-color: #ddd;
  color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .mr-metrics-hero,
  .mr-channel-cards {
    grid-template-columns: 1fr;
  }

  .mr-content-item {
    flex-direction: column;
  }

  .mr-content-thumb {
    width: 100%;
    height: 180px;
  }
}
