/* assets/css/rating.css - MU Ratings styles */

/* Layout wrapper */
.match-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
  margin-top: 20px;
}

.theme-red {
  color: #ed1b24;
}

@media (max-width: 920px) {
  .match-layout {
    grid-template-columns: 1fr;
  }
}

/* Match info */
.match-main h2, .match-main h3, .score-value, h2{
  font-family: 'K2D' !important;
}
#matchdetail {
  text-align: center;
  margin: 20px 0;
}
#matchdetail h2 {
  margin-bottom: 4px;
  text-transform: uppercase;
}
#matchdetail p {
  margin: 4px 0;
}

#matchdetail #row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 10px;
}
#matchdetail #col3 {
  text-align: center;
}
#goaltext {
  font-size: 2rem !important;
  font-weight: bold;
}
.team-logo {
  max-width: 80px;
}

/* Player grid */
.player-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Player card */
.player-card {
  display: grid;
  grid-template-columns: 40% 60%;
  background-image: linear-gradient(
      to bottom,
      rgba(17, 17, 17, 0.6),
      rgba(96, 0, 0, 0.35)
    ),
    url("https://theunitedshow.com/wp-content/uploads/2024/05/Rectangle-43.png");
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  color: white;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  min-height: 120px;
}

.player-card img {
  grid-row: 1 / span 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px 0 0 10px;
}

.player-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.player-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #fff;
}

.player-info p {
  font-size: 0.95rem;
  margin: 6px 0 10px 0;
  color: #fff;
}



/* MOTM Button on Player Card */
.motm-container {
  text-align: center;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.motm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border: 2px solid #fff;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.motm-btn:hover {
  background-color: #fff;
  border-color: #d71920;
}

.motm-btn img.motm-icon {
  width: 25px;
  height: 20px;
  border-radius: 0 !important;
}

.motm-btn.selected {
  background: #fff !important;
  border: 2px solid #fff; /* or team color */
  border-radius: 50%;
  transition: background 0.2s ease-in-out;
}

.player-card.selected-motm {
  border-radius: 16px;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
}

.motm-label {
  font-size: 12px;
  color: gold;
  font-weight: 700;
}

/* Submit button */
.btn-submit-votes {
  display: block;
  margin: 30px auto 50px;
  background: #ed1b24;
  color: white;
  font-weight: bold;
  font-size: 1.05rem;
  padding: 12px 28px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: all 0.18s ease;
}
.btn-submit-votes:hover {
  transform: translateY(-3px);
  background: #cc171f;
}
.btn-submit-votes:active {
  transform: translateY(0);
}

/* Popup overlay */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
}
.popup-content {
  background: #fff;
  color: #222;
  padding: 18px 22px;
  border-radius: 10px;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.25);
}
.popup-content h3 {
  margin: 0 0 8px 0;
}
.popup-btn {
  margin-top: 12px;
  background: #ed1b24;
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
}

/* --- Man of the Match Card --- */
#motm-result {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  width: 100%;
}

/* Player image */
.motm-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 0 0 10px; /* only bottom-left corner rounded */
  display: block;
}

/* Info block */
.motm-info {
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  color: #fff;
}
.motm-info h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: #fff;
}
.motm-info p {
  font-size: 0.95rem;
  margin: 6px 0 0 0;
  color: #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-indicator {
  text-align: center;
  margin: 20px auto;
  color: white;
}

.loading-indicator p {
  font-size: 1rem;
  margin-top: 8px;
  color: #fff;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ed1b24;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/********/
/* rating button base + hover */
.rating-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.08s ease;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.rating-button:hover {
  background: rgba(255, 255, 255, 0.3);
}
/* When button is clicked (pressed down temporarily) */
.rating-button:active {
  transform: translateY(1px);
}

/* When button has "active" class permanently */
.rating-button.active {
  background: #ed1b24 !important;
  border-color: #ed1b24 !important;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff; /* optional */
}


.player-card {
  background: linear-gradient(61.38deg, #ed1b24 44.03%, #870f15 89.17%);

  border-radius: 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  width: 80%;
  margin: 0 auto;
}
.player-image-wrapper {
  flex-shrink: 0;
  max-width: 40%;
  position: relative;
}
.player-image {
  max-height: auto;
  width: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}
.player-position {
  position: absolute;
  bottom: 35px;
  right: -15px;
  background: #000;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 6px;
  border-radius: 5px;
  text-transform: uppercase;
}
.player-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding-right: 20px;
}
.player-score {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}
.score-icon {
  background: #fff;
  color: #c20000;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.2rem;
}
.score-label {
  font-size: 0.8rem;
  color: #ffeb3b;
}
.score-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: #ffeb3b;
}
@media (max-width: 768px) {
  .player-card,
  .motm-card {
    flex-direction: column;
    width: 100% !important;
    padding: 40px 20px;
  }
  .player-image-wrapper {
    max-width: 100%;
  }
}
