/* Modern Toastr Styling - Enhanced Visual Design */

/* Base Toast Container */
#toast-container {
  position: fixed;
  z-index: 999999;
  pointer-events: none;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

#toast-container * {
  box-sizing: border-box;
}

/* Modern Toast Base */
#toast-container > div {
  position: relative;
  pointer-events: auto;
  overflow: hidden;
  margin: 0 0 16px;
  padding: 24px 24px 24px 80px;
  width: 400px;
  border-radius: 16px;
  color: #FFFFFF;
  opacity: 1;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Effects */
#toast-container > div:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success Toast - Solid Green */
.toast-success {
  background: #4CAF50 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E") !important;
  background-position: 24px center !important;
  background-repeat: no-repeat !important;
  background-size: 28px 28px !important;
  color: #FFFFFF !important;
  border-left: 5px solid #2E7D32 !important;
  box-shadow: 0 10px 25px -5px rgba(76, 175, 80, 0.3), 0 8px 10px -6px rgba(76, 175, 80, 0.2) !important;
}

/* Error Toast - Solid Red */
.toast-error {
  background: #F44336 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E") !important;
  background-position: 24px center !important;
  background-repeat: no-repeat !important;
  background-size: 28px 28px !important;
  color: #FFFFFF !important;
  border-left: 5px solid #B71C1C !important;
  box-shadow: 0 10px 25px -5px rgba(244, 67, 54, 0.3), 0 8px 10px -6px rgba(244, 67, 54, 0.2) !important;
}

/* Warning Toast - Solid Orange */
.toast-warning {
  background: #FF9800 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z'/%3E%3C/svg%3E") !important;
  background-position: 24px center !important;
  background-repeat: no-repeat !important;
  background-size: 28px 28px !important;
  color: #FFFFFF !important;
  border-left: 5px solid #E65100 !important;
  box-shadow: 0 10px 25px -5px rgba(255, 152, 0, 0.3), 0 8px 10px -6px rgba(255, 152, 0, 0.2) !important;
}

/* Info Toast - Solid Blue */
.toast-info {
  background: #2196F3 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E") !important;
  background-position: 24px center !important;
  background-repeat: no-repeat !important;
  background-size: 28px 28px !important;
  color: #FFFFFF !important;
  border-left: 5px solid #0D47A1 !important;
  box-shadow: 0 10px 25px -5px rgba(33, 150, 243, 0.3), 0 8px 10px -6px rgba(33, 150, 243, 0.2) !important;
}

/* Typography Enhancements */
.toast-title {
  font-weight: 700 !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
  margin-bottom: 6px !important;
  color: #FFFFFF !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.toast-message {
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #FFFFFF !important;
  word-wrap: break-word !important;
  margin: 0 !important;
  font-weight: 400 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

.toast-message a,
.toast-message label {
  color: #FFFFFF !important;
  text-decoration: underline !important;
  text-underline-offset: 2px !important;
  font-weight: 500 !important;
}

.toast-message a:hover {
  color: #E5E7EB !important;
  text-decoration: none !important;
}

/* Enhanced Close Button */
.toast-close-button {
  position: absolute !important;
  right: 16px !important;
  top: 16px !important;
  width: 28px !important;
  height: 28px !important;
  border-radius: 50% !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  color: #FFFFFF !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(10px) !important;
}

.toast-close-button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #FFFFFF !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.toast-close-button:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important;
}

/* Progress Bar Enhancement */
.toast-progress {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 4px !important;
  background: rgba(255, 255, 255, 0.2) !important;
  border-radius: 0 0 16px 16px !important;
  overflow: hidden !important;
  width: 100% !important;
}

.toast-progress::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  width: 100% !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  animation: shimmer 2s infinite !important;
}

/* Animated Countdown Progress Bar */
.toast-progress-bar {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  height: 100% !important;
  width: 100% !important;
  background: rgba(255, 255, 255, 0.6) !important;
  border-radius: 0 0 16px 16px !important;
  transform-origin: left center !important;
  animation: countdown 5s linear forwards !important;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.3) !important;
}

@keyframes countdown {
  from {
    transform: scaleX(1);
    opacity: 1;
  }
  to {
    transform: scaleX(0);
    opacity: 0.8;
  }
}

/* Enhanced countdown with gradient effect */
.toast-progress-bar::before {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent) !important;
  animation: shimmer-countdown 1.5s ease-in-out infinite !important;
}

@keyframes shimmer-countdown {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Success Progress Bar */
.toast-success .toast-progress {
  background: #2E7D32 !important;
}

.toast-success .toast-progress-bar {
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

/* Error Progress Bar */
.toast-error .toast-progress {
  background: #B71C1C !important;
}

.toast-error .toast-progress-bar {
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

/* Warning Progress Bar */
.toast-warning .toast-progress {
  background: #E65100 !important;
}

.toast-warning .toast-progress-bar {
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

/* Info Progress Bar */
.toast-info .toast-progress {
  background: #0D47A1 !important;
}

.toast-info .toast-progress-bar {
  background: rgba(255, 255, 255, 0.8) !important;
  box-shadow: 0 0 15px rgba(255, 255, 255, 0.4) !important;
}

/* Position Classes */
.toast-top-center {
  top: 24px !important;
  right: 0 !important;
  width: 100% !important;
}

.toast-bottom-center {
  bottom: 24px !important;
  right: 0 !important;
  width: 100% !important;
}

.toast-top-full-width {
  top: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

.toast-bottom-full-width {
  bottom: 0 !important;
  right: 0 !important;
  width: 100% !important;
}

.toast-top-left {
  top: 24px !important;
  left: 24px !important;
}

.toast-top-right {
  top: 24px !important;
  right: 24px !important;
}

.toast-bottom-right {
  right: 24px !important;
  bottom: 24px !important;
}

.toast-bottom-left {
  bottom: 24px !important;
  left: 24px !important;
}

/* Center positioning adjustments */
#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
  width: 400px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
  width: 96% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* RTL Support */
.rtl #toast-container > div {
  direction: rtl !important;
  padding: 24px 80px 24px 24px !important;
  background-position: right 24px center !important;
}

.rtl .toast-close-button {
  left: 16px !important;
  right: auto !important;
}

/* Responsive Design */
@media all and (max-width: 480px) {
  #toast-container > div {
    width: 340px !important;
    padding: 20px 20px 20px 70px !important;
    margin: 12px !important;
  }
  
  .toast-title {
    font-size: 14px !important;
  }
  
  .toast-message {
    font-size: 13px !important;
  }
  
  #toast-container.toast-top-center > div,
  #toast-container.toast-bottom-center > div {
    width: 340px !important;
  }
}

@media all and (max-width: 360px) {
  #toast-container > div {
    width: 300px !important;
    padding: 18px 18px 18px 60px !important;
  }
  
  #toast-container.toast-top-center > div,
  #toast-container.toast-bottom-center > div {
    width: 300px !important;
  }
}

/* Animation for new toasts */
@keyframes slideInFromTop {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

#toast-container > div {
  animation: slideInFromTop 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}