/* Navigation Ribbon Styles */

.nav-ribbon {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  z-index: 1100;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.nav-footer {
  margin-top: auto;
  padding-bottom: 8px;
}

.nav-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 16px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.nav-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s ease;
}

.nav-icon:hover::before {
  left: 100%;
}

.nav-icon:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-icon.active {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-color: #ffffff;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.nav-icon.active::before {
  display: none;
}

.nav-icon svg {
  width: 24px;
  height: 24px;
  color: white;
  margin-bottom: 4px;
  transition: transform 0.3s ease;
}

.nav-icon:hover svg {
  transform: scale(1.1);
}

.nav-label {
  font-size: 0.65rem;
  color: white;
  font-weight: 500;
  text-align: center;
  opacity: 0.9;
  line-height: 1;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.nav-icon.active .nav-label {
  opacity: 1;
  font-weight: 600;
}

/* Tooltip for collapsed state */
.nav-icon::after {
  content: attr(title);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #2c3e50;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-icon::before {
  content: '';
  position: absolute;
  left: 64px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 6px 6px 6px 0;
  border-color: transparent #2c3e50 transparent transparent;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1201;
}

.nav-icon:hover::after,
.nav-icon:hover::before {
  opacity: 1;
  visibility: visible;
}

/* Navigation states */
.nav-ribbon .nav-icon:not(.active) {
  opacity: 0.8;
}

.nav-ribbon .nav-icon:not(.active):hover {
  opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-ribbon {
    width: 60px;
    padding: 16px 0;
  }

  .nav-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 12px;
  }

  .nav-icon svg {
    width: 20px;
    height: 20px;
    margin-bottom: 2px;
  }

  .nav-label {
    font-size: 0.6rem;
  }
}

@media (max-width: 480px) {
  .nav-ribbon {
    width: 60px;
    padding: 12px 0;
  }

  .nav-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 10px;
    border-radius: 8px;
  }

  .nav-icon svg {
    width: 18px;
    height: 18px;
    margin-bottom: 1px;
  }

  .nav-label {
    font-size: 0.55rem;
  }

  /* Hide tooltips on mobile */
  .nav-icon::after,
  .nav-icon::before {
    display: none;
  }
}

/* Animation for active state changes */
@keyframes navActivate {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
  }
}

.nav-icon.activating {
  animation: navActivate 0.3s ease;
}

#assay-explorer-nav svg {
  width: 41px;
  height: 41px;
}

#subscription-nav svg {
  width: 36px;
  height: 36px;
}

#contact-nav svg {
  width: 36px;
  height: 36px;
}

#help-nav svg {
  width: 36px;
  height: 36px;
}

#tools-nav {
  display: none;
}

.search-section {
  position: relative;
}

#assay-refresh-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: #ccc; /* Inactive color */
}

#assay-refresh-icon.active {
  color: #667eea; /* Active color */
}

.assay-list.has-selection .assay-item:not(.selected) {
  display: none;
}

/* Sort Icon Styling */
.search-input {
  padding-right: 80px; /* Increased to fit 2 larger icons with more spacing */
}

#assay-sort-icon {
  position: absolute;
  right: 45px; /* Increased distance from refresh icon */
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  cursor: pointer;
  color: #667eea; /* Initial color updated */
  transition: transform 0.3s ease, color 0.3s ease;
}

#assay-sort-icon:hover {
  color: #4c51bf;
}

/* State for Z-A (Descending) */
#assay-sort-icon.descending {
  transform: translateY(-50%) scaleY(-1); /* Flip vertically to show Z-A */
  color: #667eea;
}
