/* 抽奖 2.0 助教弹层（对齐 live-web-operator LuckyDraw 系列组件） */
.demo-lottery-mask {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100020;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}
.demo-lottery-mask.is-open {
  display: flex;
}
#lottery-virtual-mask.demo-lottery-mask {
  z-index: 100021;
}
#lottery-drawing-mask.demo-lottery-mask {
  z-index: 100022;
}
#lottery-hint-mask.demo-lottery-mask,
#lottery-confirm-mask.demo-lottery-mask {
  z-index: 100023;
}
#lottery-ending-mask.demo-lottery-mask {
  z-index: 100024;
}
#lottery-record-mask.demo-lottery-mask {
  z-index: 100025;
}

.demo-lottery-dialog {
  width: 100%;
  max-width: 46rem;
  max-height: 92vh;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.demo-lottery-dialog--narrow {
  max-width: 31rem;
}
.demo-lottery-dialog--draw {
  max-width: 27.27rem;
}
.demo-lottery-dialog--record .demo-lottery-bd {
  padding: 0;
}

.demo-lottery-hd {
  flex-shrink: 0;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid #e1e1e1;
  font-size: 17px;
  color: #38404b;
}
.demo-lottery-hd .demo-lottery-close {
  border: none;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px;
}

.demo-lottery-bd {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 22px 14px 16px 15px;
  box-sizing: border-box;
}
.demo-lottery-bd::-webkit-scrollbar {
  width: 6px;
}
.demo-lottery-bd::-webkit-scrollbar-thumb {
  background: #999;
  border-radius: 4px;
}

.demo-lottery-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 16px;
  font-size: 12px;
}
.demo-lottery-row__label {
  width: 10rem;
  flex-shrink: 0;
  color: #333;
  line-height: 32px;
}
.demo-lottery-row__field {
  flex: 1;
  min-width: 0;
  padding-right: 3.2rem;
}

.demo-lottery-templates {
  display: flex;
  gap: 24px;
}
.demo-lottery-tpl {
  width: 100px;
  text-align: center;
  padding: 10px 6px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  background: #f9f9f9;
  cursor: pointer;
}
.demo-lottery-tpl.is-active {
  border-color: #ff842f;
  background: rgba(255, 132, 47, 0.1);
}
.demo-lottery-tpl__pic {
  width: 84px;
  height: 84px;
  margin: 0 auto;
  border-radius: 4px;
  background: #eee center / 70% no-repeat;
}
.demo-lottery-tpl__pic--default {
  background-image: linear-gradient(145deg, #ffe8e8 0%, #ffd4d4 40%, #fff 100%);
}
.demo-lottery-tpl__pic--slot {
  background-image: linear-gradient(145deg, #fff3cd 0%, #ffe08a 100%);
}
.demo-lottery-tpl__name {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.85);
}

.demo-lottery-input,
.demo-lottery-select {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
}
.demo-lottery-input-wrap {
  position: relative;
}
.demo-lottery-input-count {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: #909399;
  pointer-events: none;
}

.demo-lottery-switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #bbb;
  cursor: pointer;
  flex-shrink: 0;
}
.demo-lottery-switch::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 2px;
  left: 2px;
  transition: left 0.2s;
}
.demo-lottery-switch.is-on {
  background: #f78f17;
}
.demo-lottery-switch.is-on::after {
  left: 20px;
}

.demo-lottery-add-link {
  float: right;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #f78f17;
  cursor: pointer;
  font-size: 13px;
  margin-top: 4px;
}
.demo-lottery-add-link .demo-lottery-add-text {
  color: #333;
}

.demo-lottery-search-wrap {
  position: relative;
}
.demo-lottery-suggest {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 2px;
  max-height: 180px;
  overflow: auto;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  z-index: 2;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.demo-lottery-suggest.is-open {
  display: block;
}
.demo-lottery-suggest li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.demo-lottery-suggest li:hover {
  background: #fff7ef;
}

.demo-lottery-userbox {
  width: 100%;
  min-height: 10.55rem;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  overflow: auto;
}
.demo-lottery-userbox--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #79808b;
  font-size: 14px;
  gap: 10px;
}
.demo-lottery-userlist {
  list-style: none;
  margin: 0;
  padding: 10px;
}
.demo-lottery-userlist li {
  display: flex;
  align-items: center;
  height: 42px;
  font-size: 14px;
}
.demo-lottery-userlist .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.demo-lottery-userlist .tag {
  padding: 2px 6px;
  background: #f5e1c9;
  border-radius: 10px;
  color: #f78f17;
  font-size: 12px;
  margin-left: 6px;
}
.demo-lottery-userlist .rm {
  color: #f66275;
  cursor: pointer;
  margin-left: 8px;
}
.demo-lottery-user-count {
  text-align: right;
  padding: 4px 10px 0;
  font-size: 13px;
  color: #666;
}

.demo-lottery-ft {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 3.64rem 18px;
  border-top: 1px solid #f0f0f0;
}
.demo-lottery-ft--center {
  justify-content: center;
}
.demo-lottery-err {
  color: #f00;
  font-size: 13px;
  flex: 1;
  margin-right: 8px;
}
.demo-lottery-btn {
  padding: 9px 26px;
  border: none;
  border-radius: 2px;
  font-size: 14px;
  cursor: pointer;
}
.demo-lottery-btn--primary {
  background: #f78f17;
  color: #fff;
}
.demo-lottery-btn--ghost {
  background: #fff;
  color: #f78f17;
}
.demo-lottery-btn--gray {
  background: #ddd;
  color: #333;
}
.demo-lottery-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* 虚拟用户子窗 */
.demo-lottery-radio-row label {
  margin-right: 20px;
  cursor: pointer;
  font-size: 14px;
}
.demo-lottery-virtual-addrow {
  display: flex;
  gap: 10px;
  align-items: center;
}
.demo-lottery-virtual-addrow .demo-lottery-input {
  flex: 1;
}

/* 抽奖中 */
.demo-lottery-drawing-body {
  padding: 0 14px 10px;
}
.demo-lottery-drawing-gif {
  width: 100%;
  height: 14rem;
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 72px;
  line-height: 1;
}
.demo-lottery-drawing-ft {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 18px;
}
.demo-lottery-drawing-ft.is-center {
  justify-content: center;
}

/* 中奖记录 */
.demo-lottery-record-tip {
  height: 44px;
  line-height: 44px;
  padding: 0 14px;
  background: #fff4ea;
  color: #f78f17;
  font-size: 14px;
}
.demo-lottery-record-tip .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f78f17;
  margin-right: 10px;
  vertical-align: middle;
}
.demo-lottery-record-scroll {
  max-height: 36rem;
  overflow: auto;
  padding: 0 22px 16px;
}
.demo-lottery-record-round {
  margin-top: 22px;
  font-size: 15px;
}
.demo-lottery-record-round .t {
  text-align: center;
  margin-bottom: 12px;
}
.demo-lottery-record-table {
  border: 1px solid #ddd;
  text-align: center;
  font-size: 14px;
}
.demo-lottery-record-table .th,
.demo-lottery-record-table .tr {
  display: flex;
  min-height: 36px;
  align-items: center;
}
.demo-lottery-record-table .th {
  background: #f5f8f8;
  font-weight: 600;
}
.demo-lottery-record-table .tr:nth-child(odd) {
  background: #fafafa;
}
.demo-lottery-record-table .c1 {
  width: 55%;
  border-right: 1px solid #eee;
  padding: 0 8px;
}
.demo-lottery-record-table .user-name {
  margin-right: 6px;
}
.demo-lottery-record-table .tag {
  padding: 2px 6px;
  background: #f5e1c9;
  border-radius: 10px;
  color: #f78f17;
  font-size: 12px;
  margin-left: 4px;
}

/* 结果弹层 */
.demo-lottery-ending-title {
  text-align: center;
  font-size: 16px;
  margin-bottom: 18px;
  padding: 0 16px;
}
.demo-lottery-ending-title em {
  color: #ff412e;
  font-style: normal;
}

.demo-lottery-hint-bd,
.demo-lottery-confirm-bd {
  padding: 28px 20px;
  min-height: 80px;
  font-size: 15px;
  color: #333;
  text-align: center;
}
.demo-lottery-hint-ft,
.demo-lottery-confirm-ft {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 0 16px 20px;
}
