input,
select,
button {
  font-family: inherit;
}

small {
  font-size: 14px;
}

.rpm-mode-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.main-nav {
  margin-bottom: 1.5rem;
  display: grid;
  gap: 1rem;
}

header.header .link {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid #ddd;
  padding: 5px 15px;
  border-radius: 5px;
  margin-left: auto;
  margin-right: 15px;
}

header.header .link:hover {
  border: 1px solid var(--button-hover);
  color: var(--button-hover);
  transition: var(--transition);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  row-gap: 1rem;
  list-style: none;
  justify-content: center;
  margin: 0;

  li {
    margin: 0;
    padding: 0 1rem;
    border-left: 1px solid var(--text-secondary);
    line-height: 1;

    &:first-child {
      margin-left: 0;
      border-left: 0;
    }

    &:last-child {
      border-right: 0;
      margin-right: 0;
    }
  }

  .nav-link {
    text-align: center;
    text-decoration: none;
    text-wrap: nowrap;

    &:hover {
      color: white;
    }
  }
}

.tips-title .material-icons {
  color: var(--accent-warning);
}

/* Pages Styles */
.container.page-content {
  max-width: 54rem;
  padding-block: 2rem;
  background: white;
}

#navigation-placeholder {
  margin-left: auto;
  margin-right: 1.5rem;
}

#manualRpmGroup {
  margin-bottom: 4rem;
}

#manualRpmGroup,
#autoCalculateInputs {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.4s linear,
    transform 0.4s linear;
}

#manualRpmGroup.visible,
#autoCalculateInputs.visible {
  opacity: 1;
  transform: translateY(0);
}

.loading-text {
  color: #6b7280;
  font-style: italic;
  text-align: center;
  padding: 2rem;
}

/* Smooth animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.dark-mode {
  p {
    color: var(--text-primary);
  }

  input,
  select,
  textarea {
    color: inherit;
    border: 1px solid var(--bg-tertiary);
  }

  .page-content {
    color: whitesmoke;
    background-color: transparent;
  }

  footer {
    color: var(--text-primary);
  }
}

body.dark-mode {
  #logo {
    .logo {
      --accent-primary: #bbb;
      color: var(--accent-primary);
      font-size: 25px;
      text-transform: uppercase;
      font-weight: 600;
    }
  }

  .preset-btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
  }

  .scenario:not(.scenario-primary) {
    .scenario-label {
      color: var(--text-primary);
      background: #555;
    }
  }
}

body.dark-mode {
  .page-content .container {
    color: var(--text-primary);
    background-color: transparent;
  }
}

@media (max-width: 480px) {
  footer .container {
    padding-inline: 5%;

    .main-nav {
      max-width: 18rem;
      margin-inline: auto;
    }
  }

  .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px 20px;
    margin-left: 0;
  }

  .nav-links li {
    padding: 0;
    border: 0;
  }

  .nav-links li a {
    text-decoration: underline;
  }
}

#contact-form {
  max-width: 25rem;
  margin-top: 1rem;

  .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
  }

  .btn-success {
    cursor: pointer;
    background: var(--accent-success);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: all 200ms linear;
  }

  .btn-success:hover {
    opacity: 0.9;
  }
}
