.werace-container {
  max-width: 800px !important;
  margin: 0 auto;
  font-family: "Arial", sans-serif;
  color: #fff !important;
  background-color: #1a1a1a;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
}
.werace-selector {
  display: flex;
  justify-content: center;
  background-color: #333;
  padding: 10px;
}
.werace-selector button {
  background-color: #444;
  color: #fff;
  border: none;
  padding: 10px 20px;
  margin: 0 5px;
  cursor: pointer;
  border-radius: 5px;
  transition: background-color 0.3s;
  font-weight: bold;
}
.werace-selector button.active {
  background-color: #ff0000; /* Red for racing feel */
}
.werace-selector button:hover {
  background-color: #cc0000;
}
.werace-standings {
  padding: 20px;
}
.werace-row {
  display: flex;
  align-items: center;
  padding: 10px;
  border-bottom: 1px solid #444;
  transition: background-color 0.3s;
  cursor: pointer;
}
.werace-row:hover {
  background-color: #333;
}
.werace-position {
  font-size: 1.5em;
  font-weight: bold;
  width: 50px;
  text-align: center;
  color: #ffd700; /* Gold for positions */
}
.werace-driver-info,
.werace-team-info {
  flex: 1;
  display: flex;
  align-items: center;
}
.werace-pic {
  width: 40px;
  height: 40px !important;
  border-radius: 50% !important;
  margin-right: 10px;
  object-fit: cover;
}
.werace-name {
  font-weight: bold;
  margin-right: 10px;
}
.werace-team {
  padding: 5px 10px;
  border-radius: 5px;
  color: #fff;
  font-size: 0.9em;
}
.werace-team-color {
  width: 10px;
  height: 100%;
  border-radius: 3px;
  margin-right: 5px;
}
.werace-points {
  font-weight: bold;
  width: 100px;
  text-align: right;
}
.werace-load-more {
  text-align: center;
  padding: 10px;
}
.werace-load-more button {
  background-color: #ff0000;
  color: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
}
.werace-load-more button:hover {
  background-color: #cc0000;
}
/* Modal */
.werace-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  max-width: 100% !important;
  width: 100% !important;
  height: 100% !important;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  padding-top: 50px;
}
.werace-modal-content {
  background-color: #222;
  color: #fff;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 800px;
  position: relative;
  margin-top: auto;
  margin-bottom: 200px;
}
.werace-close {
  position: absolute;
  top: 0px;
  right: 10px;
  color: #fff;
  font-size: 1.5em;
  cursor: pointer;
}
/* Responsive */
@media (max-width: 600px) {
  .werace-row {
    flex-wrap: wrap;
  }
  .werace-position {
    width: 100%;
    text-align: left;
  }
  .werace-points {
    width: 100%;
    text-align: left;
    margin-top: 5px;
  }
}
/* Free icons - using Font Awesome (assume enqueued or CDN) */
.fa-trophy:before {
  content: "\f091";
} /* Example, but need to include FA */
.fa-car:before {
  content: "\f1b9";
} /* Example, but need to include FA */
.fa-flag-checkered:before {
  content: "\f11e";
} /* Example, but need to include FA */
.fa-user:before {
  content: "\f007";
} /* Example, but need to include FA */
.fa-users:before {
  content: "\f0c0";
} /* Example, but need to include FA */
.werace-modal-content {
  background-color: #1a1a1a;
  color: #fff;
  font-family: "Arial", sans-serif;
  margin-left: auto;
  margin-right: auto;
}

.werace-header {
  text-align: center;
  padding: 20px;
  background-color: #333;
  border-radius: 10px;
}

.werace-header img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 10px;
  object-fit: cover;
}

.werace-header h2 {
  margin: 0;
  font-size: 1.8em;
	color: #fff !important;
}

.werace-team-badge {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 5px;
  margin-top: 5px;
  color: #fff;
}

.werace-results {
  padding: 20px;
}

.werace-results h3 {
  text-align: center;
  margin-bottom: 20px;
	color: #fff !important;
}

.werace-race-group {
  border-bottom: 1px solid #444;
}

.werace-race-group h4 {
  margin-bottom: 0.8em;
  margin-top: 2.4em;
  font-weight: bold;
	color: #fff !important;
}

.werace-race-group mark {
  background-color: #cc0000;
  color: #fff;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
  margin-left: 10px;
}

.werace-result-item {
  display: flex;
  justify-content: space-between;
  padding: 4px 10px;
  font-size: 14px;
  line-height: 1em;
  align-items: center;
}

.werace-chart {
  padding: 20px;
  background-color: #222;
  border-radius: 10px;
  margin-top: 30px;
}

canvas#weraceChart {
  max-height: 300px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .werace-modal-content {
    width: 85%;
  }
  .werace-result-item {
    flex-direction: column;
  }
}

@media (min-width: 768px) {
  .werace-result-item span {
    width: 250px;
    text-align: center;
  }

  .werace-result-item span:first-child {
    text-align: left;
  }

  .werace-result-item span:last-child {
    text-align: right;
  }
}
/* Container for the drivers */
.drivers-list {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  width: 200px;
}

/* Tooltip Wrapper */
.driver-tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

/* Avatar Styling */
.driver-avatar {
  width: 40px;
  height: 40px !important;
  border-radius: 10px !important; /* Modern squared-round look */
  border: 2px solid #222;
  background-color: #222;
  transition: all 0.2s ease;
  display: block;
  object-fit: cover;
}

.driver-tooltip-wrapper:hover .driver-avatar {
  border-color: #ffd700; /* Gold highlight */
  transform: translateY(-2px);
}

/* Custom Tooltip Box */
.driver-tooltip-content {
  position: absolute;
  bottom: 125%; /* Positions it above the image */
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background-color: #1a1a1a; /* Dark background */
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  white-space: nowrap;
  font-size: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  border: 1px solid #333;
  z-index: 100;

  /* Hidden by default */
  visibility: hidden;
  opacity: 0;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  pointer-events: none;
}

/* Tooltip visible on hover */
.driver-tooltip-wrapper:hover .driver-tooltip-content {
  visibility: visible;
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Tooltip Details */
.tooltip-name {
  font-weight: bold;
  color: #fff;
  margin-bottom: 2px;
}

.tooltip-number {
  color: #ffd700; /* Gold for the number */
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* The little triangle arrow */
.tooltip-arrow {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #333 transparent transparent transparent;
}
