/* Vditor 编辑器样式 */
.toolbar__image-upload {
  cursor: pointer;
}

.toolbar__image-upload:hover {
  opacity: 0.8;
}

/* 上传面板样式 */
.vditor-upload-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  padding: 20px;
  min-width: 400px;
  max-width: 600px;
}

.upload-hint {
  margin: 15px 0;
  color: #666;
  line-height: 1.5;
}

.file-input-container {
  margin: 15px 0;
}

.file-hint {
  margin: 10px 0;
  color: #888;
  font-size: 0.9em;
}

.doc-path {
  margin: 10px 0;
  padding: 8px;
  background-color: #f5f5f5;
  border-radius: 4px;
  font-family: monospace;
  word-break: break-all;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.preview-item:last-child {
  border-bottom: none;
}

.preview-info {
  display: flex;
  align-items: center;
}

.preview-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 4px;
}

.preview-name {
  font-size: 14px;
  color: #333;
}

.preview-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.preview-item:last-child {
  border-bottom: none;
}

.preview-image {
  width: 40px;
  height: 40px;
  object-fit: cover;
  margin-right: 10px;
  border-radius: 4px;
}

.preview-name {
  font-size: 14px;
  color: #333;
}

.preview-area {
  margin-top: 20px;
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 4px;
  padding: 10px;
}

.button-container {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.primary-button {
  background-color: #007cba;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.primary-button:hover {
  background-color: #005a87;
}

.primary-button.disabled {
  background-color: #cccccc;
  cursor: not-allowed;
}

.secondary-button {
  background-color: #f0f0f0;
  color: #333;
  border: 1px solid #ccc;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}

.secondary-button:hover {
  background-color: #e0e0e0;
}

.upload-status {
  margin-top: 15px;
  padding: 10px;
  border-radius: 4px;
  text-align: center;
}

.upload-status.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.upload-status.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.upload-status.loading {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* 加载指示器 */
.loading-indicator {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Toast通知样式 */
.Toastify {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  min-width: 300px;
  max-width: 400px;
}

.vditor-toast {
  position: relative;
  min-height: 64px;
  box-sizing: border-box;
  margin-bottom: 10px;
  padding: 12px 16px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-height: 120px;
  overflow: hidden;
  font-family: sans-serif;
  cursor: default;
  direction: ltr;
  background: #fff;
  color: #fff;
  animation: slideInRight 0.3s ease-out;
}

.vditor-toast.fade-out {
  animation: fadeOut 0.3s ease-out;
}

.Toastify__toast--success {
  background: #07bc0c;
}

.Toastify__toast--error {
  background: #e74c3c;
}

.Toastify__toast--warning {
  background: #f1c40f;
  color: #333;
}

.Toastify__toast--info {
  background: #3498db;
}

.Toastify__toast-body {
  flex: 1;
  word-break: break-word;
}

.Toastify__close-button {
  background: transparent;
  border: none;
  color: inherit;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
  margin-left: 10px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
