/* =============================================
   Framework 样式
   ============================================= */

/* Dialog */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.dialog-box {
  background: var(--bg-card, #1e1e2e);
  border-radius: 12px;
  padding: 24px 28px;
  max-width: 480px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-color, #2a2a3e);
}

.dialog-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-primary, #e8e8f0);
}

.dialog-content {
  color: var(--text-secondary, #a0a0b8);
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color, #2a2a3e);
}

/* Toast */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
  width: 100%;
}

.toast {
  padding: 12px 16px;
  background: var(--bg-card, #1e1e2e);
  border: 1px solid var(--border-color, #2a2a3e);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  font-size: 0.9rem;
  color: var(--text-primary, #e8e8f0);
  animation: toastSlide 0.3s ease;
}

.toast-success {
  border-left: 4px solid #4ade80;
}
.toast-error {
  border-left: 4px solid #f87171;
}
.toast-warning {
  border-left: 4px solid #fbbf24;
}
.toast-info {
  border-left: 4px solid #60a5fa;
}

@keyframes toastSlide {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Component */
.pwv-component {
  display: block;
}

.pwv-component-hidden {
  display: none !important;
}

.pwv-component-loading {
  opacity: 0.6;
  pointer-events: none;
}

/* ProgressBar */
.progress-bar {
  width: 100%;
  height: 4px;
  background: var(--bg-hover, #2a2a3e);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent, #60a5fa);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.progress-bar-text {
  font-size: 0.8rem;
  color: var(--text-secondary, #a0a0b8);
  text-align: center;
}
