/**
 * Player Average Page Styles
 * Page-specific styling for running average display and back-to-top button
 */

/* ========================================
   FLOATING BACK TO TOP BUTTON
   ======================================== */

.back-to-top-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--accent-color);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  font-size: 1.2em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px var(--shadow-color);
  transition: all 0.3s ease;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top-btn:hover {
  background-color: var(--accent-hover);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px var(--shadow-color);
}

.back-to-top-btn:active {
  transform: translateY(-1px);
}

/* Text and arrow visibility */
.back-to-top-text {
  display: inline;
}

.back-to-top-arrow {
  display: none;
}

/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 768px) {
  .back-to-top-btn {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 1.5em;
  }

  /* Show only arrow on mobile */
  .back-to-top-text {
    display: none;
  }

  .back-to-top-arrow {
    display: inline;
  }
}

/* ========================================
   TABLE ENHANCEMENTS
   ======================================== */

/* Ensure table doesn't get too wide */
#average-table {
  max-width: 100%;
}

/* Row number column - compact */
#average-table th:nth-child(1),
#average-table td:nth-child(1) {
  width: 60px;
}

/* Date column */
#average-table th:nth-child(2),
#average-table td:nth-child(2) {
  width: 90px;
}

/* All numeric columns after league name - uniform width */
#average-table th:nth-child(4),
#average-table td:nth-child(4),
#average-table th:nth-child(5),
#average-table td:nth-child(5),
#average-table th:nth-child(6),
#average-table td:nth-child(6),
#average-table th:nth-child(7),
#average-table td:nth-child(7),
#average-table th:nth-child(8),
#average-table td:nth-child(8),
#average-table th:nth-child(9),
#average-table td:nth-child(9),
#average-table th:nth-child(10),
#average-table td:nth-child(10),
#average-table th:nth-child(11),
#average-table td:nth-child(11) {
  width: 100px;
  min-width: 100px;
}

/* League name column - allow to expand */
#average-table th:nth-child(3),
#average-table td:nth-child(3) {
  min-width: 150px;
}

/* ========================================
   ALERT STYLING
   ======================================== */

.alert-info {
  background-color: #e3f2fd;
  border: 1px solid #90caf9;
  color: #0d47a1;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
  font-size: 1.1em;
}

[data-theme="dark"] .alert-info {
  background-color: #1a2332;
  border-color: #2c4a6e;
  color: #90caf9;
}
