/* Sidebar navigation styles */

/* Main layout wrapper */
.layout-wrapper {
  display: flex;
  height: 100%;
  width: 100%;
  border-top: none;
  border-left: none;
}

/* Sidebar container */
.sidebar {
  width: 250px;
  background-color: var(--surface-overlay);
  display: flex;
  flex-direction: column;
  transition: width 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  border: none;

  /* Collapsed state */
  &.collapsed {
    width: 70px;

    .logo {
      display: none;
    }

    :deep(.menu-component) {
      width: 70px;
    }

    :deep(.p-menu-list),
    :deep(.p-menuitem) {
      width: 70px;
    }

    /* Menu item links in collapsed mode */
    :deep(.p-menuitem-link) {
      width: 70px;
      display: flex;
      justify-content: center;
      align-items: center;
      padding: 0.75rem 0;
      height: 3.5rem;
      box-sizing: border-box;
      
      .pi {
        margin: auto;
        font-size: 1.5rem;
      }
    }

    /* Active link in collapsed mode */
    :deep(.active-link) {
      max-width: 70px;
      width: 70px;
    }

    /* Language selector in collapsed mode */
    .language-selector {
      justify-content: center;
    }
  }

  /* Logo image sizing */
  .logo-image {
    transform: scale(0.8);
    max-width: 80%;
    border-radius: 0.25rem;
  }
}

/* Sidebar header section */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--surface-border);
  background-color: #171716;

  .logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
  }

  .logo-image {
    height: 40px;
    max-width: 100%;
    transition: all 0.3s ease;
  }
}

/* Sidebar menu */
.sidebar-menu {
  flex: 1;
  padding: 1rem 0;

  :deep(.menu-component) {
    width: 100%;
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 0;

    .p-menu-list {
      padding: 0;
    }

    .p-menuitem {
      width: 100%;
      margin: 0;
    }

    /* Active menu item */
    .active-link {
      background-color: var(--primary-color) !important;
      color: white !important;
      font-weight: 600;
      box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      max-width: 100%;
      width: 100%;
    }

    /* Menu item links */
    .p-menuitem-link {
      padding: 0.75rem 1rem;
      transition: background-color 0.2s;
      color: var(--text-color);
      font-weight: 500;
      border-radius: 0;

      &:hover {
        background-color: var(--surface-hover);
      }

      .p-menuitem-icon {
        font-size: 1.2rem;
        margin-right: 0.75rem;
        color: inherit;
      }

      .p-menuitem-text {
        color: inherit;
      }
    }
  }
}

/* Sidebar footer section */
.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--surface-border);

  /* Theme toggle in footer */
  .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;

    i {
      color: var(--text-color-secondary);
      transition: color 0.3s ease;
      cursor: pointer;

      &.active {
        color: var(--primary-color);
        font-size: 1.3rem;
        text-shadow: 0 0 5px rgba(99, 102, 241, 0.3);
      }
    }
    
    &.collapsed {
      justify-content: center;
      
      i {
        margin: 0;
      }
    }
  }

  /* Fullscreen toggle button */
  .fullscreen-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    i {
      color: var(--text-color-secondary);
      transition: color 0.3s ease;
      cursor: pointer;
      font-size: 1.2rem;

      &:hover {
        color: var(--primary-color);
        text-shadow: 0 0 5px rgba(99, 102, 241, 0.3);
      }
    }
    
    &.collapsed {
      justify-content: center;
      
      i {
        margin: 0;
      }
    }
  }

  /* Language selector in footer */
  .language-selector {
    display: flex;
    justify-content: space-between;
    
    .language-flags-container {
      display: flex;
      flex-direction: row;
      justify-content: space-between;
      width: 100%;
      flex-wrap: wrap;
    }
    
    &.collapsed {
      justify-content: center;
      
      .current-language {
        .language-flag {
          margin: 0 auto;
        }
      }
    }

    .language-flag {
      width: 28px;
      height: 20px;
      overflow: hidden;
      cursor: pointer;
      opacity: 0.6;
      transition: opacity 0.2s;
      position: relative;
      margin: 0 2px;

      &:hover,
      &.active {
        opacity: 1;
      }

      .fi {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
    }
  }
}

/* Main content area */
.content-wrapper {
  flex: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background-color: var(--surface-ground);
  border-top: none;
  border-left: none;
}

/* Dark mode specific styles */
[data-theme="dark"] {
  .sidebar-menu .p-menuitem-link {
    color: #e0e0e0 !important;

    &:hover {
      background-color: #3e3e3e !important;
      color: white !important;
    }
  }

  .sidebar .active-link {
    background-color: var(--primary-color) !important;
    color: white !important;
  }

  .theme-toggle i {
    color: #888888;

    &.active {
      color: var(--primary-color);
    }
  }
} 