/* Toast Messages - Diseño simple y moderno */

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast-message {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  min-width: 320px;
  max-width: 400px;
  overflow: hidden;
  transform: translateX(100%);
  opacity: 0;
  animation: slideIn 0.3s ease-out forwards;
  pointer-events: auto;
  position: relative;
}

.toast-message.show {
  transform: translateX(0);
  opacity: 1;
}

.toast-message.hide {
  animation: slideOut 0.3s ease-in forwards;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 12px;
}

.toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon-svg {
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-message-text {
  font-size: 14px;
  line-height: 1.4;
  color: #1f2937;
  font-weight: 500;
}

.toast-close {
  background: none;
  border: none;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  color: #9ca3af;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #6b7280;
}

/* Toast Types */
.toast-message[data-type="info"] {
  border-left: 4px solid #3b82f6;
}

.toast-message[data-type="info"] .toast-icon {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
}

.toast-message[data-type="info"] .toast-icon-svg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z' /%3E%3C/svg%3E");
}

.toast-message[data-type="success"] {
  border-left: 4px solid #10b981;
}

.toast-message[data-type="success"] .toast-icon {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: white;
}

.toast-message[data-type="success"] .toast-icon-svg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7' /%3E%3C/svg%3E");
}

.toast-message[data-type="warning"] {
  border-left: 4px solid #f59e0b;
}

.toast-message[data-type="warning"] .toast-icon {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: white;
}

.toast-message[data-type="warning"] .toast-icon-svg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.34 16.5c-.77.833.192 2.5 1.732 2.5z' /%3E%3C/svg%3E");
}

.toast-message[data-type="error"] {
  border-left: 4px solid #ef4444;
}

.toast-message[data-type="error"] .toast-icon {
  background: linear-gradient(135deg, #ef4444, #f87171);
  color: white;
}

.toast-message[data-type="error"] .toast-icon-svg {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 18L18 6M6 6l12 12' /%3E%3C/svg%3E");
}

/* Animations */
@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }

  .toast-message {
    min-width: auto;
    max-width: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .toast-message {
    background: rgba(31, 41, 55, 0.95);
    border-color: rgba(75, 85, 99, 0.2);
  }

  .toast-message-text {
    color: #f9fafb;
  }

  .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #e5e7eb;
  }
}
