@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap");

* {
  font-family: "Roboto", sans-serif;
  margin: 0;
  box-sizing: border-box;
}

header {
  color: #ffffff;
  background-color: #0166b1;
  text-align: center;
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-bottom-left-radius: 40px;
  border-bottom-right-radius: 40px;
}

header h1 {
  flex: 1;
}

header img {
  width: 40px;
}

footer {
  color: #ffffff;
  background-color: #0166b1;
  text-align: center;
  padding: 1rem;
  border-top-left-radius: 40px;
  border-top-right-radius: 40px;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100vw;
}

main {
  width: 1400px;
  margin: 2rem auto;
}

.allseries {
  background-color: #e5e5e5;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  padding: 1.5rem 0rem;
  border-radius: 20px;
}

.series-element {
  background-color: #ffffff;
  padding: 1rem 4rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease-in;
  font-weight: bold;
  font-size: 1.2rem;
}
.series-element:hover {
  background-color: #ff0000;
  color: #ffffff;
}

.series-element.active {
  background-color: #ff0000;
  color: #ffffff;
  transition: 0s;
}

.grid-container {
  display: flex;
  gap: 2rem;
  margin: 2rem 0rem;
  height: 600px;
  box-sizing: border-box;
}

.main-info {
  flex: 3;
  background-color: #e5e5e5;
  border-radius: 20px;
  position: relative;
  padding: 20px;
}

.car-card {
  background-color: #fff;
  border-radius: 10px;
  height: 100%;
  padding: 20px;
  position: relative;
  overflow: auto;
    scrollbar-width: auto; /* "auto" lub "thin" */
  scrollbar-color: #0166b1 #e5e5e5; /* kolor paska i tła */
}

.car-gen-name {
  font-weight: bold;
  font-size: 2rem;
}

.car-image img {
    margin: 2rem 0;
    width: 100%;
    height: 300px;
    object-fit: contain;
}

.car-bodies {
    display: flex;
    gap: 2rem;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
  }

.car-body-button {
  background-color: #e5e5e5;
  padding: 1rem 2.5rem;
  border-radius: 20px;
  cursor: pointer;
  transition: background-color 0.3s ease-in;
  font-weight: bold;
  font-size: 1.2rem;
  text-align: center;
}
.car-body-button:hover {
  background-color: #ff0000;
  color: #ffffff;
}
.car-body-button.active {
  background-color: #ff0000;
  color: #ffffff;
  transition: 0s;
}


.engines {
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.engines-list {
  background-color: #f2f2f2;
  height: 100%;
  display: flex;
  justify-content: center;
  align-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-radius: 1rem;
  padding: 0 1.2rem;
  margin: 2rem 0;
}

.engineOption {
  background-color: #ffffff;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease-in;
  font-weight: bold;
  font-size: 1.2rem;
  width: 100%;
}

.engineOption:hover {
    background-color: #ff0000;
  color: #ffffff;
}

.engineOption.active {
    background-color: #ff0000;
  color: #ffffff;
}

.engine-select {
      /* styling */
  background-color: white;
  border: thin solid blue;
  border-radius: 4px;
  display: inline-block;
  font: inherit;
  line-height: 1.5em;
  padding: 0.5em 3.5em 0.5em 1em;
  width: 100%;

  /* reset */

  margin: 0;      
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.table-container {
  border-radius: 1rem;
  overflow: hidden;
  border: 2px solid #0166b1;
  margin: 20px;
}

.engine-info {
  width: 100%;
  border-collapse: collapse;
  font-family: Arial, sans-serif;
}

.engine-info th {
  background-color: #0166b1;
  color: white;
  padding: 15px;
  text-align: left;
  border: 2px solid #ddd;
}

.engine-info td {
  padding: 12px;
  border: 1px solid #ddd;
}

.engine-info tr:nth-child(even) {
  background-color: #f2f2f2;
}

.engine-info tr:hover {
  background-color: #ddd;
}

.engine-info tr:first-child th {
  border-top-left-radius: 1rem;
}


.engine-info tr:last-child th {
  border-bottom-left-radius: 1rem;
}

.generations {
  background-color: #e5e5e5;
  border-radius: 20px;
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
  scrollbar-width: auto; /* "auto" lub "thin" */
  scrollbar-color: #0166b1 #e5e5e5; /* kolor paska i tła */
}

.generations-element {
  background-color: #ffffff;
  border-radius: 20px;
  display: flex;
  align-items: center;
  padding: 1rem;
  gap: 0.5rem;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.generations-element:hover {
  background-color: #ff0000;
  color: #ffffff;
}

.generations-element.active {
  background-color: #ff0000;
  color: #ffffff;
}

.generations-element img {
  width: 80px;
  border-radius: 10px;
}

@media only screen and (max-width: 1400px) {
  main {
    box-sizing: border-box;
    width: 100vw;
    margin: 2rem;
  }
}


.d-none {
  display: none !important;
}

.alert {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  text-align: center;
  margin: 0 4rem;
}