/**
 * Toast Notifications Component Styles
 */

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
#toastContainer {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column-reverse;
  gap: 12px;
  max-width: 400px;
  width: calc(100% - 40px);
  align-items: flex-end;
}

.toast {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background-color: var(--color-bege-delicado);
  border: 1px solid;
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
  pointer-events: none;
  min-width: 300px;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  cursor: grab;
}

.toast:active {
  cursor: grabbing;
}

.toast .toast-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  position: relative;
}

.toast.toast-show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.toast.toast-hide {
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

/* Toast de Sucesso */
.toast-success {
  border-color: #4caf50;
  background-color: #f1f8f4;
}

.toast-success .toast-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background-color: #4caf50;
  flex-shrink: 0;
}

.toast-success .toast-icon {
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.toast-success .toast-title {
  color: #2e7d32;
  font-weight: 700;
  margin: 0 0 4px 0;
  font-size: 1rem;
  line-height: 1.2;
}

.toast-success .toast-message {
  color: #2e7d32;
  font-weight: 400;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

/* Toast de Erro */
.toast-error {
  border-color: #f44336;
  background-color: #ffebee;
}

.toast-error .toast-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 50%;
  background-color: #f44336;
  flex-shrink: 0;
}

.toast-error .toast-icon {
  color: #ffffff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.toast-error .toast-title {
  color: #c62828;
  font-weight: 700;
  margin: 0 0 4px 0;
  font-size: 1rem;
  line-height: 1.2;
}

.toast-error .toast-message {
  color: #c62828;
  font-weight: 400;
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.toast-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
}

/* Barra de progresso */
.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.toast-progress-fill {
  height: 100%;
  width: 100%;
  transition: width 0.1s linear;
  background-color: currentColor;
  opacity: 0.6;
}

.toast-success .toast-progress-fill {
  background-color: #4caf50;
}

.toast-error .toast-progress-fill {
  background-color: #f44336;
}

.toast-close {
  background: transparent;
  border: none;
  color: #3c3c3b;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
  font-size: 18px;
  z-index: 1;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
}

.toast-close:hover {
  opacity: 1;
  background-color: rgba(0, 0, 0, 0.05);
}

.toast-close:focus {
  outline: 2px solid var(--color-vermelho-recife);
  outline-offset: 2px;
  border-radius: 4px;
}

@media screen and (min-width: 768px) {
  #toastContainer {
    bottom: 30px;
    right: 30px;
    max-width: 450px;
  }

  .toast .toast-wrapper {
    padding: 22px 24px;
  }

  .toast-title {
    font-size: 1.0625rem;
  }

  .toast-message {
    font-size: 1rem;
  }
}

@media screen and (min-width: 1024px) {
  #toastContainer {
    bottom: 40px;
    right: 40px;
    max-width: 500px;
  }
}

