@use "../../../../styles/abstracts/variables" as *;

/* ==========================================
   OVERLAY
========================================== */

.mobile__sidebar {
  position: fixed;
  inset: 0;

  z-index: 9999;

  background: rgba(4, 4, 6, 0.82);

  backdrop-filter: blur(14px);

  animation: fadeIn 0.25s ease forwards;
}

/* ==========================================
   CLOSE BAR
========================================== */

.sidebarTop {
  position: absolute;
  right: 0;
  z-index: 20;

  display: flex;
  justify-content: flex-end;

  padding: 1rem 1rem 0;
}

.closeButton {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border: none;

  border-radius: 10px;

  cursor: pointer;

  background: rgba(255, 255, 255, 0.04);

  color: rgba(255, 255, 255, 0.7);

  font-size: 0.9rem;

  transition: 0.25s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.08);

    color: #fff;
  }
}

/* ==========================================
   SIDEBAR PANEL
========================================== */

.mobile__sidebar__content {
  position: relative;
  width: min(88%, 360px);

  height: 100dvh;

  display: flex;
  flex-direction: column;

  overflow: hidden;

  background: linear-gradient(
    180deg,
    rgba(22, 22, 24, 0.98) 0%,
    rgba(15, 15, 18, 1) 100%
  );

  border-right: 1px solid
    rgba(255, 255, 255, 0.05);

  box-shadow:
    0 25px 60px rgba(0, 0, 0, 0.45);

  animation: slideIn 0.3s ease forwards;

  &::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
      radial-gradient(
        circle at top right,
        rgba(247, 147, 24, 0.06),
        transparent 40%
      );

    pointer-events: none;
  }
}

/* ==========================================
   HEADER
========================================== */

.mobile__sidebar__top {
  position: relative;

  z-index: 2;

  flex-shrink: 0;

  padding-bottom: 1.25rem;

  border-bottom: 1px solid
    rgba(255, 255, 255, 0.05);
}

/* ==========================================
   PROFILE
========================================== */

.profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 1.2rem !important;
  padding: 0 1.25rem;
}

.profileAvatar {
  width: 56px;
  height: 56px;

  min-width: 56px;

  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.05rem;
  font-weight: 700;

  color: #000;

  background: linear-gradient(
    135deg,
    #f79318,
    #ffb454
  );

  box-shadow:
    0 10px 25px
      rgba(247, 147, 24, 0.2),
    inset 0 1px 1px
      rgba(255, 255, 255, 0.15);
}

.profileContent {
  min-width: 0;

  flex: 1;

  h3 {
    margin: 0;

    color: #fff;

    font-size: 0.92rem;
    font-weight: 700;

    line-height: 1.3;
  }

  p {
    margin-top: 0.25rem;

    color: rgba(255, 255, 255, 0.55);

    font-size: 0.72rem;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

.profileMeta {
  margin-top: 0.55rem;
}

.profileStatus {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;

  color: #22c55e;

  font-size: 0.68rem;
  font-weight: 600;

  &::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: #22c55e;
  }
}

/* ==========================================
   SCROLLABLE BODY
========================================== */

.sidebarBody {
  position: relative;

  z-index: 2;

  flex: 1;

  overflow-y: auto;

  padding: 1rem 0.85rem;

  scrollbar-width: none;

  &::-webkit-scrollbar {
    display: none;
  }
}

.sidebar__links {
  display: flex;
  flex-direction: column;
}

/* ==========================================
   SECTION LABELS
========================================== */

.section {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;

  padding: 0 0.35rem;

  &:first-child {
    margin-top: 0;
  }

  span {
    color: rgba(255, 255, 255, 0.38);

    font-size: 0.66rem;
    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.12em;
  }
}

/* ==========================================
   LINKS
========================================== */

.link,
.active {
  position: relative;

  display: flex;
  align-items: center;

  gap: 0.85rem;

  padding: 0.8rem;

  border-radius: 14px;

  text-decoration: none;

  transition: 0.25s ease;
}

.link {
  &:hover {
    background: rgba(255, 255, 255, 0.035);
  }
}

.active {
  background: rgba(247, 147, 24, 0.08);

  border: 1px solid
    rgba(247, 147, 24, 0.12);

  &::before {
    content: "";

    position: absolute;

    left: 0;
    top: 50%;

    width: 3px;
    height: 60%;

    border-radius: 999px;

    background: #f79318;

    transform: translateY(-50%);
  }
}

/* ==========================================
   ICONS
========================================== */

.icon,
.icon-active {
  width: 42px;
  height: 42px;

  min-width: 42px;

  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  transition: 0.25s ease;
}

.icon {
  color: rgba(255, 255, 255, 0.55);

  background: rgba(255, 255, 255, 0.03);
}

.icon-active {
  color: #f79318;

  background: rgba(247, 147, 24, 0.12);
}

/* ==========================================
   TEXT
========================================== */

.link-text {
  display: flex;
  flex-direction: column;

  min-width: 0;
}

.link-label {
  color: #fff;

  font-size: 0.84rem;
  font-weight: 600;

  line-height: 1.3;
}

.link-desc {
  margin-top: 0.15rem;

  color: rgba(255, 255, 255, 0.45);

  font-size: 0.7rem;

  line-height: 1.4;
}

/* ==========================================
   FOOTER
========================================== */

.logoutCard {
  position: relative;

  z-index: 2;

  flex-shrink: 0;

  padding: 1rem 1.25rem;

  border-top: 1px solid
    rgba(255, 255, 255, 0.05);

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.02),
    rgba(255, 255, 255, 0.01)
  );

  backdrop-filter: blur(20px);
}

.logoutContent {
  display: flex;
  flex-direction: column;

  gap: 0.75rem;

  span {
    color: rgba(255, 255, 255, 0.45);

    font-size: 0.72rem;

    text-align: center;
  }
}

.logout {
  width: 100%;
  height: 48px;

  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.65rem;

  border: none;

  border-radius: 14px;

  cursor: pointer;

  color: #fff;

  font-size: 0.84rem;
  font-weight: 600;

  background: rgba(239, 68, 68, 0.12);

  border: 1px solid
    rgba(239, 68, 68, 0.18);

  transition: 0.25s ease;

  &:hover {
    background: rgba(239, 68, 68, 0.18);
  }

  &:active {
    transform: scale(0.98);
  }
}

/* ==========================================
   MOBILE
========================================== */

@media (max-width: 480px) {
  .mobile__sidebar__content {
    width: 90%;
  }

  .sidebarTop {
    padding: 0.85rem 0.85rem 0;
  }

  .profile {
    padding: 0 1rem;
  }

  .profileAvatar {
    width: 52px;
    height: 52px;

    min-width: 52px;

    font-size: 1rem;
  }

  .profileContent {
    h3 {
      font-size: 0.88rem;
    }

    p {
      font-size: 0.7rem;
    }
  }

  .link,
  .active {
    padding: 0.75rem;
  }

  .icon,
  .icon-active {
    width: 40px;
    height: 40px;

    min-width: 40px;
  }

  .link-label {
    font-size: 0.82rem;
  }

  .link-desc {
    font-size: 0.68rem;
  }
}

/* ==========================================
   ANIMATIONS
========================================== */

@keyframes slideIn {
  from {
    transform: translateX(-100%);
  }

  to {
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}