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

/* ==========================================
   TOAST CONTAINER
========================================== */

.toastContainer {
  position: fixed;

  top: 1.25rem;
  right: 1.25rem;

  z-index: 99999;

  display: flex;
  flex-direction: column;

  gap: 0.85rem;

  width: min(420px, calc(100vw - 2rem));

  pointer-events: none;

  @media (max-width: 768px) {
    top: 1rem;
    right: 1rem;
    left: 1rem;

    width: auto;
  }
}

/* ==========================================
   ALERT
========================================== */

.alert {
  position: relative;

  display: flex;
  align-items: flex-start;

  gap: 0.9rem;

  padding: 1rem;

  border-radius: 18px;

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

  backdrop-filter: blur(20px);

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

  overflow: hidden;

  pointer-events: auto;

  animation: slideInRight 0.35s ease;

  &::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 4px;
  }
}

/* ==========================================
   SUCCESS
========================================== */

.alert--success {
  &::before {
    background: #22c55e;
  }
}

/* ==========================================
   ERROR
========================================== */

.alert--error {
  &::before {
    background: #ef4444;
  }
}

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

.alert--success--helper,
.alert--error--helper {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 0.35rem;

  height: 36px;

  min-width: 36px;

  padding: 0 0.75rem;

  border-radius: 999px;

  font-size: 0.68rem;

  font-weight: 700;

  text-transform: uppercase;

  letter-spacing: 0.05em;

  flex-shrink: 0;

  svg {
    width: 14px;
    height: 14px;
  }
}

.alert--success--helper {
  background: rgba(
    34,
    197,
    94,
    0.12
  );

  color: #22c55e;
}

.alert--error--helper {
  background: rgba(
    239,
    68,
    68,
    0.12
  );

  color: #ef4444;
}

/* ==========================================
   MESSAGE
========================================== */

.message {
  flex: 1;

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

  font-size: 0.82rem;

  line-height: 1.7;

  padding-top: 0.15rem;
}

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

.closeBtn {
  width: 34px;
  height: 34px;

  min-width: 34px;

  border: none;

  border-radius: 10px;

  background: transparent;

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

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

  cursor: pointer;

  transition: 0.25s ease;

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

    color: #fff;
  }
}

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

@keyframes slideInRight {
  from {
    opacity: 0;

    transform:
      translateX(40px)
      scale(0.96);
  }

  to {
    opacity: 1;

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