/**
 * 文件职责：标签页面基础样式。
 * 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-action {
  padding: 0;
  font-size: 13px;
  color: #1677ff;
  cursor: pointer;
  background: none;
  border: none;
}

.g-action + .g-action {
  margin-left: 12px;
}

.g-action-danger {
  color: #ef4444;
}

.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;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
}

.g-drawer-close .iconify {
  width: 16px;
  height: 16px;
}

.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;
}

.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0 16px;
  font-size: 13px;
  color: #1f1f1f;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  box-shadow: var(--g-shadow-sm);
  transition: all var(--g-transition);
}

.g-btn:hover {
  color: #1677ff;
  border-color: #1677ff;
  box-shadow: var(--g-shadow-md);
}

.g-btn-primary {
  color: #fff;
  background: #1677ff;
  border-color: #1677ff;
}

.g-btn-primary:hover {
  color: #fff;
  opacity: 0.88;
}

.g-btn:disabled {
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.g-toggle {
  position: relative;
  width: 40px;
  height: 22px;
  cursor: pointer;
  background: #d9d9d9;
  border: none;
  border-radius: 11px;
  transition: all 0.2s;
}

.g-toggle::before {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  content: '';
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgb(0 0 0 / 15%);
  transition: all 0.2s;
}

.g-toggle.on {
  background: #1677ff;
}

.g-toggle.on::before {
  transform: translateX(18px);
}

.g-toggle-label {
  font-size: 12px;
  color: #4b5563;
}
