/* Kerlackilive Public Styles - Reference Design Inspired */

.kerlackilive-ticker {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  max-width: 100%;
  margin: 0 auto;
  background: #f8f9fa;
  border-radius: 8px;
  overflow: hidden;
}

.kerlackilive-no-matches {
  padding: 30px;
  text-align: center;
  background: #fff;
  color: #666;
}

/* Leagues container for grouped display */
.kerlackilive-leagues-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* League section styling similar to reference */
.kerlackilive-league-section {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.kerlackilive-league-section:last-child {
  border-bottom: none;
}

/* League header with flag and title */
.kerlackilive-league-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8f9fa;
  border-bottom: 1px solid #e5e7eb;
}

.kerlackilive-league-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.kerlackilive-league-flag {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 2px;
}

.kerlackilive-league-title {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
}

.kerlackilive-league-link {
  font-size: 13px;
  color: #6b7280;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.kerlackilive-league-link:hover {
  color: #1f2937;
}

/* Compact horizontal match rows */
.kerlackilive-matches-list {
  display: flex;
  flex-direction: column;
}

.kerlackilive-match-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background-color 0.2s;
}

.kerlackilive-match-row:hover {
  background-color: #f9fafb;
}

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

/* Match number with favorite star */
.kerlackilive-match-number {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 60px;
}

.kerlackilive-favorite-btn {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: #d1d5db;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.kerlackilive-favorite-btn:hover {
  color: #fbbf24;
}

.kerlackilive-favorite-btn.active {
  color: #fbbf24;
}

.kerlackilive-match-id {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  min-width: 24px;
}

/* Team info in horizontal layout */
.kerlackilive-team-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.kerlackilive-team-info.home {
  justify-content: flex-start;
}

.kerlackilive-team-info.away {
  justify-content: flex-start;
}

.kerlackilive-team-logo {
  width: 24px;
  height: 24px;
  object-fit: contain;
  flex-shrink: 0;
}

.kerlackilive-team-name {
  font-size: 14px;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Score display */
.kerlackilive-match-score {
  min-width: 32px;
  text-align: center;
}

.kerlackilive-score-display {
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}

.kerlackilive-score-display.scheduled {
  color: #9ca3af;
  font-weight: 400;
}

.kerlackilive-score-display.live {
  color: #dc2626;
}

.kerlackilive-score-display.finished {
  color: #1f2937;
}

/* Live badge with pulsing dot */
.kerlackilive-live-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
}

.kerlackilive-live-dot {
  width: 8px;
  height: 8px;
  background: #dc2626;
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.1);
  }
}

/* Time and status display */
.kerlackilive-match-time {
  min-width: 50px;
  text-align: center;
}

.kerlackilive-scheduled-time {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.kerlackilive-minute {
  font-size: 13px;
  font-weight: 700;
  color: #dc2626;
}

.kerlackilive-finished-badge {
  font-size: 12px;
  font-weight: 600;
  color: #059669;
  text-transform: uppercase;
}

/* Action buttons */
.kerlackilive-match-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.kerlackilive-action-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  border-radius: 4px;
}

.kerlackilive-action-btn:hover {
  color: #1f2937;
  background: #f3f4f6;
}

/* Responsive Design */
@media (max-width: 768px) {
  .kerlackilive-match-row {
    gap: 8px;
    padding: 10px 12px;
  }

  .kerlackilive-team-name {
    font-size: 13px;
  }

  .kerlackilive-match-number {
    min-width: 50px;
  }

  .kerlackilive-match-actions {
    display: none;
  }
}

@media (max-width: 480px) {
  .kerlackilive-match-row {
    flex-wrap: wrap;
    gap: 6px;
  }

  .kerlackilive-team-info {
    flex: 0 0 calc(50% - 40px);
  }

  .kerlackilive-team-logo {
    width: 20px;
    height: 20px;
  }

  .kerlackilive-league-header {
    padding: 10px 12px;
  }
}

/* Widget Specific Styles */
.widget .kerlackilive-ticker {
  font-size: 13px;
}

.widget .kerlackilive-match-row {
  padding: 10px 12px;
}

.widget .kerlackilive-team-name {
  font-size: 13px;
}

/* Loading State */
.kerlackilive-ticker.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.kerlackilive-ticker.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #1a73e8;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 10;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
