/* ------------------------------
   Fontes Personalizadas
------------------------------ */
@font-face {
  font-family: F1_Wide;
  src: url("../assets/fonts/Formula1-Wide.otf") format("opentype");
}

@font-face {
  font-family: F1;
  src: url("../assets/fonts/Formula1-Regular.otf") format("opentype");
}

@font-face {
  font-family: F1_Bold;
  src: url("../assets/fonts/Formula1-Bold.otf") format("opentype");
}

/* ------------------------------
   Layout principal
------------------------------ */
body {
  font-family: F1;
  background-color: #000000;
  margin: 0;
  width: 100vw;
  height: 100vh;
}

html, body {
  max-width: 100%;
}

#layout-container {
  display: flex;
  flex-direction: row;
  width: 100%;
  height: 100%;
  padding: 10px;
  justify-content: flex-start;
}

/* ------------------------------
   Painel de Controle
------------------------------ */
#painel_de_controle {
  width: 15%;
  height: 90%; /* O painel ocupa toda a altura da tela */
  background-color: #F21905;
  padding: 10px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
}

@media (max-width: 768px) {
  #layout-container {
    flex-direction: column;
  }

  #painel_de_controle {
    width: 100%;
    height: auto;
  }
}

/* ------------------------------
   Área do Gráfico Principal
------------------------------ */
#main_chart_area {
  width: 81%;
  height: 92.25%; /* O gráfico principal deve ter a mesma altura do painel */
  padding-left: 20px; /* Espaço entre o painel e o gráfico */
}

#main_chart {
  width: 100%;
  height: 100%; /* O gráfico ocupa 100% da altura disponível */
}

/* ------------------------------
   Gráficos Adicionais
------------------------------ */
#extra_charts {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 98.5%;
  margin: 0 auto;
  gap: 10px;
}

#top_charts {
  display: flex;
  justify-content: space-between;
  width: 100%;
  gap: 10px;
  margin-top: 0;
  padding-top: 0;
}

#ranking_chart {
  width: 33.3%;
  height: 600px;
  background-color: #f0f0f0;
}

#tempos_chart {
  width: 66.6%;
  height: 600px;
  background-color: #f0f0f0;
}

#evolucao_chart {
  width: 100%;
  height: 600px;
  background-color: #f0f0f0;
}

#extra_controls {
  display: flex;
  justify-content: space-between;
  width: 98.5%;
  margin: 0 auto;
  margin-bottom: 0;  /* ESSENCIAL */
  padding-bottom: 0;
}

#extra_charts svg {
  display: block;
}

/* ------------------------------
   Tooltip
------------------------------ */
#tooltip {
  position: absolute;
  background-color: white;
  border: 1px solid #ccc;
  padding: 10px;
  pointer-events: none;
  opacity: 0;
  border-radius: 8px;
  box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
  transition: opacity 0.3s ease;
}

#tooltip.visible {
  opacity: 1;
}

/* ------------------------------
   Inputs e botões
------------------------------ */
select, button, input[type=range] {
  margin-top: 10px;
  padding: 5px;
  font-size: 14px;
}

select, button {
  width: 90%;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  font-family: F1;
  font-size: 95%;
}

input[type=range] {
  width: 90%;
  vertical-align: middle;
}

/* ------------------------------
   Outros elementos
------------------------------ */
#logo {
  width: 90%;
}

#logo img {
  width: 95%;
  height: auto;
}

legend {
  font-size: 100%;
  color: #ffffff;
  font-family: F1;
}

#clima_display, #lap_display {
  width: 90%;
  height: 20%;
  background-color: #ffffff;
  margin-top: 10px;
  border-radius: 5px;
  display: flex;
  justify-content: center;
  align-items: center;
}

#clima_display img {
  width: 97%;
  height: 95%;
  border-radius: 5px;
}

#lap_display img {
  width: 97%;
  height: 95%;
  border-radius: 5px;
}

#clima_info {
  width: 90%;
  height: 25%;
  background-color: #ffffff;
  margin-top: 10px;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: right;
  font-size: 95%;
  overflow-y: auto;
}

#clima_info p {
  margin: 2.5% 0;
  margin-left: 5%;
}

svg text {
  font-family: F1;
}

#ranking_chart text, #evolucao_chart text, #tempos_chart text {
  font-size: 14px;
  font-weight: bold;
  fill: #000;
}

.bar:hover, .label:hover, .sprite:hover, .linha-piloto:hover, .linha-tempo:hover, .ponto:hover {
  cursor: pointer;
}

#lapText{
  color: #ffffff;
}