/**
 * CHARAC Marketing - Custom Toast Notification System
 * Beautiful notifications matching red/pink theme
 * NO Bootstrap alerts!
 */

/* ===== TOAST CONTAINER ===== */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  pointer-events: none;
}

/* ===== TOAST BASE ===== */
.toast-notification {
  min-width: 300px;
  max-width: 400px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: start;
  gap: 1rem;
  backdrop-filter: blur(10px);
  pointer-events: all;
  animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.toast-notification::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.toast-notification:hover {
  transform: translateX(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* Close when hiding */
.toast-notification.hiding {
  animation: slideOutRight 0.4s ease forwards;
  opacity: 0;
}

/* ===== TOAST TYPES ===== */

/* Success Toast (Green) */
.toast-success {
  background: rgba(16, 185, 129, 0.95);
  color: white;
}

.toast-success::before {
  background: #10b981;
}

.toast-success .toast-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Error Toast (Red - matching theme) */
.toast-error {
  background: rgba(var(--primary-rgb), 0.95);
  color: white;
}

.toast-error::before {
  background: var(--primary-color);
}

.toast-error .toast-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Warning Toast (Orange) */
.toast-warning {
  background: rgba(245, 158, 11, 0.95);
  color: white;
}

.toast-warning::before {
  background: #f59e0b;
}

.toast-warning .toast-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* Info Toast (Red - NO BLUE!) */
.toast-info {
  background: rgba(var(--primary-rgb), 0.95);
  color: white;
}

.toast-info::before {
  background: var(--primary-color);
}

.toast-info .toast-icon {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

/* ===== TOAST ELEMENTS ===== */

.toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  min-width: 0;
}

.toast-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
}

.toast-message {
  font-size: 0.875rem;
  opacity: 0.95;
  line-height: 1.5;
}

.toast-close {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/* ===== PROGRESS BAR ===== */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.3);
  animation: progress linear;
  transform-origin: left;
}

/* ===== ANIMATIONS ===== */

@keyframes slideInRight {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

@keyframes progress {
  from {
    transform: scaleX(1);
  }
  to {
    transform: scaleX(0);
  }
}

/* ===== RESPONSIVE ===== */

@media (max-width: 480px) {
  .toast-container {
    left: 10px;
    right: 10px;
  }

  .toast-notification {
    min-width: auto;
    max-width: none;
  }
}

/* ===== LOADING TOAST ===== */

.toast-loading {
  background: rgba(var(--primary-rgb), 0.95);
  color: white;
}

.toast-loading::before {
  background: var(--primary-color);
}

.toast-loading .toast-icon {
  background: transparent;
  color: white;
}

.toast-loading .spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
