/* Default desktop styles (vertical sidebar) */
#sidebar {
  width: 120px;
  height: calc(100% - 65px);
  background-color: white;
  position: fixed;
  align-items: center;
  border-right: 1px solid #f1f1f1;
  z-index: 1000;
}

/* @media (max-width: 1200px) {
    #sidebar {
      width: 110px;
    }
  } */

.nav {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.nav-item {
  margin-bottom: 0px;
  padding: 0px 2px;
}

.nav-link {
  gap: 8px;
  font-family: "Satoshi";
  font-weight: 500;
  font-style: Medium;
  font-size: 14px;
  line-height: 150%;
  letter-spacing: 0%;
  text-align: center;
  color: #2f2f2f;
}

.nav-link.paraphraser.active {
  background-color: #e8f5ef;
}

.nav-link.grammar-checker.active {
  background-color: #f8e7e7;
}

.nav-link.ai-humanizer.active {
  background-color: #f7f1fc;
}

.nav-link.ai-summarizer.active {
  background-color: #efefff;
}

.nav-link.ai-language-translator.active {
  background-color: #e6fffa;
}

.nav-link.ai-text-formatter.active {
  background-color: #fefceb;
}

.nav-link.more-tools.active {
  background-color: #ececf7;
}

.nav-title {
  width: 60px;
  align-items: center;
  display: flex;
  justify-content: center;
  font-weight: 500;
  color: #2f2f2f;
}

.nav-icon {
  border-radius: 50%;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  display: flex;
}

.sidebar-icons {
  width: 34px;
  height: 34px;
  transition: all 0.3s ease;
}

@media (max-width: 1400px) {
  .sidebar-icons {
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 1024px) {
  .sidebar-icons {
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 990px) {
  .sidebar-icons {
    width: 24px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .sidebar-icons {
    width: 1.5rem;
    height: 1.5rem;
  }
}

@media (min-width: 990px) {
  .nav-link {
    line-height: 150%;
    letter-spacing: 0%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: 2px;
    text-decoration: none;
    transition: all 0.3s;
    height: 100%;
    gap: 6px;
  }

  .nav-link:hover {
    background-color: #f0f0f0;
    border-radius: 4px;
    color: #676767;
    font-weight: 500;
    font-size: 14px;
  }

  .nav-link.active {
    border-radius: 6px;
  }
}

@media (max-width: 990px) {
  .nav-link.active {
    border-bottom: 1px solid var(--color-primary-light);
  }

  .nav-link {
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--color-gray-500);
    padding: 8px 6px;
    text-decoration: none;
    height: 50px;
    gap: 4px;
    transition: all 0.3s;
  }

  .nav-icon {
    background-color: transparent !important;
    border-color: transparent !important;
  }

  .nav-title {
    width: auto;
    font-size: 12px;
  }

  .nav-icon img {
    width: 30px !important;
  }

  .nav {
    margin: 0px;
  }
}

.sidebar-header {
  position: sticky;
  height: 100%;
  scrollbar-width: thin;
  scrollbar-color: #d3d3d3 transparent;
  border-right: 1px solid #bebebe75;
  overflow: none;
  padding-bottom: 10px;
}

.sidebar-header::-webkit-scrollbar {
  width: 8px;
}

.sidebar-header::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-header::-webkit-scrollbar-thumb {
  background-color: #d3d3d3;
  border-radius: 4px;
}

.sidebar-header::-webkit-scrollbar-thumb:hover {
  background-color: #bbb;
}

/* Mobile styles (horizontal bottom bar) */
@media (max-width: 990px) {
  .sidebar-header {
    padding-bottom: 0px;
  }

  #sidebar {
    width: 100%;
    height: 50px;
    bottom: 0;
    left: 0;
    top: 70px;
    box-shadow: 0 -2px 5px rgba(145, 134, 134, 0.1);
    z-index: 1000;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #sidebar::-webkit-scrollbar {
    display: none;
  }

  .nav {
    display: flex;
    flex-direction: row;
    background-color: white;
    width: max-content;
    min-width: 100%;
    height: 100%;
    gap: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-item {
    margin-bottom: 0;
    flex: 0 0 auto;
    min-width: 80px;
  }

  #sidebar::-webkit-scrollbar {
    height: 4px;
  }

  #sidebar::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
  }

  #sidebar::-webkit-scrollbar-track {
    background: transparent;
  }
}

@media (min-width: 991px) and (max-width: 1400px) {
  .nav-icon img {
    width: 30px;
    height: 30px;
  }

  .nav-link {
    font-size: 12px;
    gap: 0px;
    margin: 1px;
  }

  .nav-link:hover {
    font-size: 12px;
  }

  .nav {
    padding: 8px 4px;
  }
}

@media (max-width: 400px) {
  .hero-section {
    height: 50vh;
  }
}

.nav-icon {
  display: inline-block;
  width: 42px;
  height: 42px;
  background-color: #e0e0e0;
  border-radius: 50%;
  overflow: hidden;
}

@media (min-width: 991px) and (max-width: 1400px) {
  .nav-icon {
    width: 30px;
    height: 30px;
  }
}

.nav-icon img.lazy-icon {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background-color: transparent;
}

.nav-link,
.nav-link:visited,
.nav-link:active,
.nav-link:focus {
  color: inherit;
  text-decoration: none;
}

.nav-link.active .nav-title {
  color: #000;
}

@media (max-height: 937px) and (min-width: 601px) {
  .nav-item[data-tab-id="ai-text-formatter"] {
    display: none;
  }
}

@media (max-height: 700px) and (min-width: 601px) {
  .nav-item[data-tab-id="ai-language-translator"] {
    display: none;
  }
}

@media (max-height: 600px) and (min-width: 601px) {
  .nav-item[data-tab-id="ai-summarizer"] {
    display: none;
  }
}
