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

/* ================= COLORS ================= */
$primary: #5e3817;
$primary-2: #7a4b20;

$bg: #faf8f6;
$white: #ffffff;

$text-dark: #1a1a1a;
$text-light: #6b6b6b;

$border: rgba(0, 0, 0, 0.06);

/* ================= LAYOUT ================= */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
  background: $bg;
  font-family: variables.$font;

  @media (max-width: 1200px) {
    grid-template-columns: 260px 1fr;
  }

  @media (max-width: 1000px) {
    grid-template-columns: 1fr;
  }

  /* ================= SIDEBAR ================= */
  &__sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: $white;
    border-right: 1px solid $border;

    @media (max-width: 1000px) {
      display: none;
    }
  }

  /* ================= CONTENT ================= */
  &__content {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;

    /* NAVBAR */
    &__navbar {
      position: sticky;
      top: 0;
      z-index: 20;

      background: $white;
      border-bottom: 1px solid $border;

      @media (max-width: 768px) {
        display: none; // 🔥 hide navbar on mobile
      }
    }

    /* BODY */
    &__body {
      flex: 1;
      overflow-y: auto;

      padding: 2rem 1.5rem;
      padding-top: 5rem;
      padding-bottom: 6rem;

      @media (max-width: 1000px) {
        padding: 1.5rem 1rem;
        padding-top: 0rem;
        padding-bottom: 7rem;
      }
    }
  }

  /* ================= RIGHTBAR ================= */
  &__rightbar {
    position: sticky;
    top: 0;
    height: 100vh;

    padding: 1.5rem 1rem;
    padding-top: 5.5rem;

    // border-left: 1px solid $border;
    // background: $white;

    display: flex;
    flex-direction: column;
    gap: 1rem;

    @media (max-width: 1200px) {
      display: none;
    }
  }
}

/* ================= MOBILE WELCOME ================= */
.mobileWelcome {
  display: none;

  padding: 1rem 1rem 0.5rem 1rem;
  background: $bg;

  @media (max-width: 768px) {
    display: block;
    padding-bottom: 0;
  }
}

/* ================= RIGHTBAR CARDS ================= */
.rightbar__card {
  background: $white;
  border: 1px solid $border;
  border-radius: 14px;

  padding: 1rem;

  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);

  transition: 0.2s ease;

  &:hover {
    transform: translateY(-2px);
  }

  h4 {
    font-size: 0.9rem;
    margin-bottom: 0.6rem;
    color: $text-dark;
  }

  p {
    font-size: 0.8rem;
    color: $text-light;
    margin-bottom: 0.3rem;
  }
}

/* ================= SCROLLBAR ================= */
.layout__content__body::-webkit-scrollbar {
  width: 6px;
}

.layout__content__body::-webkit-scrollbar-track {
  background: transparent;
}

.layout__content__body::-webkit-scrollbar-thumb {
  background: rgba(94, 56, 23, 0.2);
  border-radius: 10px;
}

.layout__content__body::-webkit-scrollbar-thumb:hover {
  background: rgba(94, 56, 23, 0.4);
}

::-webkit-scrollbar {
  display: none !important;
}