/* Dialog 弹窗组件样式 */

/* 遮罩层 */
.dialog-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  /* z-index 由 JS 动态设置 */
  opacity: 0;
  transition: opacity 0.3s ease;
}

.dialog-overlay-show {
  opacity: 1;
}

/* 弹窗容器 */
.dialog-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  /* z-index 由 JS 动态设置 */
  display: flex;
  flex-direction: column;
  max-height: 90vh;
  max-width: 90vw;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  /* padding: 0 10px; */
}

.dialog-show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* 头部 */
.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  border-bottom: 1px solid #ededed;
  flex-shrink: 0;
  gap: 8px;
}

.dialog-title {
  margin: 0;
  font-size: 15px;
  font-weight: bold;
  color: #333;
  line-height: 20px;
  flex-shrink: 0;
}

/* 头部插槽 */
.dialog-header-slot {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.dialog-header-title-slot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.dialog-header-actions-slot {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
}

.dialog-header-logo {
  height: 20px;
  margin-left: auto;
}

.dialog-header-logo img {
  display: block;
  height: 100%;
  width: auto;
}

.dialog-close {
  cursor: pointer;
  font-size: 20px;
  color: #999;
  transition: color 0.2s;
  flex-shrink: 0;
}

.dialog-close:hover {
  color: #666;
}

/* 内容区 */
.dialog-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 10px;
}

.dialog-content {
  min-height: 60px;
}

/* 底部 */
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 10px;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

/* 底部插槽 */
.dialog-footer-slot {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
}

.dialog-footer-actions-slot {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dialog-footer-button-slot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.dialog-footer-buttons {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.dialog-btn {
  padding: 7px 17px;
  border: none;
  border-radius: 4px;
  line-height: 1;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}

.dialog-btn-cancel {
  background: #fff;
  color: #666;
  border: 1px solid #d9d9d9;
}

.dialog-btn-cancel:hover {
  color: var(--color-primary-product, #1890ff);
  border-color: var(--color-primary-product, #1890ff);
}

.dialog-btn-ok {
  background: var(--color-primary-product, #1890ff);
  color: #fff;
}

.dialog-btn-ok:hover {
  opacity: 0.85;
}

.dialog-btn:active {
  transform: scale(0.98);
}
