.toast-container {
  position: fixed !important;
  font-family: 'Montserrat', sans-serif;
  pointer-events: none;
  top: 25px;
  right: 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 999999 !important;
}

/* ======== TOAST BASE ======== */
.toast {
  position: relative;
  width: 320px;
  max-width: calc(100vw - 40px); /* 🔹 impede corte lateral */
  border-radius: 12px;
  background: #fff;
  padding: 16px 24px 16px 20px;
  box-shadow: 0 6px 20px -5px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  transform: translateX(120%); /* 🔹 entra de fora, mas sem corte */
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.68,-0.55,0.265,1.35), opacity 0.3s;
  pointer-events: auto;
}

.toast.active {
  transform: translateX(0);
  opacity: 1;
}

/* ======== CONTEÚDO ======== */
.toast .toast-content {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0; /* 🔹 essencial para ellipsis funcionar */
}

.toast-content .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 28px;
  font-size: 28px;
  flex-shrink: 0;
  margin-right: 10px;
}

.toast-content .message {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0; /* 🔹 fundamental pro ellipsis funcionar */
  overflow: hidden;
}

.message .text {
  font-size: 15px;
  font-weight: 400;
  color: #444;
  font-family: 'Montserrat', sans-serif !important;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message .text.text-1 {
  font-weight: 600;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message .text.text-2 {
   display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3em;
  max-height: 2.6em;
  word-break: break-word;
  white-space: normal; /* 🔹 permite múltiplas linhas */
}

/* ======== BOTÃO FECHAR ======== */
.toast .close {
  position: absolute;
  top: 8px;
  right: 10px;
  padding: 5px;
  cursor: pointer;
  opacity: 0.7;
  font-size: 14px;
  z-index: 1;
}

.toast .close:hover {
  opacity: 1;
}

/* ======== BARRA DE PROGRESSO ======== */
.toast .progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
}

.toast .progress:before {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  height: 100%;
  width: 100%;
  background-color: #4070f4;
}

.progress.active:before {
  animation: progress 5s linear forwards;
}

@keyframes progress {
  100% { right: 100%; }
}

/* ======== CORES ======== */
.toast.success .icon { color: #59bb72; }
.toast.error .icon { color: rgb(220, 53, 69); }
.toast.warning .icon { color: rgb(255, 193, 7); }
.toast.info .icon { color: #3c5e9b; }

.toast.success .progress:before { background: #59bb72; }
.toast.error .progress:before { background: rgb(220, 53, 69); }
.toast.warning .progress:before { background: rgb(255, 193, 7); }
.toast.info .progress:before { background: #3c5e9b; }

/* ======== RESPONSIVIDADE ======== */
@media (max-width: 600px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    align-items: center;
  }

  .toast {
    width: 100%;
    max-width: calc(100vw - 20px);
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    transform: translateY(-20px);
  }

  .toast.active {
    transform: translateY(0);
  }

  .toast-content .icon {
    font-size: 24px;
    min-width: 24px;
  }

  .message .text {
    font-size: 14px;
  }

  .toast .close {
    top: 6px;
    right: 10px;
    font-size: 12px;
  }

  .toast .progress {
    height: 2px;
  }
}

@media (max-width: 400px) {
  .toast {
    padding: 10px 16px;
    border-radius: 8px;
  }

  .message .text {
    font-size: 13px;
  }

  .toast-content .icon {
    font-size: 22px;
  }
}
