/* 基础样式 */
img {
  border: none;
  vertical-align: middle;
}

.hide { display: none; }
.left { float: left; }

.btn {
  cursor: pointer;
  color: #fff;
  background: linear-gradient(to bottom, #4a90e2, #4a90e2);
  border: 1px solid #417FC8;
  border-radius: 3px;
  height: 28px;
  line-height: 28px;
  padding: 0 10px;
}

/* 弹窗主体 */
.dialog {
  position: absolute;
  left: 0px;
  bottom: 0px;
  width: 35%;
  height: 55%;
  max-height: 80vh;
  background: white;
  border-radius: 3px;
  box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
  overflow: hidden;
  z-index: 1000;
  border-top: 6px solid #0068b7;
}

.dialog::-webkit-scrollbar { width: 10px; }
.dialog::-webkit-scrollbar-thumb { background: #E5E5E5; border-radius: 5px; }
.dialog::-webkit-scrollbar-track { background: #f1f1f1; }

/* 标题栏 - 可拖动 */
.dlg_top {
  height: 32px;
  background: #f3f3f3;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  cursor: move;
  user-select: none;
  position: relative;
  z-index: 2;
}

.dlg_title {
  font-size: 14px;
  font-weight: bold;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.close-icon:hover { opacity: 0.8; }

/* 内容区 */
.dlg_content {
  padding: 15px 20px;
  height: calc(100% - 32px - 35px); /* 减去头尾 */
  overflow-y: auto;
}

/* 底部（可选） */
.dlg_bottom {
  position: sticky;
  bottom: 0;
  height: 35px;
  background: #f3f3f3;
  border-top: 1px solid #eec;
  text-align: center;
  padding-top: 5px;
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

/* 缩放手柄 */
.resize-handle {
  position: absolute;
  z-index: 10;
  background: transparent;
}

#dlg_right {
  right: 0; top: 0; width: 8px; height: 100%;
  cursor: e-resize;
}

#dlg_bottom {
  left: 0; bottom: 0; width: 100%; height: 8px;
  cursor: s-resize;
}

#dlg_right_bottom {
  right: 0; bottom: 0; width: 15px; height: 15px;
  cursor: se-resize;
  background: #ccc;
  border-radius: 2px;
}

/* 最大化状态 */
.dialog.maximized {
  left: 0 !important;
  top: 0 !important;
  width: calc(100vw - 6px) !important;
  height: calc(100vh - 6px) !important;
  border-radius: 0 !important;
}