/* ==========================================================================
   Sidebar Component
   ========================================================================== */

.sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

/* Sidebar Widget Base
   ========================================================================== */
.sidebar-widget {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget-header {
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-primary);
  color: white;
}

.sidebar-widget-title {
  font-size: var(--fs-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
}

.sidebar-widget-content {
  padding: var(--space-md);
}

/* Classification Table Widget
   ========================================================================== */
.classification-tabs {
  display: flex;
  border-bottom: 1px solid var(--color-border);
}

.classification-tab {
  flex: 1;
  padding: var(--space-xs) var(--space-sm);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.classification-tab:hover {
  color: var(--color-secondary);
}

.classification-tab.active {
  color: var(--color-secondary);
  border-bottom: 2px solid var(--color-secondary);
}

.classification-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
}

.classification-table th,
.classification-table td {
  padding: var(--space-xs);
  text-align: center;
}

.classification-table th {
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-border);
}

.classification-table td:first-child {
  text-align: left;
  font-weight: 600;
}

.classification-table tr:nth-child(even) {
  background-color: var(--color-background);
}

.classification-table .team-position {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  font-size: var(--fs-xs);
  font-weight: 700;
  border-radius: 50%;
  margin-right: var(--space-xs);
}

.classification-table .team-position--promotion {
  background-color: #2e7d32;
  color: white;
}

.classification-table .team-position--playoff {
  background-color: #1565c0;
  color: white;
}

.classification-table .team-position--relegation {
  background-color: #c62828;
  color: white;
}

.classification-more {
  display: block;
  padding: var(--space-sm);
  text-align: center;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--color-accent);
  border-top: 1px solid var(--color-border);
}

.classification-more:hover {
  color: var(--color-secondary);
  background-color: var(--color-background);
}

/* Upcoming Matches Widget
   ========================================================================== */
.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.match-item:last-child {
  border-bottom: none;
}

.match-teams {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.match-team {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--fs-sm);
}

.match-team-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.match-info {
  text-align: right;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
}

.match-date {
  font-weight: 600;
  color: var(--color-text);
}

.match-time {
  color: var(--color-secondary);
}

/* Most Read Widget
   ========================================================================== */
.most-read-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--color-border);
}

.most-read-item:first-child {
  padding-top: 0;
}

.most-read-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.most-read-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--color-secondary);
  border: 2px solid var(--color-secondary);
  border-radius: 50%;
}

.most-read-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.3;
  color: var(--color-text);
  transition: color var(--transition-fast);
}

.most-read-item:hover .most-read-title {
  color: var(--color-secondary);
}

/* Ad Widget
   ========================================================================== */
.sidebar-ad {
  background-color: var(--color-surface);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  text-align: center;
}

.sidebar-ad .ad-label {
  display: block;
  font-size: var(--fs-xs);
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.sidebar-ad .ad-container {
  margin: 0;
}
