/* Profile Matches Tab Styles */

/* Match History Table */
.match-history-table {
  width: 100%;
  padding: 20px 5px;
}

.profile-modal-heading {
  text-align: left;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 16px;
  text-transform: capitalize;
}

/* Match History Unlock Tooltip - matches items tooltip exactly */
.match-history-unlock-tooltip {
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  background: var(--secondary-color);
  color: var(--text-color);
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.9em;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-content-wrapper.locked:hover .match-history-unlock-tooltip {
  opacity: 0;
  visibility: hidden;
}

.premium-content-wrapper.locked.show-unlock-tooltip:hover .match-history-unlock-tooltip {
  opacity: 1;
  visibility: visible;
}

.match-history-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--semi-transparent-bg);
  border-radius: 6px;
  overflow: hidden;
}

.match-history-table thead tr {
  background: var(--semi-transparent-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.match-history-table th {
  padding: 10px 20px;
  color: var(--text-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
}

.match-history-table td {
  padding: 15px 20px;
  color: var(--text-color);
  font-size: 0.85em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.match-history-table tr:last-child td {
  border-bottom: none;
}

.match-history-table tr:hover {
  background: rgba(255, 255, 255, 0.3);
}

.match-history-table .champion-cells {
  display: flex;
  justify-content: center;
  gap: 8px;
  align-items: center;
}

.match-history-table .champion-icon {
  width: 32px;
  height: 32px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: help;
}

.match-history-table .champion-icon:hover {
  transform: scale(1.2);
  z-index: 10;
}

/* Load More Button Styles */
.load-more-container {
  display: flex;
  justify-content: center;
  padding: 15px 0 10px 0;
  background: var(--semi-transparent-bg);
}

.load-more-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--text-color);
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.load-more-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.load-more-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.load-more-arrow {
  border: solid var(--text-color);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 3px;
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s ease;
}

.loading-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid var(--text-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Profile Synergy Table Styles */
.profile-synergy-table {
  margin-top: 20px;
  padding: 0 16px;
  width: 100%;
}

.profile-synergy-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--semi-transparent-bg);
  border-radius: 6px;
  overflow: hidden;
}

.profile-synergy-table thead tr {
  background: var(--semi-transparent-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.profile-synergy-table th {
  padding: 10px 20px;
  color: var(--text-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.8);
}

.profile-synergy-table td {
  color: var(--text-color);
  font-size: 0.85em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-synergy-table tr:last-child td {
  border-bottom: none;
}

.profile-synergy-table tr:hover {
  background: rgba(255, 255, 255, 0.3);
}

.synergy-champion-icon-container{
  display: flex;
  align-items: center;
  gap: 10px;
}

.synergy-champion-icon {
  width: 24px;
  height: 24px;
  object-fit: cover;
  transition: transform 0.3s ease;
  cursor: help;
}

.synergy-champion-icon:hover {
  transform: scale(1.2);
  z-index: 10;
}

/* Match History Table Responsive Adjustments */
/* Below 1200px: Moderate reductions to allow continued shrinking */
@media (max-width: 1199px) {
  .match-history-table {
    padding: 15px 3px;
  }

  .match-history-table th {
    padding: 8px 12px;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
  }

  .match-history-table td {
    padding: 12px 12px;
    font-size: 0.8em;
  }

  .match-history-table .champion-icon {
    width: 28px;
    height: 28px;
  }

  /* Load More Button - below 1200px */
  .load-more-container {
    padding: 12px 0 8px 0;
  }

  .load-more-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
}

/* Infographic Profile Container: Force compact styling regardless of screen width */
.infographic-profile-container .match-history-table {
  padding: 15px 3px;
}

.infographic-profile-container .match-history-table th {
  padding: 8px 12px;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
}

.infographic-profile-container .match-history-table td {
  padding: 12px 12px;
  font-size: 0.8em;
}

.infographic-profile-container .match-history-table .champion-icon {
  width: 28px;
  height: 28px;
}

.infographic-profile-container .load-more-container {
  padding: 12px 0 8px 0;
}

.infographic-profile-container .load-more-btn {
  padding: 6px 12px;
  font-size: 0.75rem;
}

/* Below 768px: Significant reductions */
@media (max-width: 768px) {
  .match-history-table {
    padding: 12px 2px;
  }

  .match-history-table th {
    padding: 6px 8px;
    font-size: 0.7rem;
    letter-spacing: 0.3px;
  }

  .match-history-table td {
    padding: 10px 8px;
    font-size: 0.75em;
  }

  .match-history-table .champion-icon {
    width: 24px;
    height: 24px;
  }

  /* Load More Button - below 768px */
  .load-more-container {
    padding: 10px 0 6px 0;
  }

  .load-more-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
    gap: 6px;
  }

  .load-more-arrow {
    padding: 2px;
  }
}

@media (max-width: 600px) {
  .match-history-table {
    padding: 8px 1px;
  }

  .match-history-table th {
    padding: 5px 4px !important;
    font-size: 0.65rem !important;
    letter-spacing: 0.2px !important;
  }

  .match-history-table td {
    padding: 8px 4px !important;
    font-size: 0.7em !important;
  }

  .match-history-table .champion-icon {
    width: 20px !important;
    height: 20px !important;
  }
}