/* Match Cards CSS - Homepage Fixtures */

/* CSS Variables */
:root {
  --primary-green: #007105;
  --light-green: #0cae13;
  --white: #ffffff;
  --light-gray: #f8f9fa;
  --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Fixtures Container */
.fixtures-container {
  font-family: 'Roboto', 'Segoe UI', sans-serif;
  max-width: 100%;
}

/* Accordion Styles */
.accordion-item {
  margin-bottom: 12px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: none;
}

.accordion-header {
  background: var(--primary-green);
  color: var(--white);
  border: none;
}

.accordion-button {
  background: var(--primary-green);
  border: none;
  color: var(--white);
  text-align: left;
  width: 100%;
  padding: 12px 16px;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-button:hover {
  background: #008507;
}

    .accordion-button:not(.collapsed) {
        background: radial-gradient(circle, var(--primary-green) 0%, /* dark center */
        var(--light-green) 100% /* light edges */
        );
        color: white;
        box-shadow: none;
        font-weight: 600;
    }

.accordion-button::after {
  display: none !important;
}

.custom-arrow::before {
  content: '\002B';
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 300;
  margin-left: 10px;
  transition: transform 0.3s ease;
}

.accordion-button[aria-expanded='true'] .custom-arrow::before {
  content: '\2212';
  transform: rotate(0deg);
}

.accordion-body {
  background-color: var(--light-gray);
  padding: 10px;
}

/* Match Container */
.match-container {
  display: flex;
  flex-direction: column;
  background-color: var(--primary-green);
  margin-bottom: 10px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.match-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.match-content {
    display: flex;
    cursor: pointer;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 6px;
    position: relative;
    /* Gradient: white (top) light green (bottom) */
    background: linear-gradient(to bottom, #ffffff 0%, #eaffea 100%);
}

/* Team Info */
.team-info {
  display: flex;
  align-items: center;
  flex: 1;
}

.home-team {
  text-align: right;
  justify-content: flex-end;
}

.away-team {
  text-align: left;
  justify-content: flex-start;
}

.team-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.home-team .team-logo {
  margin-left: 12px;
}

.away-team .team-logo {
  margin-right: 12px;
}

.team-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    color: black !important; /* force black text */
    flex: 1;
    color: black;
}

    .team-name a:hover {
        /* subtle black glow without affecting text color */
        text-shadow: 0 0 2px black, 0 0 4px black, 0 0 6px black;
    }


.home-team .team-name {
    text-align: right;
}

.away-team .team-name {
  text-align: left;
}

.team-name a {
    word-break: break-word;
    display: inline-block;
    width: 100%;
    color: black;
}

/* Match Score Container */
.match-score-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 0 5px;
  flex-shrink: 0;
}

.match-score {
  font-size: 1.3rem;
  font-weight: 700;
  color: black;
}

.match-time {
    font-size: 0.8rem;
    color: black;
    margin-bottom: 5px;
}

/* Match Details */
.match-details {
  background-color: #308134;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  padding: 10px 20px;
  border-radius: 0 0 10px 10px;
}

/* Badges */
.badge {
  padding: 6px 12px;
  border-radius: 20px;
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.ft {
  background-color: #adadad;
}

.post {
  background-color: #dc3545;
}

.live {
  background-color: #28a745;
  animation: live-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
}

.awaitingresult {
  background-color: #2d3aad;
}

.upcoming {
  background-color: #ffc107;
  color: #212529;
}

/* Predict Button */
.predict-button {
  position: relative;
  margin-right: 12px;
  width: 32px;
  height: 32px;
  padding: 0;
  background: #fff;
  color: #FF6B35;
  border: 2px solid #FF6B35;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  z-index: 10;
}

.predict-button:hover {
  background: #FF6B35;
  color: white;
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.predict-button:active {
  transform: scale(1.1);
}

.predict-button i {
  font-size: 16px;
  line-height: 1;
}

.predict-button.predicted {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.predict-button.predicted:hover {
  background: #218838;
  border-color: #1e7e34;
  transform: scale(1.2);
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
}

/* Predict Button Visibility States */
.predict-button-hidden {
  opacity: 0;
  visibility: hidden;
}

.predict-button-visible {
  opacity: 1;
  visibility: visible;
  animation: fadeInButton 0.3s ease-in;
}

.predict-button-glow {
  animation: glowPulse 3s ease-in-out infinite;
}

.predict-button.predicted.predict-button-glow {
  animation: glowPulseGreen 3s ease-in-out infinite;
}

/* League Logo */
.league-logo {
  margin-right: 10px;
}

/* Links */
a {
  color: var(--white);
  text-decoration: none;
}

a:hover {
  color: var(--white);
  opacity: 0.8;
}

#leagueHeading {
  background: none;
  color: var(--white);
}

#leagueHeading:hover {
  transform: scale(1.05);
  transition: transform 0.3s ease, color 0.3s ease;
  text-decoration: underline;
  opacity: 0.9;
}

/* Animations */
@keyframes fadeInButton {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 0 rgba(255, 107, 53, 0);
  }
  25% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(255, 107, 53, 0.4);
  }
  50% {
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.6);
  }
  75% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 0.8), 0 0 30px rgba(255, 107, 53, 0.4);
  }
}

@keyframes glowPulseGreen {
  0%, 100% {
    box-shadow: 0 0 0 rgba(40, 167, 69, 0);
  }
  25% {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.8), 0 0 30px rgba(40, 167, 69, 0.4);
  }
  50% {
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
  }
  75% {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.8), 0 0 30px rgba(40, 167, 69, 0.4);
  }
}

@keyframes live-pulse {
  0%, 100% {
    box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
  }
  50% {
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.9), 0 0 30px rgba(40, 167, 69, 0.6);
  }
}

/* Tablet Responsive (max-width: 768px) */
@media (max-width: 768px) {
  .accordion-item {
    margin-bottom: 10px;
  }

  .accordion-button {
    padding: 10px 14px;
    font-size: 1rem;
  }

  .accordion-body {
    padding: 8px;
  }

  .match-container {
    margin-bottom: 6px;
    border-radius: 8px;
  }

  .match-content {
    padding: 6px 4px;
    flex-wrap: nowrap;
  }

  .team-info {
    width: 40%;
  }

  .team-name {
    font-size: 0.75rem;
    max-width: 100%;
    padding: 2px 3px;
  }

  .team-logo {
    width: 24px;
    height: 24px;
  }

  .home-team {
    flex-direction: row;
    justify-content: flex-end;
  }

  .away-team {
    flex-direction: row;
    justify-content: flex-start;
  }

  .home-team .team-logo {
    margin-left: 6px;
    margin-right: 0;
  }

  .away-team .team-logo {
    margin-right: 6px;
    margin-left: 0;
  }

  .match-score-container {
    min-width: 60px;
    padding: 0 3px;
  }

  .match-score {
    font-size: 1.0rem;
    font-weight: 700;
  }

  .match-time {
    font-size: 0.7rem;
  }

  .match-details {
    padding: 8px 12px;
  }

  .badge {
    padding: 3px 6px;
    font-size: 0.65rem;
    margin-bottom: 8px;
  }

  .date {
    font-size: 0.7rem;
  }

  .predict-button {
    width: 28px;
    height: 28px;
    margin-left: 8px;
  }

  .predict-button i {
    font-size: 14px;
  }
}
