@use '../../variables' as *;
@use '../../mixins' as *;

/* 
  Sidebar component styles
*/
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background-color: var(--secondary-bg);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: inset -5px 0 15px rgba(0, 0, 0, 0.2);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  z-index: var(--z-elevate) + 1;
  @include custom-scrollbar;

  h2 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
    opacity: 0.9;
  }
}

.filter-list {
  list-style: none;
  margin-bottom: 1.5rem;

  li {
    transition: all var(--duration-normal) var(--easing-ease-out);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    margin-bottom: 0.3rem;
    font-weight: 500;
    cursor: pointer;

    &:hover {
      background-color: rgba(255, 255, 255, 0.07);
    }

    &.active {
      background: linear-gradient(
        135deg,
        var(--primary-color),
        color-mix(in srgb, black 10%, var(--primary-color))
      );
      box-shadow: 0 4px 10px rgba(var(--primary-color), 0.3);
      color: var(--elevated-bg);
    }
  }
}

// Custom select dropdown styling
.custom-select {
  position: relative;
  display: inline-block;

  .select-selected {
    background-color: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--duration-normal) var(--easing-ease-out);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 150px;

    &:after {
      content: '⯆';
      font-size: 0.7rem;
      opacity: 0.7;
    }

    &:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }
  }

  .select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--secondary-bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    margin-top: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 10;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;

    &.show {
      max-height: 300px;
    }

    .select-item {
      padding: 0.5rem 1rem;
      cursor: pointer;
      transition: all var(--duration-normal) var(--easing-ease-out);

      &:hover {
        background-color: rgba(255, 255, 255, 0.07);
      }

      &.selected {
        background-color: var(--primary-color);
        color: var(--text-primary);
      }
    }
  }
}

// App logo styles
.app-logo {
  display: flex;
  align-items: center;
  gap: 10px;

  svg {
    width: 28px;
    height: 28px;
    fill: var(--text-primary);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
  }
}
