@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.13.1/font/bootstrap-icons.min.css");

body {
  margin: 0;
  padding: 0;
  font-family: 'F1';
  background-color: #222;
  color: white;
  overflow-x: hidden;
}

button {
  border: 0;
  background-color: inherit;
  color: inherit;
  font-family: inherit
}

/* Remove arrow buttons from number input fields */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

@font-face {
  font-family: 'F1';
  src: url('/assets/Formula1-Bold.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}


@font-face {
  font-family: 'F1reg';
  src: url('/assets/Formula1-Regular.ttf') format('truetype');
  font-weight: 100;
  font-style: normal;
}

:root {
  padding: 0;
  margin: 0;
}

.w100 {
  width: 100%;
  margin: 0
}

.center {
  text-align: center;
}

.floatl {
  float: left
}

.floatr {
  float: right
}

.white {color: white}

.f1 {font-family: 'F1'}

.header-background {
  background-color: /*#d70909*/ #222;
  text-align: center;
  line-height: 80px;
  font-family: 'F1';
  font-size: 24px;
  text-align: left;
  border-bottom: 1px solid #222;
  display: flex;
  align-items: center;
}

.header-background button {
  font-size: 18px;
  height: 80px;
  margin-left: auto;
  margin-right: 30px;
  padding: 0 10px;
  width: 200px;
}

.header-background button:hover,
.race-element:hover {
  background-color: #b60808;
  cursor: pointer;
}

.race-header {
  padding-left: 5vw;
  display: flex;
  align-items: center;
  height: 20vw;
  font-size: 1.8vw;
  box-sizing: border-box;
}

.home-header {font-size: 2.2vw}

.header-logo {
  height: 60px;
  width: auto;
  vertical-align: middle;
  filter: brightness(0) invert(1);
  float: left;
  margin: 0 30px;
}

.races-dropdown-container {
  position: absolute;
  top: 80px;
  /* Adjust based on your header height */
  right: 0;
  width: 280px;
  border-top: 3px solid #222;
  z-index: 1000;
  /* Ensure it appears above others */
  background-color: /*#d70909*/ #222;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  opacity: 0;
  pointer-events: none;
  overflow-y: scroll;
}

.races-dropdown-container::-webkit-scrollbar {
  width: 6px;
}

.races-dropdown-container.open {
  max-height: 500px;
  /* big enough to fit full menu */
  opacity: 1;
  pointer-events: auto;
}

.race-element {
  font-size: 14px;
  display: flex;
  align-items: center;
  padding: 8px 12px;
  line-height: initial;
}

.race-element img {
  height: 20px;
  width: 20px;
  margin: 0 24px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid white;
}

.race-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.race-list.open {
  max-height: 1000px;
  /* Large enough to fit the content */
  transition: max-height 0.5s ease-in;
}

.dropdown-bar {
  border-top: 3px solid #444;
  border-bottom: 1px solid #333;
  background-color: #222;
  height: 60px;
  line-height: 60px;
  font-size: 16px;
  padding-left: 5vw;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}

.dropdown-img {
  width: 6vw;
  height: 57px;
  margin: 0 1vw;
  float: left;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropdown-img img {
  max-height: 100%;
  max-width: 100%
}

.driver-name,
.team-name {
  float: left;
  width: 32vw;
}

.dropdown-arrow {
  width: 6vw
}

.dropdown:hover {
  /* Optional: Hover to show. Replace onClick logic. */
  opacity: 1;
  visibility: visible;
}

.dropdown.open {
  opacity: 1;
  visibility: visible;
}

.f1-explainer {
  display: flexbox;
  align-items: center;
  background-color: #222;
}

.f1-explainer audio {
  width: 230px;
  margin: 20px;
}

.f1-explainer button {
  background-color: #d70909;
  color: white;
  border: none;
  padding: 12px 24px;
  cursor: pointer;
  border-radius: 5px;
  font-size: 14px;
}

.before-explanation {
  display: flex;
  align-items: center;
  justify-content: center;
}

.output-container {
  display: flex;
  align-items: stretch;
}

.output-container div {
  width: 100%;
  padding: 20px;
  background-color: #333;
  border-radius: 5px;
  margin: 10px;
  flex-direction: column;
}

.output-container p {
  font-family: F1reg;
}

h2 {
  text-decoration: underline;
}

.context-table {
  width: 80%;
  margin: 15px 0 30px 10%;
  text-align: center;
  ;
  border-collapse: collapse;
}

.context-table tr {
  height: 40px;
}

.SOFT {
  color: #FF0000
}

.MEDIUM {
  color: #FFF200
}

.HARD {
  color: #FFFFFF
}

.INTERMEDIATE {
  color: #00A550
}

.WET {
  color: #0072C6
}

.race-header::before {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 20vw;
  background-image: var(--bg-image);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: 0.2;
  z-index: -100;
}

.canvas-background {
  width: 90vw;
  padding: 5vw;
  margin: 5vw;
  box-sizing: border-box;
  border-radius: 16px;
  background-color: #444;
}

.canvas-background i {
  font-size: 20px;
}

.driver-comparison-table {
  border: 4px solid #333;
  border-collapse: collapse;
  margin: auto;
  margin-bottom: 60px;
}

.driver-comparison-table td {
  border: 2px solid #333;
  padding: 10px;
  text-align: center;
}

/* .lap-input {
  width: 120px;
  background-color: #333;
  border: 0;
  height: 100px;
  margin: auto;
  font-size: 40px;
  border-radius: 10px;
  margin-bottom: 30px;
} */

.lap-input, .speed-input {
  -webkit-appearance: none;
  appearance: none;
  width: 60%;
  background-color: #333;
  border: 0;
  height: 8px;
  margin: auto;
  font-size: 40px;
  border-radius: 10px;
  margin-bottom: 30px;
}

.lap-input::-webkit-slider-thumb, .speed-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px; /* Adjust thumb size */
  height: 20px;
  background: #fff; /* White thumb */
  border-radius: 50%; /* Circle/round thumb */
  cursor: pointer;
}

#driver-select-container {
  display: flex;
  flex-direction: row;
  flex-wrap:wrap;
  width: 90%;
  margin-left: 5%;
}

.driver-select-element {
  display: flex;
  flex-direction: row;
  align-items: center;
  height: 50px;
  width: 24.5%;
  margin: 2px 0.25%;
  border-radius: 6px;
}

.driver-select-element:hover {
  background-color: #333;
  cursor: pointer;
}

.lap-submit:hover {
  background-color: #b60808;
  cursor: pointer;
}

.driver-select-element img {
  height: 100%;
}

.lap-submit {
  background-color: #d70909;
  margin: 30px auto;
  height: 60px;
  width: 16%;
  border-radius: 8px;
  font-size: 26px;
}

#warning {
  margin: auto;
  width: 60%;
  background-color: #d70909;
  height: 200px;
  border-radius: 14px;
  visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.index-body {
  width: 70%;
  margin: 40px auto;
  font-weight: 100;
  font-family: F1reg;
  line-height: 1.3;
}

.index-title {margin: 30px 0; font-family: F1; font-weight: 100}

.index-link {
  color: white;
  font-family: F1;
  font-size: 25px;
  font-weight: 600;
  display: block;
  height: 60px;
  line-height: 60px;
  animation-name: ANIM;
  animation-duration: 3s;
  animation-iteration-count: infinite;
  width: fit-content;
  margin-top: 30px;
}

@keyframes ANIM {
  0% {font-size: 26px}
  50% {font-size: 27px}
  100% {font-size: 26px}

}

.index-link:hover {
  color: #d70909;
}

.index-body h3 {
  font-family: F1;
  margin-top: 30px;
}

.index-body a {
  color: white;
}