.notification-outer-wrapper {
  position: fixed;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;

  // Default bottom-left position
  &.bottom-left {
    bottom: 20px;
    left: 30px;

    @media (max-width: 768px) {
      bottom: 10px;
      left: 10px;
      right: 10px;
      max-width: none;
    }
  }

  // Top-left position
  &.top-left {
    top: 20px;
    left: 30px;

    @media (max-width: 768px) {
      top: 10px;
      left: 10px;
      right: 10px;
      max-width: none;
    }
  }

  // Top-right position
  &.top-right {
    top: 20px;
    right: 30px;

    @media (max-width: 768px) {
      top: 10px;
      left: 10px;
      right: 10px;
      max-width: none;
    }
  }

  // Bottom-right position
  &.bottom-right {
    bottom: 20px;
    right: 30px;

    @media (max-width: 768px) {
      bottom: 10px;
      left: 10px;
      right: 10px;
      max-width: none;
    }
  }

  // For top positions, reverse the order so newest appears at top
  &.top-left,
  &.top-right {
    flex-direction: column-reverse;
  }

  // Animation direction based on position
  &.top-left .toast,
  &.bottom-left .toast {
    animation: slideInFromLeft 0.3s ease-out;
  }

  &.top-right .toast,
  &.bottom-right .toast {
    animation: slideInFromRight 0.3s ease-out;
  }
}

.toast {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #fff;
  margin-bottom: 8px;
  min-height: 56px;
  overflow: hidden;

  &.success {

    background-color: #E7EFE7;

    .toast-success {
      color: #10b981;

      &::before {
        content: "✓";
        font-weight: bold;
      }
    }
  }

  &.error {
    background-color: #FFE7E7;

    .toast-error {
      color: #ef4444;

      &::before {
        content: "✕";
        font-weight: bold;
      }
    }
  }

  &.warning {
    background-color: #FFF8E7;

    .toast-warn {
      color: #f59e0b;

      &::before {
        content: "⚠";
        font-weight: bold;
      }
    }
  }

  &.info {
    background-color: #E7EDFF;

    .toast-info {
      color: #3b82f6;

      &::before {
        content: "ℹ";
        font-weight: bold;
      }
    }
  }
}

.message-icon-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;

  .message {
    color: #17173A;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    word-break: break-word;
    flex: 1;
  }
}

.toast-close {
  background: none;
  border: none;
  color: #17173A;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  margin-left: 12px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;

  &:hover {
    color: #6b7280;
  }

}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  transition: width 0.1s linear;

  &.success {
    background: #00C48C;
  }

  &.error {
    background: #F05C5C;
  }

  &.warning {
    background: #D5A555;
  }

  &.info {
    background: #3E71F2;
  }
}

@keyframes slideInFromLeft {
  from {
    transform: translateX(-100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutToLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

@keyframes slideOutToRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }

  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

// High contrast mode support
@media (prefers-contrast: high) {
  .toast {
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  }
}

// Reduced motion support
@media (prefers-reduced-motion: reduce) {
  .notification-outer-wrapper .toast {
    animation: none !important;
  }

  .toast-progress {
    transition: none;
  }
}
