/*
 * Koora Live – Enhanced Match Display Styles
 * Adds countdown, live pulse, stream badge, and improved status styling
 *
 * @package KooraLive
 * @since   1.1.0
 */

/* =============================================================
   AD SLOTS
   ============================================================= */
.koora-ad-slot {
  margin: 16px 0;
  padding: 12px;
  text-align: center;
  min-height: 50px;
  border-radius: 8px;
  overflow: hidden;
}

.koora-ad-slot-1 { margin-bottom: 20px; }
.koora-ad-slot-2 { margin: 12px 0; }
.koora-ad-slot-3 { margin-top: 20px; }

/* =============================================================
   TEAM LOGO IMAGES
   ============================================================= */
.team-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  border: 1px solid var(--border);
  background: #fff;
  flex-shrink: 0;
  max-width: 40px;
}

/* =============================================================
   LIVE SCORE ANIMATION
   ============================================================= */
.km-score-live {
  color: var(--red-accent) !important;
  animation: km-score-pulse 2s ease-in-out infinite;
}

@keyframes km-score-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .7; }
}

/* =============================================================
   LIVE DOT inside status badge
   ============================================================= */
.km-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  margin-right: 4px;
  vertical-align: middle;
  animation: km-dot-blink 1s infinite;
}

@keyframes km-dot-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .2; }
}

/* Enhanced LIVE status badge */
.status-live {
  background: var(--red-accent) !important;
  color: #fff !important;
  font-weight: 800;
  animation: km-live-bg 2.5s ease-in-out infinite;
}

@keyframes km-live-bg {
  0%, 100% { background-color: var(--red-accent); }
  50%      { background-color: #e74c3c; }
}

/* =============================================================
   FINISHED SCORE
   ============================================================= */
.km-score-finished {
  color: var(--text-muted) !important;
  opacity: .85;
}

/* =============================================================
   COUNTDOWN TIMER
   ============================================================= */
.km-countdown {
  font-size: .68rem;
  font-weight: 600;
  color: var(--purple-mid);
  margin-top: 2px;
  letter-spacing: .3px;
  min-height: 16px;
}

.km-countdown.km-countdown-soon {
  color: var(--red-accent);
  animation: km-countdown-pulse 1.5s ease-in-out infinite;
}

@keyframes km-countdown-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .5; }
}

/* =============================================================
   STREAM BADGE
   ============================================================= */
.km-stream-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: .7rem;
  opacity: .7;
  transition: opacity .2s;
}

.match-card:hover .km-stream-badge {
  opacity: 1;
}

/* =============================================================
   MATCH CARD – LIVE HIGHLIGHT
   ============================================================= */
.match-card[data-status="live"] {
  background: linear-gradient(
    90deg,
    rgba(192, 57, 43, .04) 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0) 70%,
    rgba(192, 57, 43, .04) 100%
  );
  border-right: 3px solid var(--red-accent);
}

.match-card[data-status="live"]:hover {
  background: linear-gradient(
    90deg,
    rgba(192, 57, 43, .08) 0%,
    rgba(250, 248, 255, 1) 30%,
    rgba(250, 248, 255, 1) 70%,
    rgba(192, 57, 43, .08) 100%
  );
}

/* =============================================================
   MATCH CARD – FINISHED DIM
   ============================================================= */
.match-card[data-status="finished"] {
  opacity: .75;
}

.match-card[data-status="finished"]:hover {
  opacity: 1;
}

/* =============================================================
   AUTO-REFRESH INDICATOR
   ============================================================= */
.km-refresh-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .75rem;
  color: var(--text-muted);
  padding: 6px 12px;
}

.km-refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live-green);
  animation: kooraPulse 1.4s infinite;
}

/* =============================================================
   RESPONSIVE ENHANCEMENTS
   ============================================================= */
@media (max-width: 700px) {
  .km-countdown {
    font-size: .62rem;
    text-align: center;
  }

  .km-stream-badge {
    display: none;
  }

  .match-card[data-status="live"] {
    border-right-width: 2px;
  }

  /* شعار الفريق كصورة */
  .team-logo-img {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    order: unset !important;
    display: block !important;
  }

  .km-live-dot {
    width: 5px;
    height: 5px;
  }
}
