/* Toast Notification Styles */

.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  direction: rtl;
}

.toast {
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  min-width: 320px;
  max-width: 400px;
  animation: slideIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 0;
  transform: translateX(400px);
  position: relative;
}

.toast.show {
  animation: slideInShow 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  opacity: 1;
  transform: translateX(0);
}

.toast.show.removing {
  animation: slideOut 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes slideInShow {
  from {
    opacity: 0;
    transform: translateX(400px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(400px);
  }
}

.toast-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  position: relative;
}

.toast-icon {
  flex-shrink: 0;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.toast-message {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toast-title {
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  font-family: "Vazir", sans-serif;
}

.toast-text {
  margin: 0;
  font-size: 13px;
  font-family: "Vazir", sans-serif;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  transition: background 0.2s;
}

.toast-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.toast-action-btn {
  flex-shrink: 0;
  background: none;
  border: 1px solid currentColor;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: "Vazir", sans-serif;
  transition: all 0.2s;
  white-space: nowrap;
}

.toast-action-btn:hover {
  background: currentColor;
  color: white;
}

.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: currentColor;
  animation: progress linear forwards;
}

@keyframes progress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* Toast Type Colors */
.toast-success {
  border-right: 4px solid #10b981;
}

.toast-success .toast-icon {
  color: #10b981;
}

.toast-success .toast-title {
  color: #059669;
}

.toast-success .toast-text {
  color: #666;
}

.toast-success .toast-close {
  color: #10b981;
}

.toast-success .toast-action-btn {
  color: #10b981;
}

.toast-success .toast-progress {
  background: #10b981;
}

/* Error Toast */
.toast-error {
  border-right: 4px solid #ef4444;
}

.toast-error .toast-icon {
  color: #ef4444;
}

.toast-error .toast-title {
  color: #dc2626;
}

.toast-error .toast-text {
  color: #666;
}

.toast-error .toast-close {
  color: #ef4444;
}

.toast-error .toast-action-btn {
  color: #ef4444;
}

.toast-error .toast-progress {
  background: #ef4444;
}

/* Info Toast */
.toast-info {
  border-right: 4px solid #3b82f6;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

.toast-info .toast-title {
  color: #1d4ed8;
}

.toast-info .toast-text {
  color: #666;
}

.toast-info .toast-close {
  color: #3b82f6;
}

.toast-info .toast-action-btn {
  color: #3b82f6;
}

.toast-info .toast-progress {
  background: #3b82f6;
}

/* Warning Toast */
.toast-warning {
  border-right: 4px solid #f59e0b;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-warning .toast-title {
  color: #d97706;
}

.toast-warning .toast-text {
  color: #666;
}

.toast-warning .toast-close {
  color: #f59e0b;
}

.toast-warning .toast-action-btn {
  color: #f59e0b;
}

.toast-warning .toast-progress {
  background: #f59e0b;
}

/* Responsive */
@media (max-width: 768px) {
  .toast-container {
    right: 10px;
    left: 10px;
    top: 70px;
  }

  .toast {
    min-width: auto;
    max-width: none;
  }

  .toast-content {
    gap: 10px;
    padding: 12px;
  }

  .toast-title {
    font-size: 14px;
  }

  .toast-text {
    font-size: 12px;
  }

  .toast-icon {
    font-size: 20px;
    width: 28px;
    height: 28px;
  }
}

@media (max-width: 480px) {
  .toast-container {
    right: 8px;
    left: 8px;
  }

  .toast {
    max-width: none;
  }

  .toast-action-btn {
    padding: 4px 8px;
    font-size: 11px;
  }
}
