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

.admin__layout{
    height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    font-family: variables.$font;
    position: relative;
    // color: #FFF;
    background: variables.$col-primary;
    overflow-y: scroll;
    @media only screen and (max-width: 1000px) {
        grid-template-columns: 1fr;
        height: 100vh !important;
    }

    &__bottombar{
        display: none;
        @media only screen and (max-width: 1000px) {
            display: block;
        }
    }


    &__sidebar{
        position: fixed;
        z-index: 2;
        width: 280px;
        @media only screen and (max-width: 1000px) {
            width: 70%;
            z-index: 888;
            height: auto; 
            top: 5.4rem;
            display: none;
        }
    }

    &__content{
        position: absolute;
        right: 0;
        width: calc(100% - 280px); 
        @media only screen and (max-width: 1000px) {
            left: 0;
        }

        &__navbar{
            position: fixed;
            width: calc(100% - 280px);
            z-index: 1;
            background: variables.$col-primary;
            right: 0 !important;
            @media only screen and (max-width: 1000px) {
                width: 100%;
            }
        }
        &--children{
            display: grid;
            grid-gap: 12px;
            grid-template-columns: 1fr 300px;
            padding: 2rem;
            padding-left: 1.7rem !important;
            background: variables.$col-base-dark;
            padding-top: 5rem;
            position: relative;
            padding-bottom: 5rem;
            height: auto;
            min-height: 100vh;
            
            @media only screen and (max-width: 1000px) {
                display: flex;
                flex-direction: column;
                padding: 2rem 1.5rem;
                width: 100vw;
                padding-top: 6rem;
                margin-left: 0;
                padding-bottom: 5rem;
                // margin-bottom: 4rem;
            }


            &--rightbar{
                position: fixed;
                width: 280px;
                right: 1.5rem;
                top: 6rem;
                // z-index: 1;

                @media only screen and (max-width: 1000px) {
                    display: none !important;
                    // padding: 0 1.5rem;
                    // position: absolute;
                    // width: 100% !important;
                    // top: 23rem;
                    // right: 0 !important;

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


// ======================================
// 🔔 FLASH MESSAGE STYLES
// ======================================
/* ==========================================
   PREMIUM TRADERPLUS FLASH
========================================== */

.flash {
  position: fixed;

  top: 1rem;
  right: 1rem;

  z-index: 999999;

  width: min(400px, calc(100vw - 2rem));

  display: flex;
  align-items: center;

  gap: 0.9rem;

  padding: 0.9rem;

  border-radius: 14px;

  overflow: hidden;
  font-family: variables.$font;

  animation: flashEnter 0.3s ease;

  backdrop-filter: blur(24px);

  background: linear-gradient(
    180deg,
    rgba(26, 26, 29, 0.98),
    rgba(17, 17, 20, 0.98)
  );

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    0 25px 70px rgba(0, 0, 0, 0.55),
    0 8px 30px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);

  &::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;
  }
}

/* ==========================================
   STATUS BLOCK
========================================== */

.flashIndicator {
  width: 42px;
  height: 42px;

  min-width: 42px;

  border-radius: 12px;

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

  position: relative;
}

.flashDot {
  width: 9px;
  height: 9px;

  border-radius: 50%;

  animation: pulse 1.8s infinite;
}

/* ==========================================
   CONTENT
========================================== */

.flashContent {
  flex: 1;

  min-width: 0;

  h5 {
    margin: 0;

    color: #ffffff;

    font-size: 0.72rem;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;
  }

  p {
    margin-top: 0.28rem;  

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

    font-size: 0.76rem;

    line-height: 1.55;

    font-weight: 400;
  }
}

/* ==========================================
   SUCCESS
========================================== */

.flashSuccess {
  &::before {
    background: #22c55e;
  }

  .flashIndicator {
    background: rgba(34, 197, 94, 0.12);

    border: 1px solid rgba(34, 197, 94, 0.18);
  }

  .flashDot {
    background: #22c55e;

    box-shadow:
      0 0 0 5px rgba(34, 197, 94, 0.12),
      0 0 18px rgba(34, 197, 94, 0.4);
  }
}

/* ==========================================
   ERROR
========================================== */

.flashError {
  &::before {
    background: #ef4444;
  }

  .flashIndicator {
    background: rgba(239, 68, 68, 0.12);

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

  .flashDot {
    background: #ef4444;

    box-shadow:
      0 0 0 5px rgba(239, 68, 68, 0.12),
      0 0 18px rgba(239, 68, 68, 0.4);
  }
}

/* ==========================================
   WARNING
========================================== */

.flashWarning {
  &::before {
    background: #f59e0b;
  }

  .flashIndicator {
    background: rgba(245, 158, 11, 0.12);

    border: 1px solid rgba(245, 158, 11, 0.18);
  }

  .flashDot {
    background: #f59e0b;

    box-shadow:
      0 0 0 5px rgba(245, 158, 11, 0.12),
      0 0 18px rgba(245, 158, 11, 0.35);
  }
}

/* ==========================================
   INFO
========================================== */

.flashInfo {
  &::before {
    background: #3b82f6;
  }

  .flashIndicator {
    background: rgba(59, 130, 246, 0.12);

    border: 1px solid rgba(59, 130, 246, 0.18);
  }

  .flashDot {
    background: #3b82f6;

    box-shadow:
      0 0 0 5px rgba(59, 130, 246, 0.12),
      0 0 18px rgba(59, 130, 246, 0.4);
  }
}

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

@media (max-width: 768px) {
  .flash {
    top: 0.75rem;

    left: 0.75rem;
    right: 0.75rem;

    width: auto;

    padding: 0.85rem;
  }

  .flashIndicator {
    width: 38px;
    height: 38px;

    min-width: 38px;
  }

  .flashContent {
    h5 {
      font-size: 0.68rem;
    }

    p {
      font-size: 0.72rem;
    }
  }
}

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

@keyframes flashEnter {
  from {
    opacity: 0;

    transform:
      translateY(-14px)
      scale(0.97);
  }

  to {
    opacity: 1;

    transform:
      translateY(0)
      scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.15);
  }

  100% {
    transform: scale(1);
  }
}

.flash,
.flash * {
  font-family: inherit;
}