/* 
   Philadelphia 76ers Color Palette:
   - Primary Blue: #006BB6
   - Dark Blue: #002B5C
   - Red: #ED174C
   - Off-White: #F1F2F3
   - Black: #000000
*/

/* Base Styles & Bootstrap Overrides */
:root {
  --primary: #006BB6;
  --primary-dark: #002B5C;
  --accent: #ED174C;
  --light-bg: #F1F2F3;
  --dark: #000000;
  
  /* Base font size variables for easier calculations */
  --base-font-size: 1rem;
  --small-font-size: 0.875rem;
}

body {
  font-family: 'Montserrat', sans-serif;
  background-color: var(--light-bg);
  color: var(--primary-dark);
  position: relative;
  min-height: 100vh;
}

/* Bootstrap overrides */
.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-outline-primary {
  color: var(--primary);
  border-color: var(--primary);
}

.btn-outline-primary:hover {
  background-color: var(--primary);
  border-color: var(--primary);
}

.card {
  border: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-0.3125rem);
  box-shadow: 0 0.625rem 1.25rem rgba(0, 43, 92, 0.1) !important;
}

/* Navigation */
.navbar {
  background-color: var(--primary-dark);
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.1);
  padding: 0.8rem 1rem;
}

.navbar-brand {
  font-weight: 700;
  color: white;
}

.nav-link {
  font-weight: 600;
  padding: 0.5rem 1rem !important;
  color: rgba(255, 255, 255, 0.8) !important;
  border-bottom: 0.1875rem solid transparent;
  transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
  color: white !important;
  border-bottom: 0.1875rem solid var(--accent);
}

/* Header/Hero Section */
header {
  background-color: var(--primary);
  background-image: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 0.3125rem;
  background-color: var(--accent);
}

header h1 {
  font-weight: 700;
  text-shadow: 0.125rem 0.125rem 0.25rem rgba(0, 0, 0, 0.2);
}

header .lead {
  font-size: 1.3rem;
  margin-bottom: 2rem;
}

/* Cards and Containers */
.card {
  border-radius: 0.625rem;
}

.card-title {
  color: var(--primary-dark);
  font-weight: 600;
}

#visualization-container {
  min-height: 31.25rem;
  width: 100%;
  margin: 0 auto;
}

/* Team Section */
.team-card {
  border-top: 0.25rem solid var(--primary);
  border-radius: 0.5rem;
  box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.05);
}

.team-card i {
  color: var(--primary);
}

/* Footer */
footer {
  background-color: var(--primary-dark);
  color: white;
  padding: 1.5rem 0;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 0.1875rem;
  background-color: var(--accent);
}

/* D3 Visualization Styling */
.axis path,
.axis line {
  stroke: var(--primary-dark);
  stroke-width: 0.09375rem;
}

.axis text {
  fill: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 500;
}

.tooltip {
  position: absolute;
  padding: 0.625rem 0.9375rem;
  background-color: var(--primary-dark);
  color: white;
  border-radius: 0.375rem;
  pointer-events: none;
  font-size: 0.875rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  z-index: 1000;
  max-width: 18.75rem;
}

/* Animation classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(1.25rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
  header {
    padding: 3rem 0;
  }
  
  header h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  header .lead {
    font-size: 1.1rem;
  }
}

::-webkit-scrollbar {
  width: 0.625rem;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 0.3125rem;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* Make sure visualization container takes full width */
.full-width-viz {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1.875rem;
}

/* Ensure the chart container has proper dimensions */
.chart-container {
  min-width: 75rem;
  position: relative;
}

/* Improve visual appearance of basketball elements */
.basketball {
  transition: transform 0.2s ease;
}

/* Style for player labels */
.player-label {
  transition: opacity 0.3s ease;
}

.name-bg, .points-bg {
  transition: opacity 0.3s ease;
}

/* Make SVG responsive */
svg {
  display: block;
  max-width: 100%;
}

.basketball-tooltip {
  z-index: 1000;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.2s ease;
}

#visualization-container {
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #002B5C #f0f0f0;
}

#visualization-container::-webkit-scrollbar {
  height: 0.5rem;
}

#visualization-container::-webkit-scrollbar-thumb {
  background-color: #002B5C;
  border-radius: 0.25rem;
}

#visualization-container::-webkit-scrollbar-track {
  background-color: #f0f0f0;
  border-radius: 0.25rem;
}
.full-width-viz {
  width: 100%;
  overflow-x: auto;
  margin-bottom: 1.875rem;
  scrollbar-width: thin;
  scrollbar-color: #002B5C #f0f0f0;
}

.chart-container {
  min-width: 75rem;
  position: relative;
  max-width: 100%;
}

.basketball {
  transition: transform 0.2s ease, opacity 0.3s ease;
}

.player-label {
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.name-bg, .points-bg {
  transition: opacity 0.3s ease;
}

svg {
  display: block;
  max-width: 100%;
}

.basketball-tooltip {
  z-index: 1000;
  font-family: 'Montserrat', sans-serif;
  transition: opacity 0.2s ease;
  font-size: 0.875rem;
}

@media (max-width: 1200px) {
  .full-width-viz {
    padding-bottom: 0.625rem;
  }
  
  /* Ensure horizontal scrolling is obvious */
  .chart-container::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 0.75rem;
    height: 3.125rem;
    background-color: rgba(0, 43, 92, 0.1);
    border-radius: 0.375rem 0 0 0.375rem;
    transform: translateY(-50%);
    pointer-events: none;
  }
}

/* Improved scrollbar appearance */
.full-width-viz::-webkit-scrollbar {
  height: 0.5rem;
}

.full-width-viz::-webkit-scrollbar-thumb {
  background-color: #002B5C;
  border-radius: 0.25rem;
}

.full-width-viz::-webkit-scrollbar-track {
  background-color: #f0f0f0;
  border-radius: 0.25rem;
}