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

.deposits {
  @include mixins.pageBase;

  width: 100%;
  min-width: 0;
}

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

.deposits__header {
  margin: 1rem 0;
}

.deposits__header--form {
  display: flex;

  gap: 1rem;

  margin-bottom: 1.5rem;

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

  button {
    height: 46px;

    padding: 0 1.25rem;

    border: none;

    border-radius: 10px;

    cursor: pointer;

    background: $col-orange;

    color: $col-dark;

    font-size: 0.82rem;

    font-weight: 600;
  }
}

.deposits__header--form--left {
  flex: 1;

  display: flex;

  align-items: center;

  gap: 0.75rem;

  height: 46px;

  padding: 0 1rem;

  border-radius: 10px;

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

  background: #19191b;

  input {
    flex: 1;

    border: none;

    outline: none;

    background: transparent;

    color: #fff;

    font-size: 0.85rem;
  }
}

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

.deposits__content {
  margin-top: 1rem;
}

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

.deposits__table-wrapper {
  width: 100%;

  overflow-x: auto;
  overflow-y: hidden;

  border-radius: 16px;

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

  background: #19191b;

  -webkit-overflow-scrolling: touch;

  scrollbar-width: none;

  -ms-overflow-style: none;

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

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

.deposits__table {
  display: grid;

  width: max-content;

  min-width: 100%;

  grid-template-columns:
    240px
    260px
    150px
    150px
    130px
    180px
    160px;

  gap: 1rem;

  padding: 1rem 1.25rem;

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

  border-bottom: 1px solid $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__children {
  width: 100%;
}

.deposits__children--item {
  display: grid;

  width: max-content;

  min-width: 100%;

  grid-template-columns:
    240px
    260px
    150px
    150px
    130px
    180px
    160px;

  gap: 1rem;

  align-items: center;

  padding: 0.95rem 1.25rem;

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

  transition: all 0.2s ease;

  &:hover {
    background: rgba(255, 255, 255, 0.02);
  }

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

    font-size: 0.8rem;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
  }
}

.deposits__children--item:last-child {
  border-bottom: none;
}

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

.deposits__children--item--processed,
.deposits__children--item--pending {
  display: inline-flex;

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

  width: fit-content;

  min-width: 95px;

  height: 32px;

  padding: 0 0.85rem;

  border-radius: 999px;

  font-size: 0.72rem !important;

  font-weight: 600 !important;

  white-space: nowrap;

  border: 1px solid transparent;
}

.deposits__children--item--processed {
  color: #22c55e !important;

  background: rgba(34, 197, 94, 0.08);

  border-color: rgba(34, 197, 94, 0.15);
}

.deposits__children--item--pending {
  color: #f59e0b !important;

  background: rgba(245, 158, 11, 0.08);

  border-color: rgba(245, 158, 11, 0.15);
}

/* ==========================================
   PROOF BUTTONS
========================================== */

.viewProofBtn {
  display: inline-flex;

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

  height: 34px;

  padding: 0 0.9rem;

  border-radius: 10px;

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

  background: rgba(59, 130, 246, 0.08);

  color: #60a5fa;

  font-size: 0.75rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.2s ease;

  &:hover {
    background: rgba(59, 130, 246, 0.15);

    transform: translateY(-1px);
  }
}

.noProofBtn {
  display: inline-flex;

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

  height: 34px;

  padding: 0 0.9rem;

  border-radius: 10px;

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

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

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

  font-size: 0.75rem;

  font-weight: 600;

  cursor: not-allowed;
}

/* ==========================================
   ACTIONS
========================================== */

.deposits__children--item--actions {
  display: flex;

  align-items: center;
}

.actionButtonProcess {
  display: inline-flex;

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

  height: 34px;

  padding: 0 0.9rem;

  border: none;

  border-radius: 10px;

  cursor: pointer;

  font-size: 0.78rem;

  font-weight: 600;

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

  color: #f79318;

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

  transition: all 0.2s ease;

  &:hover {
    background: rgba(247, 147, 24, 0.18);

    border-color: rgba(247, 147, 24, 0.25);

    transform: translateY(-1px);
  }
}

.actionButtonProcessed {
  display: inline-flex;

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

  height: 34px;

  padding: 0 0.9rem;

  border-radius: 10px;

  background: rgba(34, 197, 94, 0.08);

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

  color: #22c55e;

  font-size: 0.78rem;

  font-weight: 600;

  cursor: not-allowed;
}

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

.skeleton__row {
  display: grid;

  width: max-content;

  min-width: 100%;

  grid-template-columns:
    240px
    260px
    150px
    150px
    130px
    180px
    160px;

  gap: 1rem;

  padding: 1rem 1.25rem;

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

.skeleton__cell {
  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;
  }
}

/* ==========================================
   PAGINATION
========================================== */

.attend__pagination {
  display: flex;

  justify-content: center;

  margin-top: 1.5rem;
}

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

@media (max-width: 1024px) {
  .deposits__table,
  .deposits__children--item,
  .skeleton__row {
    min-width: 1270px;
  }
}