/* Live Game Styles - Scoped to Profile Modal Live Game Tab Only */

/* Loading and Error States */
#live-game .live-game-loading, 
#live-game .live-game-not-in-game, 
#live-game .live-game-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.8);
  min-height: 200px;
}

#live-game .live-game-loading .spinner-small {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top: 2px solid var(--primary-color);
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

/* Main Live Game Container */
#live-game .live-game-active {
  padding: 20px;
  color: var(--text-color);
}

/* Header Section */
#live-game .live-game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  gap: 20px;
}

/* Banned Champions Section */
#live-game .live-game-bans {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

#live-game .live-game-bans h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 10px;
  text-align: left;
}

#live-game .ban-icons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

#live-game .ban-icon {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 3px;
  opacity: 0.6;
  filter: grayscale(100%);
  transition: all 0.3s ease;
  cursor: help;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

#live-game .ban-icon:hover {
  transform: scale(1.15);
  opacity: 0.9;
  filter: grayscale(50%);
}

#live-game .no-bans {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  font-size: 0.9rem;
}

/* Game Timer Section */
#live-game .live-game-timer {
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
}

#live-game .live-game-timer .timer-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  font-weight: 500;
}

#live-game .live-game-timer .timer-value {
  font-family: "Montserrat", sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 1px;
}

#live-game .timer-value.timer-active {
  color: white;
}

#live-game .timer-value.timer-ending {
  color: var(--primary-color);
  font-size: 1.1rem;
  animation: pulse 2s infinite;
}

#live-game .timer-value.timer-ended {
  color: #ff4444;
}

/* Players Table Section */
#live-game .live-game-table-container {
  margin-top: 20px;
}

#live-game .live-game-table-container h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#live-game .live-game-players-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  overflow: hidden;
}

#live-game .live-game-players-table thead {
  background: var(--semi-transparent-bg);
}

#live-game .live-game-players-table th {
  padding: 12px 0px;
  text-align: left;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  color: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid var(--border-color);
}

#live-game .live-game-players-table th:first-child {
  text-align: left;
  padding-left: 27px;
}

#live-game .live-game-players-table th:nth-child(4) {
  text-align: center;
}

#live-game .live-game-players-table th:nth-child(5) {
  text-align: center;
}

#live-game .live-game-players-table td {
  padding: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

/* Player Row Styling */
#live-game .live-game-player-row {
  transition: all 0.3s ease;
}

#live-game .live-game-player-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

#live-game .live-game-player-row.current-player {
  background: rgba(215, 168, 78, 0.15);
  color: rgba(255, 255, 255, 1);
}

#live-game .live-game-player-row.current-player:hover {
  background: rgba(215, 168, 78, 0.25);
}

/* Player Name Cell */
#live-game .player-name-cell {
  min-width: 0px;
}

#live-game .live-game-players-table .player-name-cell {
  padding: 0;
}

#live-game .player-info {
  display: flex;
  align-items: center;
  height: 100%;
  text-align: left;
}

#live-game .player-name {
  font-weight: normal;
  color: var(--text-color);
  font-size: 0.95rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
  hyphens: auto;
  line-height: 1.2;
  margin-right: 8px;
  white-space: normal;
}

#live-game .player-name-tooltip-target {
  cursor: pointer;
  transition: color 0.2s ease;
}


/* OP.GG tooltip styling for live game - more specific selector */
.custom-tooltip.liveGamePlayer-tooltip .opgg-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100% !important;
}

.custom-tooltip.liveGamePlayer-tooltip .opgg-icon {
  width: 50px !important;
  height: auto !important;
  margin-top: 0 !important;
}


/* Champion Cell */
#live-game .live-game-players-table .champion-cell {
  width: 100px;
  text-align: center;
  padding: 4px 24px;
}

#live-game .champion-full-container {
  display: flex;
  align-items: center;
  width: 100%;
  position: relative;
  min-height: 60px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  padding: 0 8px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

/* Badge-centered layout when rank badge is present */
#live-game .champion-full-container.has-badge {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(215, 168, 78, 0.08);
  border: 1px solid rgba(215, 168, 78, 0.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

#live-game .champion-full-container:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

#live-game .champion-full-container.has-badge:hover {
  background: rgba(215, 168, 78, 0.12);
  border-color: rgba(215, 168, 78, 0.25);
}

/* Badge container - horizontally centered */
#live-game .champion-badge-container {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Content row - champion + stats */
#live-game .champion-content-row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
}

#live-game .champion-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  width: 32px;
}

#live-game .champion-rank-badge-top {
  background: var(--primary-color);
  color: #000;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1.2;
  min-height: 16px;
  display: flex;
  align-items: center;
}

#live-game .champion-cell img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
  cursor: help;
  transition: transform 0.3s ease;
}

#live-game .champion-cell img:hover {
  transform: scale(1.2);
}

#live-game .champion-stats-display {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  flex: 1;
  font-size: 0.8rem;
  line-height: 1.2;
}

#live-game .champion-stats-display.no-stats {
  align-items: center;
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.6);
}

#live-game .stats-line {
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
}


/* Rank Cell */
#live-game .rank-cell {
  width: 120px;
  padding-left: 15px !important;
}

#live-game .rank-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

#live-game .rank-crest {
  width: 36px;
  height: 36px;
  cursor: help;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5));
}

#live-game .rank-crest:hover {
  transform: scale(1.2);
}

#live-game .rank-text {
  font-size: 0.9rem;
  font-weight: 700;
}

/* Rating Cell */
#live-game .rating-cell {
  width: 80px;
  text-align: center;
}

#live-game .rating-value {
  font-weight: 700;
  color: var(--primary-color);
}

#live-game .lp-suffix {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-left: 2px;
}

/* Rank Change Cell */
#live-game .live-game-players-table .rank-change-cell {
  width: 12px;
  text-align: center;
  padding: 0;
}

#live-game .rank-change {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  gap: 1px;
  width: 100%;
  box-sizing: border-box;
}

#live-game .rank-change.positive {
  color: #4caf50;
}

#live-game .rank-change.negative {
  color: #f44336;
}

#live-game .change-arrow {
  font-size: 12px;
  line-height: 1;
}

/* Profile Button Cell */
#live-game .profile-btn-cell {
  width: 60px;
  text-align: center;
  padding: 0px 0px !important;
  vertical-align: middle;
}

#live-game .profile-btn {
  padding: 2px 15px;
  border: none;
  background: transparent;
  color: white;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 6px;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
}

#live-game .profile-btn:hover {
  background: var(--secondary-color);
  transform: scale(1.0);
}

#live-game .profile-btn img {
  width: 20px;
  height: 20px;
}

#live-game .profile-btn p {
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  font-family: "Times New Roman", Times, "Georgia", "Garamond", serif;
  color: var(--text-color);
  line-height: 1;
}

#live-game .profile-btn:disabled {
  background-color: transparent !important;
  color: #f0f0f0 !important;
  cursor: not-allowed !important;
  opacity: 0.5;
  pointer-events: none;
}

/* Player Badges Cell */
#live-game .player-badges-cell {
  width: 120px;
  text-align: left;
  position: relative;
  padding: 0 0px !important;
  vertical-align: middle;
}

#live-game .player-badge {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px;
  width: 100% !important;
  height: 57px !important;
  overflow: hidden;
  position: static !important;
  left: auto !important;
  top: auto !important;
  z-index: auto !important;
  padding: 0;
}

#live-game .player-badge img {
  width: auto !important;
  height: 40px !important;
  cursor: help;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  object-fit: contain;
  margin: 0 !important;
}

#live-game .player-badge img:hover {
  transform: scale(1.3) !important;
  z-index: 10;
  filter: none !important;
  background: none !important;
  box-shadow: none !important;
}

#live-game .badge-count {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: bold;
}

/* Responsive Design - Scoped to Profile Modal Live Game Tab Only */
@media (max-width: 1400px) {
  #live-game .ban-icons {
    height: 64px;
    overflow: hidden;
    width: 280px;
  }
  
  #live-game .live-game-players-table {
    font-size: 0.85rem;
  }
  
  #live-game .live-game-players-table th {
    padding: 9px 8px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }
  
  #live-game .live-game-players-table td {
    padding: 10px 6px;
  }
  
  #live-game .player-name-cell {
    max-width: 100px;
  }
  
  #live-game .champion-cell {
    width: 100px;
    padding: 4px 12px;
  }
  
  #live-game .champion-full-container {
    min-height: 50px;
    padding: 0 5px;
  }
  
  #live-game .champion-cell img {
    width: 28px;
    height: 28px;
  }
  
  #live-game .champion-container {
    width: 28px;
  }
  
  #live-game .champion-stats-display {
    font-size: 0.7rem;
  }
  
  #live-game .champion-rank-badge-top {
    font-size: 0.6rem;
    padding: 1px 4px;
    min-height: 14px;
  }
  
  #live-game .rank-cell {
    width: 95px;
  }
  
  #live-game .rank-crest {
    width: 30px;
    height: 30px;
  }
  
  #live-game .rank-text {
    font-size: 0.8rem;
  }
  
  #live-game .rating-cell {
    width: 65px;
  }
  
  #live-game .rating-value {
    font-size: 0.85rem;
  }
  
  #live-game .lp-suffix {
    font-size: 0.7rem;
  }
  
  #live-game .player-badges-cell {
    width: 90px;
  }
  
  #live-game .player-badge {
    height: 48px !important;
  }
  
  #live-game .player-badge img {
    height: 34px !important;
  }
  
  #live-game .profile-btn-cell {
    width: 50px;
  }
  
  #live-game .profile-btn {
    padding: 2px 10px;
  }
  
  #live-game .profile-btn img {
    width: 16px;
    height: 16px;
  }
  
  #live-game .profile-btn p {
    font-size: 8.5px;
  }
}

@media (max-width: 1200px) {
  
  #live-game .live-game-players-table {
    font-size: 0.8rem;
  }
  
  #live-game .live-game-players-table th {
    padding: 8px 6px;
    font-size: 0.7rem;
    letter-spacing: 0.4px;
  }
  
  #live-game .live-game-players-table td {
    padding: 9px 5px;
  }
  
  #live-game .live-game-players-table .champion-cell {
    width: 85px;
    padding: 4px 4px;
  }
  
  #live-game .champion-full-container {
    min-height: 45px;
    padding: 0 4px;
  }
  
  #live-game .champion-cell img {
    width: 26px;
    height: 26px;
  }
  
  #live-game .champion-container {
    width: 26px;
  }
  
  #live-game .champion-stats-display {
    font-size: 0.65rem;
  }
  
  #live-game .champion-rank-badge-top {
    font-size: 0.55rem;
    padding: 1px 3px;
    min-height: 12px;
  }
  
  #live-game .rank-cell {
    width: 80px;
  }
  
  #live-game .rank-crest {
    width: 28px;
    height: 28px;
  }
  
  #live-game .rank-text {
    font-size: 0.75rem;
  }
  
  #live-game .rating-cell {
    width: 60px;
  }
  
  #live-game .rating-value {
    font-size: 0.8rem;
  }
  
  #live-game .lp-suffix {
    font-size: 0.65rem;
  }
  
  #live-game .player-badges-cell {
    width: 75px;
  }
  
  #live-game .player-badge {
    height: 43px !important;
  }
  
  #live-game .player-badge img {
    height: 30px !important;
  }
  
  #live-game .profile-btn-cell {
    width: 45px;
  }
  
  #live-game .profile-btn {
    padding: 2px 8px;
  }
  
  #live-game .profile-btn img {
    width: 14px;
    height: 14px;
  }
  
  #live-game .profile-btn p {
    font-size: 7.5px;
  }
}

/* Sync Button Styles */
#live-game .sync-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--secondary-color);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 15px 0;
}

#live-game .sync-button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

#live-game .sync-button.syncing {
  background: transparent;
}

#live-game .sync-button .sync-icon {
  width: 48px;
  height: 48px;
  stroke: var(--secondary-color);
  flex-shrink: 0;
  transition: all 0.3s ease;
  filter: drop-shadow(0 0 0px var(--secondary-color));
}

#live-game .sync-button:hover:not(:disabled) .sync-icon {
  filter: drop-shadow(0 0 4px var(--secondary-color));
  transform: scale(1.15);
}

#live-game .sync-icon.spinning {
  animation: spin-sync 1s linear infinite;
}

@keyframes spin-sync {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 768px) {
  #live-game .live-game-active {
    padding: 10px;
  }

  #live-game .live-game-players-table td {
    padding: 0px 0px;
  }

  #live-game .player-name-cell {
    max-width: 70px;
  }

  #live-game .champion-cell {
    width: 70px;
  }

  #live-game .rank-cell {
    width: 65px;
    padding-left: 4px !important;
  }

  #live-game .rating-cell {
    width: 55px;
  }

  #live-game .player-badges-cell {
    width: 60px;
  }

  #live-game .profile-btn-cell {
    width: 40px;
  }

  #live-game .player-name {
    font-size: 0.8rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #live-game .sync-button {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  #live-game .sync-button .sync-icon,
  #live-game .sync-icon.spinning {
    width: 40px;
    height: 40px;
  }
}
