/**
 * 文件职责：规格做法页面基础样式。
 * 1. 定义通用变量。
 * 2. 定义抽屉基础容器样式。
 */
:root {
  --g-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --g-shadow-sm: 0 1px 2px rgb(0 0 0 / 4%);
  --g-shadow-md: 0 4px 12px rgb(0 0 0 / 7%), 0 1px 3px rgb(0 0 0 / 4%);
}

.g-drawer-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background: rgb(0 0 0 / 45%);
  opacity: 0;
  transition: opacity 0.3s;
}

.g-drawer-mask.open {
  pointer-events: auto;
  opacity: 1;
}

.g-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: -6px 0 16px rgb(0 0 0 / 8%);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.g-drawer.open {
  transform: translateX(0);
}

.g-drawer-hd {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  height: 54px;
  padding: 0 20px;
  border-bottom: 1px solid #f0f0f0;
}

.g-drawer-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a2e;
}

.g-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
}

.g-drawer-close:hover {
  color: #333;
  background: #f5f5f5;
}

.g-drawer-bd {
  flex: 1;
  padding: 20px 24px;
  overflow-y: auto;
}

.g-drawer-ft {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
  justify-content: flex-end;
  padding: 12px 20px;
  border-top: 1px solid #f0f0f0;
}
