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

.confirm {
  position: fixed;

  inset: 0;

  z-index: 99999;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 1rem;

  background: rgba(4, 4, 6, 0.82);

  backdrop-filter: blur(14px);

  animation: fadeIn 0.2s ease;
}

.confirm__card {
  position: relative;

  width: 100%;
  max-width: 430px;

  padding: 2rem;

  overflow: hidden;

  border-radius: 24px;

  background: linear-gradient(
    180deg,
    rgba(22, 22, 24, 0.98) 0%,
    rgba(15, 15, 18, 1) 100%
  );

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

  box-shadow:
    0 25px 60px
    rgba(
      0,
      0,
      0,
      0.45
    );

  animation: slideUp 0.25s ease;

  &::before {
    content: "";

    position: absolute;

    inset: 0;

    background: radial-gradient(
      circle at top right,
      rgba(
        247,
        147,
        24,
        0.06
      ),
      transparent 45%
    );

    pointer-events: none;
  }
}

.confirm__close {
  position: absolute;

  top: 1rem;
  right: 1rem;

  width: 34px;
  height: 34px;

  border: none;

  border-radius: 12px;

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

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

  display: flex;

  align-items: center;

  justify-content: center;

  cursor: pointer;

  transition: 0.25s ease;

  &:hover {
    background: rgba(
      255,
      255,
      255,
      0.08
    );

    color: #fff;
  }

  svg {
    font-size: 1rem;
  }
}

.confirm__icon {
  width: 60px;
  height: 60px;

  margin: 0 auto 1.25rem;

  border-radius: 18px;

  display: flex;

  align-items: center;

  justify-content: center;

  background: rgba(
    239,
    68,
    68,
    0.1
  );

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

  color: #ef4444;

  svg {
    font-size: 1.35rem;
  }
}

.confirm h2 {
  text-align: center;

  color: #fff;

  font-size: 1.1rem;

  font-weight: 600;

  margin-bottom: 0.8rem;
}

.confirm p {
  text-align: center;

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

  font-size: 0.82rem;

  line-height: 1.8;

  margin-bottom: 1.8rem;
}

.confirm__actions {
  display: grid;

  grid-template-columns:
    1fr 1fr;

  gap: 0.8rem;
}

.confirm__cancel,
.confirm__delete {
  height: 46px;

  border-radius: 14px;

  font-size: 0.82rem;

  font-weight: 600;

  cursor: pointer;

  transition: all 0.25s ease;
}

.confirm__cancel {
  background: rgba(
    255,
    255,
    255,
    0.04
  );

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

  color: #fff;

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

.confirm__delete {
  border: none;

  color: #fff;

  background: linear-gradient(
    135deg,
    #ef4444,
    #dc2626
  );

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

    box-shadow:
      0 15px 30px
      rgba(
        239,
        68,
        68,
        0.25
      );
  }

  &:disabled {
    opacity: 0.6;

    cursor: not-allowed;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;

    transform:
      translateY(10px)
      scale(0.98);
  }

  to {
    opacity: 1;

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

@media (max-width: 640px) {
  .confirm__card {
    max-width: 100%;

    padding: 1.5rem;
  }
}