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

.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;

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

  &: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;
      }
    }

    .card__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;
    }
  }
}
