/* Global Toast/Modal Notification System for Dream X */

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  pointer-events: none;
}

.toast {
  background: rgba(11, 10, 20, 0.95);
  color: #f8fafc;
  padding: 1rem 1.5rem;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  margin-bottom: 12px;
  min-width: 300px;
  max-width: 420px;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(420px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

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

.toast.hide {
  opacity: 0;
  transform: translateX(400px);
}

.toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.toast-message {
  font-size: 0.92rem;
  color: #e5e7eb;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: #999;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.toast-close:hover {
  color: #333;
}

/* Toast Types */
.toast.success {
  border-left: 4px solid #10b981;
}

.toast.success .toast-icon {
  color: #10b981;
}

.toast.error {
  border-left: 4px solid #ef4444;
}

.toast.error .toast-icon {
  color: #ef4444;
}

.toast.warning {
  border-left: 4px solid #f59e0b;
}

.toast.warning .toast-icon {
  color: #f59e0b;
}

.toast.info {
  border-left: 4px solid #3b82f6;
}

.toast.info .toast-icon {
  color: #3b82f6;
}

/* Modal Notification System */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 1rem;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-dialog {
  background: var(--bg-cosmic-shadow);
  border-radius: 12px;
  max-width: 500px;
  width: 100%;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-dialog {
  transform: scale(1);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255, 77, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-icon {
  font-size: 1.5rem;
}

.modal-icon.success {
  color: #10b981;
}

.modal-icon.error {
  color: #ef4444;
}

.modal-icon.warning {
  color: #f59e0b;
}

.modal-icon.info {
  color: #3b82f6;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #9ca3af;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.modal-body {
  padding: 1.5rem;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(255, 77, 255, 0.2);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.modal-btn {
  padding: 0.625rem 1.25rem;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  font-size: 0.9rem;
}

.modal-btn-primary {
  background: linear-gradient(135deg, #FF4DFF, #A53CFF);
  color: white;
}

.modal-btn-primary:hover {
  background: linear-gradient(135deg, #A53CFF, #FF4DFF);
}

.modal-btn-danger {
  background: #ef4444;
  color: white;
}

.modal-btn-danger:hover {
  background: #dc2626;
}

.modal-btn-success {
  background: #10b981;
  color: white;
}

.modal-btn-success:hover {
  background: #059669;
}

.modal-btn-secondary {
  background: #e5e7eb;
  color: #374151;
}

.modal-btn-secondary:hover {
  background: #d1d5db;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast {
    min-width: auto;
    max-width: 100%;
  }

  .modal-dialog {
    margin: 1rem;
    max-width: calc(100% - 2rem);
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 1rem;
  }

  .modal-title {
    font-size: 1.1rem;
  }

  .modal-footer {
    flex-direction: column;
  }

  .modal-btn {
    width: 100%;
  }
}

/* Loading Spinner for Modal */
.modal-loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spinner 0.6s linear infinite;
  margin-right: 8px;
}

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

/* Progress Bar */
.toast.success { background: linear-gradient(135deg, rgba(16,185,129,0.95), rgba(5,150,105,0.95)); }
.toast.error { background: linear-gradient(135deg, rgba(239,68,68,0.95), rgba(220,38,38,0.95)); }
.toast.warning { background: linear-gradient(135deg, rgba(245,158,11,0.95), rgba(234,88,12,0.95)); }
.toast.info { background: linear-gradient(135deg, rgba(99,102,241,0.95), rgba(147,51,234,0.95)); }

.toast.success .toast-icon,
.toast.error .toast-icon,
.toast.warning .toast-icon,
.toast.info .toast-icon {
  color: #fff;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}
