

:root {
  --primary-color: #131524;
  --text: white;
  --white: #FFFFFF;
  --sidebar-primary: #9290FF;
  --sidebar-primary-light: #90DEFF;
  --sidebar-primary-hover: #605DFF10;
  --sidebar-background: #19182D;
  --background: #F1F3FF;
  --full-bg: #C7D2DC;
  --text-link: #E6E8F0;
  --exp-btn-background: #1C2035;
  --exp-btn-border: #303651;
  --exp-btn: #F4F6F9;
  --headline: #9FAEE1;
  --cta-background: #1C2035;
  --cta-background-darker: #CFD5FF;
  --cta-background-border: #303651;
  --cta-text: #605DFF1A;
  --neutral: #0C0E19;
  --search-bg: #1C2035;
  --logout: #FA7575;
  --text: #FFFFFF;
  --text-lighter: #E6e8f0;
  --headline-text: #F4F6F9;
}

body {
  font-family: 'Work Sans', 
    sans-serif;
  background: var(--full-bg);
  font-size: 16px;
  padding: 1rem;
  height: 100%;
}

html {
  height: 100%;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.sidebar {
  position: sticky;
  top: 0;
  left: 0;
  min-height: 53.75rem;
  height: 100%;
  padding: 1rem 0;
  border-radius: 1rem;
  max-width: 18rem;
  display: flex;
  color: var(--white);
  flex-direction: column;
  background: var(
    --sidebar-background);
  transition: max-width 
    0.1s ease-in-out;
}

.sidebar-title {
  color: #E0EAFF;
  font-weight: bold;
}

body.collapsed .sidebar {
  max-width: 80px;
  display: flex;
  align-items: center;
}

body.collapsed .hide {
  position: absolute;
  display: none;
}

/*? search wrapper */
.search__wrapper {
  padding: 0 1rem;
  position: relative;
}

.search__wrapper input {
  background: var(
    --search-bg
  );
  height: 2.5rem;
  width: 100%;
  border-radius: 0.5rem;
  padding: 0 0.5rem;
  padding-left: 2rem;
  flex-grow: 1;
  outline: none;
  border: none;
}

.search__wrapper svg {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 1.625rem;
  transform: translateY(-50%);
  pointer-events: none;
  right: 1.5rem;
}

body.collapsed 
.search__wrapper svg {
  top: 50%;
  left: 50%;
  right: auto;
  transform: translate(-50%, -50%);
  color: var(--text-link);
  stroke: var(--text-link);
}

.search__wrapper 
input::-webkit-input-placeholder {
  color: var(--text-link);
  white-space: nowrap;
}

body.collapsed 
.search__wrapper input {
  max-width: 2.5rem;
}

body.collapsed .search__wrapper 
input::-webkit-input-placeholder {
  color: transparent;
}

/*? sidebar top */
.sidebar-top-wrapper {
  display: flex;
}

.sidebar-top {
  position: relative;
  display: flex;
  align-items: start;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
  height: 4rem;
  padding-bottom: 1rem;
}

body.collapsed .sidebar-top {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo__wrapper {
  display: flex;
  align-items: center;
  color: var(--text-link);
  font-weight: 700;
  text-decoration: none;
  font-size: 1.125rem;
  gap: 1rem;
  padding: 0 1rem;
}

.logo-small {
  height: 2rem;
  width: 2rem;
  overflow: hidden;
  object-fit: cover;
}

/*? menu links */
.sidebar-links {
  margin-top: 1rem;
  width: 100%;
}

.sidebar-links h2 {
  margin-left: 1rem;
  color: var(--headline);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.125rem;
  margin-bottom: 0.5rem;
  animation: fadeIn 0.2s 
    ease-in-out;
}

body.collapsed h2 {
  display: none;
}

.sidebar-links ul {
  list-style-type: none;
  position: relative;
  display: flex;
  column-gap: 0.5rem;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.sidebar-links li {
  color: var(--text-link);
}

body.collapsed 
.sidebar-links li {
  display: flex;
  justify-content: center;
  align-items: center;
}

.sidebar-links li svg {
  stroke: var(--text-link);
  width: 1.75rem;
  height: 1.75rem;
  min-width: 1.75rem;
}

.sidebar-links li 
a:hover svg {
  color: var(--sidebar-primary);
}

.sidebar-links li 
a:hover {
  color: var(--sidebar-primary);
}

.sidebar-links li a {
  color: var(--text-link);
  flex-grow: 1;
  padding: 0 1rem;
  font-size: 1.25rem;
  display: flex;
  gap: 1.75rem;
  justify-content: center;
  align-items: center;
  height: 3.5rem;
  text-decoration: none;
  transition: background-color 
    0.2s ease-in-out;
}

.sidebar-links li a .link {
  flex-grow: 1;
  overflow: hidden;
  white-space: nowrap;
  animation: fadeIn 
    0.2s ease-in-out;
}

.sidebar-links li a img {
  height: 2.125rem;
  width: 2.125rem;
}

.sidebar-links .active:hover {
  background: var(
    --sidebar-primary-hover);
}

.sidebar-links .active {
  text-decoration: none;
  background: var(
    --sidebar-primary-hover);
  color: var(--text-link);
}

.sidebar-links .active svg {
  stroke: var(--text-link);
}

.sidebar-links li a:hover svg {
  stroke: var(
    --sidebar-primary-light
  );
  color: var(
    --sidebar-primary-light
  );
}

.sidebar-links li a:hover {
  color: var(
    --sidebar-primary-light
  );
}

/* ?tooltip */
.tooltip {
  position: relative;
}

.tooltip 
.tooltip__content::after {
  content: " ";
  position: absolute;
  top: 50%;
  left: 0%;
  margin-left: -0.625rem;
  margin-top: -0.3125rem;
  border-width: 0.3125rem;
  border-style: solid;
  border-color: transparent 
    var(--sidebar-background) 
    transparent transparent;
}

.tooltip .tooltip__content {
  visibility: hidden;
  background: var(--primary-color);
  color: var(--white);
  text-align: center;
  border-radius: 0.375rem;
  padding: 0.375rem 0.75rem;
  position: absolute;
  z-index: 1;
  left: 5.625rem;
}

.collapsed .tooltip:hover 
.tooltip__content {
  visibility: visible;
}

/* ?sidebar action */

.sidebar__action__wrapper {
  overflow-x: hidden;
  margin: 0 1rem;
  margin-top: auto;
}

.sidebar__action {
  padding: 1rem;
  background: var(
    --cta-background);
  border-radius: 1rem;
  min-width: 1rem;
  color: var(--cta-text);
  animation: fadeIn 0.2s 
    ease-in-out;
}

.sidebar__action p {
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
  color: var(--text)
}

.sidebar__action h2 {
  color: var(--headline-text);
  margin-bottom: 0.5rem;
}

.sidebar__action button {
  border: 0;
  margin-top: 0.5rem;
  width: 100%;
  cursor: pointer;
  font-weight: 600;
  height: 2.612rem;
  font-size: 1.125rem;
  color: var(--neutral);
  border-radius: 0.75rem;
  background: linear-gradient(90deg,
      var(--sidebar-primary) -0.38%,
      var(--sidebar-primary-light) 100.02%);
}

.sidebar__action 
.progress-bar {
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  font-size: larger;
  display: flex;
  font-weight: 600;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(closest-side,
      var(--cta-background) 79%,
      transparent 80% 100%),
    conic-gradient(
      var(--sidebar-primary) 60%,
      var(--cta-background-darker) 0);
  margin-bottom: 1rem;
}

.progress-bar__value {
  font-size: 1.25rem;
  color: var(--text);
}

body.collapsed .sidebar__action {
  display: none;
}


/*? profile part */
.sidebar__profile {
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-direction: row;
  padding: 0 1rem;
  color: var(--text-link);
  overflow-x: hidden;
  min-height: 2.6125rem;
}

.avatar__wrapper {
  position: relative;
  display: flex;
}

.avatar {
  display: block;
  width: 2.5rem;
  height: 2.5rem;
  object-fit: cover;
  cursor: pointer;
  border-radius: 50%;
}

.avatar__name {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  white-space: nowrap;
  animation: fadeIn 0.2s 
    ease-in-out;
}

.user-name {
  font-weight: 600;
  text-align: left;
  color: var(--text);
  animation: fadeIn 0.2s 
    ease-in-out;
}

.email {
  color: var(--text-lighter);
  font-size: 0.8125rem;
  animation: fadeIn 0.2s 
    ease-in-out;
}

.logout {
  animation: fadeIn 0.2s 
    ease-in-out;
  margin-left: auto;
}

.logout svg {
  color: var(--logout);
}

body.collapsed .logout {
  display: none;
}

/*? Expand button */

.expand-btn {
  position: absolute;
  display: grid;
  place-items: center;
  cursor: pointer;
  right: -1rem;
  border: 1px solid var(
    --cta-background-border);
  background: var(
    --exp-btn-background);
  z-index: 2;
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

.expand-btn svg {
  transform: rotate(-180deg);
  stroke: var(--exp-btn);
  width: 1.25rem;
  height: 1.25rem;
}

body.collapsed 
.expand-btn svg {
  transform: rotate(-360deg);
}

.bottom-links {
  margin-top: auto;
}

@keyframes fadeIn {
  from {
    width: 0;
    opacity: 0;
  }

  to {
    opacity: 1;
    width: 100%;
  }
}