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

/* ==========================================
   PAGE
========================================== */

.kyc {
  @include mixins.adminPageIntro;

  width: 100%;
  max-width: 100%;

  min-width: 0;

  overflow-x: hidden;

  margin-top: 1rem;

  @media (max-width: 768px) {
    margin-top: 0;
  }
}

/* ==========================================
   STATS
========================================== */

.stats {
  display: grid;

  grid-template-columns: repeat(
    auto-fit,
    minmax(100px, 1fr)
  );

  gap: 1rem;

  margin-bottom: 1.5rem;

  width: 100%;

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

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

.statsCard {
  min-width: 0;

  padding: .7rem 1.25rem;

  border-radius: 16px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.015)
  );

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

  backdrop-filter: blur(12px);

  transition: all 0.25s ease;

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

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

  span {
    display: block;

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

    font-size: 0.75rem;
    padding-bottom: .4rem;

  }

  h3 {
    color: #fff;

    font-size: 1.2rem;

    font-weight: 600;
  }
}

/* ==========================================
   FILTER TABS
========================================== */

.tabs {
  display: flex;

  flex-wrap: wrap;

  gap: 0.75rem;

  margin-bottom: 1.5rem;

  button {
    border: none;

    cursor: pointer;

    border-radius: 999px;

    padding: 0.7rem 1rem;

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

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

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

    font-size: 0.78rem;

    font-weight: 500;

    transition: all 0.2s ease;

    text-transform: capitalize;

    white-space: nowrap;

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

      color: #fff;
    }
  }
}

.active {
  background: rgba(
    247,
    147,
    24,
    0.12
  ) !important;

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

  color: #f79318 !important;
}

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

.tableWrapper {
  width: 100%;
  border: 1px solid variables.$col-border-lining;

  background: #19191b;

  border-bottom: 1px solid variables.$col-border-lining !important;
  max-width: 100%;

  min-width: 0;

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

  -webkit-overflow-scrolling: touch;

  border-radius: 18px;

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

  background: rgba(
    255,
    255,
    255,
    0.015
  );
}

.table {
  width: max-content;

  min-width: 100%;
}

.tableHeader,
.row {
  display: grid;

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

  align-items: center;

  gap: 1rem;

  padding: 1rem 1.25rem;
}

.tableHeader {
  position: sticky;

  top: 0;

  z-index: 2;

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

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

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

    font-size: 0.75rem;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: 0.03em;
  }
}

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

  transition: all 0.2s ease;

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

  span {
    color: #fff;

    font-size: 0.8rem;

    line-height: 1.5;

    min-width: 0;

    overflow: hidden;

    text-overflow: ellipsis;
  }
}

/* ==========================================
   FILE BUTTONS
========================================== */

.files {
  display: flex;

  flex-wrap: wrap;

  gap: 0.5rem;

  button {
    border: none;

    cursor: pointer;

    display: flex;

    align-items: center;

    gap: 0.45rem;

    padding: 0.55rem 0.75rem;

    border-radius: 10px;

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

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

    color: #fff;

    font-size: 0.72rem;

    white-space: nowrap;

    transition: all 0.2s ease;

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

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

      color: #f79318;
    }
  }
}

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

.status {
  display: inline-flex;

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

  width: fit-content;

  padding: 0.45rem 0.8rem;

  border-radius: 999px;

  font-size: 0.72rem;

  font-weight: 600;

  white-space: nowrap;
}

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

  color: #f59e0b;
}

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

  color: #22c55e;
}

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

  color: #ef4444;
}

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

.actions {
  display: flex;

  align-items: center;

  gap: 0.65rem;

  flex-wrap: wrap;
}

.approve,
.reject {
  border: none;

  cursor: pointer;

  padding: 0.65rem 0.95rem;

  border-radius: 10px;

  font-size: 0.74rem;

  font-weight: 600;

  white-space: nowrap;

  transition: all 0.2s ease;
}

.approve {
  background: #22c55e;
  color: #22c55e;

  &:hover {
    background: rgba(
      34,
      197,
      94,
      0.18
    );
  }
}

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

  color: #ef4444;

  &:hover {
    background: rgba(
      239,
      68,
      68,
      0.18
    );
  }
}

.processed {
  display: inline-flex;

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

  height: 34px;

  padding: 0 0.9rem;

  border-radius: 10px;

  background: #22c55e;

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

  color: #d4edda !important;

  font-size: 0.76rem;

  font-weight: 500;

  cursor: not-allowed;

  opacity: 0.9;

  white-space: nowrap;

  user-select: none;
}

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

.pagination {
  display: flex;

  justify-content: flex-end;

  margin-top: 1.5rem;

  width: 100%;
}

/* ==========================================
   MODAL BACKDROP
========================================== */

.modalBackdrop {
  position: fixed;

  inset: 0;

  z-index: 9999;

  background: rgba(0, 0, 0, 0.75);

  backdrop-filter: blur(10px);

  display: flex;

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

  padding: 1rem;
}

/* ==========================================
   MODAL
========================================== */

.modalContent {
  position: relative;

  width: 100%;

  max-width: 560px;

  max-height: 90vh;

  overflow-y: auto;

  background: linear-gradient(
    180deg,
    #1a1a1a,
    #101010
  );

  border-radius: 20px;

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

  padding: 2rem;

  animation: modalIn 0.25s ease;

  h2 {
    color: #fff;

    font-size: 1.2rem;

    margin-bottom: 0.65rem;
  }

  p {
    color: rgba(
      255,
      255,
      255,
      0.7
    );

    font-size: 0.85rem;

    line-height: 1.7;
    opacity: .8;
    font-weight: 400;

    margin-bottom: 1.25rem;
  }

  textarea {
    width: 100%;
    font-size: .9rem;
    min-height: 120px;

    resize: none;

    outline: none;

    border-radius: 12px;

    padding: 1rem;

    color: #fff;

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

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

    &:focus {
      border-color: rgba(
        247,
        147,
        24,
        0.25
      );
    }
  }
}

/* ==========================================
   CLOSE BUTTON
========================================== */

.closeBtn {
  position: absolute;

  top: 1rem;
  right: 1rem;

  width: 36px;
  height: 36px;

  border-radius: 50%;

  display: flex;

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

  cursor: pointer;

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

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

  transition: all 0.2s ease;

  &:hover {
    background: rgba(
      239,
      68,
      68,
      0.15
    );

    color: #ef4444;
  }
}

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

.confirmBtn,
.rejectBtn {
  width: 100%;

  height: 50px;

  border: none;

  border-radius: 12px;

  margin-top: 1rem;

  font-weight: 500;
  font-size: .9rem;

  cursor: pointer;

  transition: all 0.2s ease;

  &:disabled {
    opacity: 0.5;

    cursor: not-allowed;
  }
}

.confirmBtn {
  background: #22c55e;

  color: #fff;

  &:hover {
    background: #16a34a;
  }
}

.rejectBtn {
  background: #ef4444;

  color: #fff;

  &:hover {
    background: #dc2626;
  }
}

/* ==========================================
   PREVIEW MODAL
========================================== */

.previewModal {
  width: 100%;

  max-width: 1100px;

  padding: 1rem;

  iframe,
  img {
    width: 100%;

    height: 80vh;

    border: none;

    border-radius: 12px;

    object-fit: contain;

    background: #000;
  }
}

/* ==========================================
   ANIMATION
========================================== */

@keyframes modalIn {
  from {
    opacity: 0;

    transform: translateY(12px)
      scale(0.96);
  }

  to {
    opacity: 1;

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