/**
 * Wootimize Toast Notification Styles
 * Shared component for all Wootimize plugins
 *
 * @package Wootimize_Core
 * @since 2.1.0
 */

/* Toast Container */
.wootimize-toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10002;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

/* Toast Item */
.wootimize-toast {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 300px;
  max-width: 420px;
  padding: 16px 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 10px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  transform: translateX(120%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
  overflow: hidden;
}

.wootimize-toast.is-visible {
  transform: translateX(0);
  opacity: 1;
}

/* Icon */
.wootimize-toast__icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  padding: 4px;
}

.wootimize-toast__icon svg {
  width: 100%;
  height: 100%;
}

.wootimize-toast--success .wootimize-toast__icon {
  background: #e8f5e9;
  color: #2e7d32;
}

.wootimize-toast--error .wootimize-toast__icon {
  background: #ffebee;
  color: #c62828;
}

.wootimize-toast--warning .wootimize-toast__icon {
  background: #fff3e0;
  color: #ef6c00;
}

/* Message */
.wootimize-toast__message {
  flex: 1;
  font-size: 14px;
  color: #333;
  line-height: 1.4;
}

/* Close Button */
.wootimize-toast__close {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  color: #999;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
}

.wootimize-toast__close:hover {
  background: #f5f5f5;
  color: #333;
}

/* Progress Bar */
.wootimize-toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 0 0 12px 12px;
  overflow: hidden;
}

.wootimize-toast__progress-bar {
  height: 100%;
  width: 100%;
  animation: wootimize-toast-progress linear forwards;
}

@keyframes wootimize-toast-progress {
  from { width: 100%; }
  to { width: 0%; }
}

.wootimize-toast--success .wootimize-toast__progress-bar { background: #2e7d32; }
.wootimize-toast--error .wootimize-toast__progress-bar { background: #c62828; }
.wootimize-toast--warning .wootimize-toast__progress-bar { background: #ef6c00; }

/* Responsive */
@media screen and (max-width: 480px) {
  .wootimize-toast-container {
    top: auto;
    bottom: 16px;
    left: 16px;
    right: 16px;
  }

  .wootimize-toast {
    min-width: auto;
    max-width: none;
    width: 100%;
    transform: translateY(120%);
  }

  .wootimize-toast.is-visible {
    transform: translateY(0);
  }
}
