/**
 * OrderEZ 四级按钮 — brand / cta / secondary / ghost
 * @see OrderEZ-UI风格标准.md §三
 */

/* brand（业务主操作） */
.oe-btn-brand,
.oe-btn-primary {
  background-color: var(--oe-primary) !important;
  border-color: var(--oe-primary) !important;
  color: var(--oe-surface) !important;
  border-radius: var(--oe-radius-sm);
}

.oe-btn-brand:not(:disabled):hover,
.oe-btn-primary:not(:disabled):hover {
  background-color: var(--oe-primary-hover) !important;
  border-color: var(--oe-primary-hover) !important;
  color: var(--oe-surface) !important;
}

.oe-btn-brand:not(:disabled):active,
.oe-btn-primary:not(:disabled):active {
  background-color: var(--oe-primary-hover) !important;
  border-color: var(--oe-primary-hover) !important;
}

/* primary 反色 CTA（登录 / 强转化） */
.oe-btn-cta {
  background-color: var(--oe-cta-bg) !important;
  border-color: var(--oe-cta-bg) !important;
  color: var(--oe-cta-fg) !important;
  border-radius: var(--oe-radius-lg);
  font-weight: 500;
}

.oe-btn-cta:not(:disabled):hover {
  opacity: 0.92;
  background-color: var(--oe-cta-bg) !important;
  border-color: var(--oe-cta-bg) !important;
  color: var(--oe-cta-fg) !important;
}

/* confirm（Modal / Drawer 唯一主确认 — 黑底白字；非列表业务 clay） */
.oe-btn-confirm {
  background-color: var(--oe-text) !important;
  border-color: var(--oe-text) !important;
  color: var(--oe-surface) !important;
  border-radius: var(--oe-radius-sm);
  font-weight: 500;
}

.oe-btn-confirm:not(:disabled):hover {
  background-color: var(--oe-chrome-surface) !important;
  border-color: var(--oe-chrome-surface) !important;
  color: var(--oe-surface) !important;
}

.oe-btn-confirm:not(:disabled):active {
  background-color: var(--oe-chrome-control) !important;
  border-color: var(--oe-chrome-control) !important;
}

.ant-modal-confirm .ant-btn.oe-btn-ghost,
.ant-modal-confirm .ant-btn-default.oe-btn-ghost {
  background-color: transparent !important;
  border-color: var(--oe-border) !important;
  color: var(--oe-ghost-fg) !important;
}

.ant-modal-confirm .ant-btn.oe-btn-ghost:hover,
.ant-modal-confirm .ant-btn-default.oe-btn-ghost:hover {
  background-color: var(--oe-bg-secondary) !important;
  border-color: var(--oe-border) !important;
  color: var(--oe-text) !important;
}

.ant-modal-confirm .ant-btn.oe-btn-confirm,
.ant-modal-confirm .ant-btn-primary.oe-btn-confirm {
  border-radius: var(--oe-radius-md);
}

/* secondary */
.oe-btn-secondary {
  background-color: var(--oe-secondary-bg) !important;
  border-color: var(--oe-border) !important;
  color: var(--oe-text-secondary) !important;
  border-radius: var(--oe-radius-sm);
}

.oe-btn-secondary:not(:disabled):hover {
  background-color: var(--oe-bg-secondary) !important;
  border-color: var(--oe-border) !important;
  color: var(--oe-text) !important;
}

/* dark 区 secondary（侧栏 / 深色模块） */
.oe-admin-layout .oe-btn-secondary--dark,
.theme-dark .oe-btn-secondary {
  background-color: var(--oe-chrome-control) !important;
  border-color: var(--oe-chrome-control) !important;
  color: var(--oe-sidebar-text) !important;
}

/* ghost / tertiary */
.oe-btn-ghost {
  background-color: transparent !important;
  border-color: var(--oe-border) !important;
  color: var(--oe-ghost-fg) !important;
  border-radius: var(--oe-radius-sm);
}

.oe-btn-ghost:not(:disabled):hover {
  background-color: var(--oe-bg-secondary) !important;
  border-color: var(--oe-border) !important;
  color: var(--oe-text) !important;
}

/* 弹窗 / 配置页底栏 — 8px */
.oe-btn-brand.oe-btn--md-radius,
.oe-btn-primary.oe-btn--md-radius,
.oe-btn-secondary.oe-btn--md-radius,
.oe-btn-confirm.oe-btn--md-radius,
.oe-delete-btn.oe-btn--md-radius,
.oe-btn-ghost.oe-btn--md-radius {
  border-radius: var(--oe-radius-md);
}

/* outlined brand（描边 + 主题色文字 + 白底） */
.oe-btn-brand-outline {
  background-color: transparent !important;
  border-color: var(--oe-primary) !important;
  color: var(--oe-primary) !important;
  border-radius: var(--oe-radius-sm);
}

.oe-btn-brand-outline:not(:disabled):hover {
  background-color: var(--oe-primary) !important;
  border-color: var(--oe-primary) !important;
  color: var(--oe-surface) !important;
}

.oe-btn-brand-outline:not(:disabled):active {
  background-color: var(--oe-primary-hover) !important;
  border-color: var(--oe-primary-hover) !important;
  color: var(--oe-surface) !important;
}

/* 删除 / 下线（clay 描边，非 Ant 红） */
.oe-delete-btn {
  background-color: transparent !important;
  border-color: var(--oe-primary) !important;
  color: var(--oe-primary) !important;
  border-radius: var(--oe-radius-sm);
}

.oe-delete-btn:not(:disabled):hover,
.oe-delete-btn:not(:disabled):focus {
  background-color: var(--oe-primary) !important;
  border-color: var(--oe-primary) !important;
  color: var(--oe-surface) !important;
}
