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

.deposits {
  @include mixins.pageBase;
   overflow-x: hidden;
   background:
    radial-gradient(
      circle at top right,
      rgba(255, 140, 66, 0.05),
      transparent 35%
    ),
    #101012;

  /* ==========================================
   TABLE HELPERS
========================================== */

  .deposits__history {
    &--helpers {
      display: flex;

      align-items: center;

      justify-content: space-between;

      gap: 1rem;

      margin-bottom: 1rem;

      @media (max-width: 768px) {
        flex-direction: column;

        align-items: flex-start;
      }
    }
  }

 /* ==========================================
   TABLE WRAPPER
========================================== */

.tableScrollWrapper {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;

  border-radius: 16px;

  border: 1px solid variables.$col-border-lining;

  background: #19191b;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;

  -ms-overflow-style: none;

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

/* ==========================================
   TABLE CONTAINER
========================================== */

.table {
  width: 100%;
  min-width: 940px;
}

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

.deposits__history__table {
  display: grid;

  grid-template-columns:
    160px
    120px
    100px
    220px
    100px
    200px;

  gap: 1rem;

  align-items: center;

  width: 100%;

  min-width: fit-content;

  padding: 1rem 1.25rem;

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

  border-bottom: 1px solid variables.$col-border-lining;

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

    font-size: 0.74rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.04em;
  }
}

/* ==========================================
   TABLE BODY
========================================== */

.deposits__history__table__children {
  width: 100%;

  min-width: 940px;

  display: flex;

  flex-direction: column;
}

  /* ==========================================
    SKELETON
  ========================================== */

  .transactions__card--skeleton {
    display: grid;

    width: max-content;

    min-width: 100%;

    grid-template-columns:
      180px
      180px
      140px
      220px
      220px;

    gap: 1rem;

    padding: 1rem 1.25rem;

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

    background: transparent;

    border-radius: 0;

    margin-bottom: 0;
  }

  .skeleton__line {
    height: 14px;

    border-radius: 999px;

    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.04),
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.04)
    );

    background-size: 200% 100%;

    animation: shimmer 1.4s infinite;
  }

  @keyframes shimmer {
    from {
      background-position: 200% 0;
    }

    to {
      background-position: -200% 0;
    }
  }

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

  @media (max-width: 1024px) {
  .table {
    min-width: 1040px;
  }

  .deposits__history__table {
    width: 100%;
    min-width: 1040px;
  }

  .deposits__history__table__children {
    width: 100%;
    min-width: 1040px;
  }

  .transactions__card--skeleton {
    width: 100%;
    min-width: 1040px;
  }
}



  // Filter Section
  .filterSection {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-wrap: wrap;

    input[type="date"] {
      background: #1e1e1e;
      color: #fff;
      border: 1px solid variables.$col-border-lining;
      padding: 0.45rem 1rem;
      border-radius: 6px;
      font-size: 0.85rem;

      &:focus {
        border-color: variables.$col-orange;
        outline: none;
      }

      &::-webkit-calendar-picker-indicator {
        filter: invert(1);
      }

      @media (max-width: 1000px) {
        flex: 1 1 100%;
      }
    }

    button {
      background: variables.$col-orange;
      color: variables.$col-dark;
      font-weight: 500;
      padding: 0.5rem 1.2rem;
      border-radius: 6px;
      border: none;
      cursor: pointer;
      font-size: 0.8rem;
      transition: all 0.3s ease-in-out;

      &:hover {
        background: #ff8c42;
      }

      @media (max-width: 1000px) {
        flex: 1 1 100%;
      }
    }
  }

  .filterToggleBtn {
    background: transparent;
    color: variables.$col-orange;
    border: 1px solid variables.$col-orange;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    margin: 1rem 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;

    &:hover {
      background: rgba(255, 140, 66, 0.1);
    }
  }

  .transactions__card--skeleton {
    background: #2a2a2a;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;

    &::before {
      content: "";
      position: absolute;
      top: 0;
      left: -150%;
      width: 50%;
      height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
      animation: shimmer 1.5s infinite;
      transform: skewX(-20deg);
      z-index: 1;
    }
  }

  .skeleton__line {
    height: 10px;
    background: linear-gradient(90deg, #3a3a3a, #444, #3a3a3a);
    border-radius: 4px;
    margin-bottom: 0.4rem;
  }

  @keyframes shimmer {
    0% { left: -150%; }
    100% { left: 150%; }
  }
}

// ------------------ Summary Card ------------------
.card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(10px);
  padding: 1.7rem 2rem;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  color: variables.$col-white;
  gap: 3rem;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  margin-bottom: 1.1rem;
  margin-top: .7rem !important;

  @media (max-width: 1000px) {
    gap: 1.5rem;
    padding: 1.5rem 1.5rem;
    margin-top: .7rem;
  }

  &:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  }

  &::before {
    content: "";
    position: absolute;
    width: 200%;
    height: 100%;
    background: linear-gradient(
      120deg,
      rgba(255, 140, 66, 0.2),
      rgba(255, 215, 0, 0.05),
      rgba(0, 255, 255, 0.1)
    );
    top: -10%;
    left: -50%;
    transform: rotate(25deg);
    pointer-events: none;
  }

  &__left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 1;

   .card__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;

    h4 {
      font-size: 0.85rem;
      font-weight: 500;
      letter-spacing: 0.5px;
    }
  }

  .eyeButton {
    border: none;
    background: transparent;
    color: #ffb800;

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

    cursor: pointer;

    padding: 0;

    transition: transform 0.2s ease;

    &:hover {
      transform: scale(1.1);
    }
  }

    .card__amount {
      display: flex;
      align-items: baseline;
      gap: 0.15rem;

      font-weight: 600;
      color: #fff;

      margin-top: 0.3rem;

      @media (max-width: 1000px) {
        flex-wrap: nowrap;
      }
    }

    .currency {
      font-size: 1rem;
      opacity: 0.8;

      @media (max-width: 1000px) {
        font-size: 0.95rem;
      }
    }

    .amount {
      font-size: 1.4rem;
      font-weight: 600;
      line-height: 1;

      @media (max-width: 1000px) {
        font-size: 1.15rem;
      }
    }

    .card__subtitle {
      font-size: 0.85rem;
      opacity: 0.65;
      margin-top: 0.25rem;
      letter-spacing: 0.5px;
    }
  }

  &__right {
    display: flex;
    gap: 0.8rem;
    z-index: 1;

    @media (max-width: 1000px) {
      width: 100%;
      justify-content: flex-end;
      gap: 0.5rem;
    }

    .actionBtn {
      display: flex;
      align-items: center;
      gap: 0.4rem;
      font-weight: 500;
      font-size: 0.85rem;
      padding: 0.65rem 1rem;
      border-radius: 12px;
      border: none;
      text-decoration: none;
      cursor: pointer;
      transition: all 0.25s ease;
      backdrop-filter: blur(5px);
      background: rgba(255, 255, 255, 0.05);
      color: #fff;

      svg {
        font-size: 1rem;
      }

      &:hover {
        background: rgba(255, 140, 66, 0.15);
        color: #fff;
        transform: translateY(-2px);
      }

      &.fund {
        border: 1px solid #ff8c42;
        box-shadow: 0 0 12px rgba(255, 140, 66, 0.3);
        color: #ff8c42;
      }
      &.withdraw {
        border: 1px solid #ff5c5c;
        box-shadow: 0 0 12px rgba(255, 92, 92, 0.3);
        color: #ff5c5c;

        @media (max-width: 1000px) {
          display: none; // hide on mobile
        }
      }
      &.transfer {
        border: 1px solid #00d4ff;
        box-shadow: 0 0 12px rgba(0, 212, 255, 0.3);
        color: #00d4ff;

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

  /* Skeleton loader for mobile and desktop */
  .skeleton {
    background: linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.05) 25%,
      rgba(255, 255, 255, 0.15) 50%,
      rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
  }

  /* Mobile-specific skeleton: one main button */
  @media (max-width: 1000px) {
    .skeleton-btn {
      width: 120px;
      height: 36px;
      border-radius: 12px;
    }
  }

  @keyframes shimmer {
    0% {
      background-position: -200% 0;
    }
    100% {
      background-position: 200% 0;
    }
  }
}


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