/* Toast */
.content-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column-reverse;
  gap: 15px;
  color: #fff;
}

.toast {
  background: #ccc;
  display: flex;
  justify-content: space-between;
  border-radius: 10px;
  animation: apertura 500ms ease-out;
  position: relative;
  overflow: hidden;
}

.toast .content-info {
  display: grid;
  grid-template-columns: 40px auto;
  align-items: center;
  gap: 15px;
  padding: 15px;
}

.toast .titulo {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 5px;
}

.toast.exito {
  background: #559c43;
}

.toast.error {
  background: #b43636;
}

.toast .btn_close {
  background: rgba(0, 0, 0, 0.1);
  border: none;
  cursor: pointer;
  padding: 0px 5px;
}
.toast .btn_close:hover {
  background: rgba(0, 0, 0, 0.3);
  transition: 0.3s ease all;
}

.toast .icono .img-btn {
  width: 20px;
  height: 20px;
}

.toast .icono .img-icon {
  background: rgba(0, 0, 0, 0.4);
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.toast .descripcion {
  word-wrap: break-word;
  overflow-wrap: break-word;
  font-size: 14px;
  max-width: 100%;
}

@keyframes apertura {
  from {
    transform: translateY(100px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.toast.cerrando {
  animation: cierre 1s ease-out forwards;
}

@keyframes cierre {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(100% + 20px));
  }
}

.toast.auto_close::after {
  content: "";
  width: 100%;
  height: 4px;
  background: rgba(0, 0, 0, 0.5);
  position: absolute;
  bottom: 0;
  animation: progressBar 2s ease-out forwards;
}

@keyframes progressBar {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* *Vista del Toast para celular */
@media (max-width: 599px) {
  .content-toast {
    position: fixed;
    top: 15px;
    right: 50%;
    transform: translateX(50%);
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    color: #fff;
  }

  .toast {
    background: #ccc;
    display: flex;
    justify-content: space-between;
    border-radius: 5px;
    animation: apertura 500ms ease-in-out;
    position: relative;
    overflow: hidden;
  }

  .toast .content-info {
    display: grid;
    grid-template-columns: 40px auto;
    align-items: center;
    gap: 15px;
    padding: 15px;
  }

  .toast .titulo {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
  }

  .toast .descripcion {
    font-size: 14px;
  }

  @keyframes cierre {
    from {
      transform: translateX(0);
    }
    to {
      transform: translateX(calc(100% + 50%));
    }
  }

  .content-toast {
    pointer-events: none;
  }

  .toast {
    pointer-events: auto;
  }
}
