@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

#toast {
  display: flex;
  align-items: center;
  max-width: 400px;
  width: fit-content;
  padding: 10px 14px;
  position: fixed;
  border-radius: 5px;
  overflow: hidden;
  background: white;
  box-shadow: 0 2px 15px rgba(0,0,0,0.1);
  z-index: 999999999;
  right: 20px;
  bottom: -25px;
  opacity: 0;
  visibility: hidden;
}

#icon-wrapper{
  width: 30px;
  height: 30px;
  min-height: 30px;
  min-width: 30px;
  background: var(--secondary);
  border-radius: 5px;
  box-sizing: border-box;
  padding: 5px;
}

#icon {
  background: var(--primary);
  border-radius: 50%;
  height: 100%;
  width: 100%;
  min-width: 15px;
  min-height: 15px;
  position: relative;
}
#icon::before, #icon::after {
  position: absolute;
  content: "";
  background: var(--secondary);
  border-radius: 5px;
  top: 50%;
  left: 50%;
}

#toast-message {
  padding: 5px 20px 5px 10px;
}
#toast-message h4, #toast-message p {
  margin: 0;
  line-height: 1.2em;
}
#toast-message h4 {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: .05em;
  color: #404040;
}
#toast-message p {
  font-size: 0.8rem;
  font-weight: 300;
  letter-spacing: .05em;
  color: #606060;
}

#toast-close {
  position: relative;
  padding: 12px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  background: rgba(0,0,0,0);
  transition: background 0.2s ease-in-out;
}
#toast-close:hover {
  background: rgba(0,0,0,0.1);
}
#toast-close::before, #toast-close::after {
  position: absolute;
  content: '';
  height: 12px;
  width: 1px;
  border-radius: 5px;
  background: #606060;
  top: 50%;
  left: 50%;
  transition: background 0.2s ease-in-out;
}
#toast-close:hover::before, #toast-close:hover::after {
  background: #404040;
}
#toast-close::before {
  transform: translate(-50%, -50%) rotate(45deg);
}
#toast-close::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

@keyframes close {
  from {
    bottom: 20px;
    opacity: 1;
    visibility: visible;
  }
  to {
    bottom: -25px;
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes open {
  from {
    bottom: -25px;
    opacity: 0;
    visibility: hidden;
  }
  to {
    bottom: 20px;
    opacity: 1;
    visibility: visible;
  }
}

#timer {
  width: 0%;
  height: 4px;
  background: var(--primary);
  position: absolute;
  bottom: 0;
  left: 0;
  border-top-right-radius: 5px;
  box-shadow: 0 0 8px var(--primary);
}
.timer-animation {
  animation: countdown 5s linear forwards;
}
@keyframes countdown {
  from {
    width: 100%;
  } 
  to {
    width: 0%;
  } 
}

/* ----------------------- */
/* Success Styling         */
/* ----------------------- */
.success {
  --primary: #2DD743;
  --secondary: #E3FEE6;
}
.success #icon {
  transform: rotate(-45deg);
}
.success  #icon::before{
  width: 10px;
  height: 3px;
  transform: translate(calc(-50% + 1px), calc(-50% + 1px));
}
.success  #icon::after{
  width: 3px;
  height: 6px;
  transform: translate(calc(-50% - 3px), calc(-50% - 1px));
}

/* ----------------------- */
/* Warning Styling         */
/* ----------------------- */
.warning {
  --primary: #F29208;
  --secondary: #FFEEDF;
}
.warning  #icon::before{
  width: 3px;
  height: 3px;
  transform: translate(-50%, calc(-50% + 4px));
}
.warning  #icon::after{
  width: 3px;
  height: 7px;
  transform: translate(-50%, calc(-50% - 2px));
}

/* ----------------------- */
/* Error Styling           */
/* ----------------------- */
.error {
  --primary: #E63435;
  --secondary: #FFEAEC;
}
.error  #icon::before{
  width: 3px;
  height: 3px;
  transform: translate(-50%, calc(-50% + 4px));
}
.error  #icon::after{
  width: 3px;
  height: 7px;
  transform: translate(-50%, calc(-50% - 2px));
}

/* ----------------------- */
/* Info Styling            */
/* ----------------------- */
.info {
  --primary: #42C0F2;
  --secondary: #CFEFFC;
}
.info  #icon::before{
  width: 3px;
  height: 7px;
  transform: translate(-50%, calc(-50% + 2px));
}
.info  #icon::after{
  width: 3px;
  height: 3px;
  transform: translate(-50%, calc(-50% - 4px));
}