/* 制作弹窗 - 一比一还原设计稿 */

.make-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  padding: 16px;
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.make-modal-overlay.is-open {
  display: flex;
}

.make-modal {
  position: relative;
  width: 100%;
  max-width: 55vw;
  background: linear-gradient(180deg, #d5e8fa 5%, #ffffff 98.57%);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  margin: auto;
  font-family:
    "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
}

/* 顶部：左侧蓝色标题条 + 右侧关闭 */

.make-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 0;
  box-sizing: border-box;
}
.header_types {
  flex: 1;
  font-size: 1rem;
  color: #000000;
  margin-left: 10px;
}
.down_load {
  display: flex;
  align-items: center;
  font-size: 1rem;
  color: #000000;
  gap: 3px;
  margin-right: 1rem;
}
.down_load img {
  width: 1.3rem;
  height: auto;
}
.make-modal-header {
  display: inline-flex;
  align-items: stretch;
  width: 60%;
  min-height: 1.8rem;
  background-image: url("../../static/image/popIcons/titlebg.png");
  background-size: 100% 100%;
  border-radius: 4px 0 0 4px;
}

.make-modal-title {
  margin: 0;
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #fff;
  word-break: break-all;
  align-self: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 90%;
}

.make-modal-header-deco {
  flex-shrink: 0;
  width: 48px;
  min-width: 48px;
  background: url("../image/popIcons/titlebg.png") center right / cover
    no-repeat;
}

.make-modal-close {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.make-modal-close img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* 表格主体 */

.make-modal-body {
  box-sizing: border-box;
  padding: 1.3rem;
  width: 93%;
  background: #fff;
  margin: 1.5rem auto;
  min-height: 30vh;
  max-height: 70vh;
  overflow-y: auto;
}

.make_file_list {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  padding: 1rem;
  background: #f1f9ff;
}

.make_file_list:nth-child(even) {
  background: #fff;
}

.make_file_list img {
  width: 2rem;
  height: auto;
}

.make_file_list .file_names {
  flex: 1;
  margin: 0 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.make_file_list .down_file {
  background: #1c77ff;
  padding: 0.8rem 0;
  border-radius: 0.4rem;
  width: 7rem;
  color: #fff;
  font-size: 1.1rem;
  text-align: center;
}

.make_file_list .has_down {
  background: #bbd6ff;
}

.make-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
  color: #333;
}

.make-grid td {
  border: 1px solid #e8e8e8;
  padding: 0;
  vertical-align: middle;
  box-sizing: border-box;
}

.make-grid .cell-label {
  width: 22%;
  padding: 10px 8px;
  text-align: right;
  color: #333;
  background: #eef6ff;
  font-weight: 600;
  line-height: 1.4;
}

.make-grid .cell-value {
  width: 28%;
  padding: 10px 12px;
  text-align: left;
  background: #fff;
  color: #333;
  font-weight: 600;
}

.make-grid .cell-value.is-highlight {
  color: #ff4d4f;
  font-weight: 700;
}

/* 份数区块：左侧竖向标签 + 右侧步进器与 k 值 */

.make-grid .cell-fen-label {
  width: 22%;
  padding: 10px 8px;
  text-align: right;
  font-weight: 600;
  vertical-align: middle;
  background: #eef6ff;
  color: #333;
  line-height: 1.5;
  writing-mode: horizontal-tb;
}

.make-grid .cell-fen-stepper {
  padding: 10px 12px;
  background: #fff;
  border-left: 1px solid #e8e8e8;
}

.make-fen-stepper-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.make-stepper {
  display: inline-flex;
  align-items: center;
  height: 32px;
}

.make-stepper-btn {
  width: 4rem;
  height: 32px;
  padding: 0;
  border: none;
  color: #000;
  background-color: transparent;
  border: unset;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
}

.make-stepper-btn:hover:not(:disabled) {
  background: #ebeef5;
}

.make-stepper-btn:disabled {
  color: #c0c4cc;
  cursor: not-allowed;
}

.make-stepper-input {
  width: 48px;
  height: 32px;
  border: none;
  border: 1px solid #cbcbcb;
  border-radius: 0.5rem;
  text-align: center;
  font-size: 14px;
  color: #333;
  outline: none;
  background: #fff;
  -moz-appearance: textfield;
}

.make-stepper-input::-webkit-outer-spin-button,
.make-stepper-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.make-fen-tip {
  font-size: 12px;
  color: #ff4d4f;
  white-space: nowrap;
}

.make-grid .cell-k-area {
  padding: 0;
  background: #fff;
  vertical-align: top;
}

.make-k-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
}

.make-k-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 10px;
  box-sizing: border-box;
  background: #fff;
}

.make-k-item:nth-child(2n) {
  border-right: none;
}

.make-k-item.is-hidden {
  display: none;
}

.make-k-label {
  flex-shrink: 0;
  width: 52px;
  font-size: 13px;
  color: #333;
  font-weight: 600;
  text-align: left;
}

.make-k-input {
  flex: 1;
  max-width: 15vw;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border: 1px solid #dcdfe6;
  border-radius: 2px;
  font-size: 13px;
  color: #333;
  background: #fff;
  box-sizing: border-box;
}

.make-k-input::placeholder {
  color: #c0c4cc;
}

.make-k-input:focus {
  border-color: #4a90e2;
  outline: none;
}

/* 备注行 */

.make-grid .cell-remark-label {
  width: 22%;
  padding: 10px 8px;
  text-align: center;
  background: #eef6ff;
  color: #333;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: middle;
}

.make-grid .cell-remark-input {
  padding: 8px 12px;
  background: #fff;
}

.make-remark-input {
  width: 100%;
  max-width: 30rem;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 2px;
  font-size: 13px;
  color: #333;
  box-sizing: border-box;
  background: #fff;
}

.make-remark-input::placeholder {
  color: #c0c4cc;
}

.make-remark-input:focus {
  border-color: #4a90e2;
  outline: none;
}

.make-modal-row-tel.is-hidden {
  display: none;
}

.make-modal-row-fen.is-hidden .cell-fen-label,
.make-modal-row-fen.is-hidden .cell-fen-stepper,
.make-modal-row-fen.is-hidden + .make-row-k.is-hidden {
  display: none;
}

.make-row-k.is-hidden {
  display: none;
}

/* 底部按钮与提示 */

.make-modal-footer {
  padding: 16px 14px 14px;
  text-align: center;
  background: #fff;
}

.make-modal-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(270deg, #4d75ef 0%, #2656e7 100%);
  box-shadow: 0px 4px 12px 0px rgba(64, 73, 100, 0.23);
  border-radius: 0.5rem;
  margin: 4rem auto 3rem;
  padding: 1rem 2.5rem;
  border: none;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.2s;
}

.make-modal-submit:hover {
  opacity: 0.92;
}

.make-modal-tips {
  margin: 12px 0 0;
  padding: 0 4px;
  font-size: 1.1rem;
  font-weight: 600;

  color: #333;
  line-height: 1.6;
  text-align: left;
  word-break: break-all;
}

/* 移动端适配 */

@media screen and (max-width: 768px) {
  .make-modal-overlay {
    padding: 10px;
    align-items: flex-start;
    padding-top: 24px;
  }

  .make-modal {
    max-width: 100%;
    border-radius: 6px;
  }

  .make-modal-top {
    padding: 10px 10px 0;
  }

  .make-modal-title {
    font-size: 14px;
    padding: 8px 10px;
  }

  .make-modal-header-deco {
    width: 36px;
    min-width: 36px;
  }

  .make-modal-body {
    padding: 10px 10px 0;
  }

  .make-grid .cell-label,
  .make-grid .cell-value,
  .make-grid .cell-fen-label,
  .make-grid .cell-remark-label {
    display: block;
    width: 100% !important;
  }

  .make-grid tr.make-info-row {
    display: block;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    margin-bottom: -1px;
  }

  .make-grid tr.make-info-row td {
    display: block;
    width: 100% !important;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    text-align: left;
  }

  .make-grid tr.make-info-row td:last-child {
    border-bottom: none;
  }

  .make-grid tr.make-row-fen-block {
    display: flex;
    flex-wrap: wrap;
  }

  .make-grid .cell-fen-label {
    width: 100% !important;
    border-bottom: 1px solid #e8e8e8;
    text-align: left;
  }

  .make-grid .cell-fen-stepper {
    width: 100% !important;
    border-left: none;
  }

  .make-k-grid {
    grid-template-columns: 1fr;
  }

  .make-k-item {
    border-right: none;
  }

  .make-grid tr.make-row-remark,
  .make-grid tr.make-modal-row-tel {
    display: block;
  }
  .make-k-input {
    max-width: 100%;
  }
  .make-modal-header {
    width: 90%;
  }
  .make-grid tr.make-row-remark td,
  .make-grid tr.make-modal-row-tel td {
    display: block;
    width: 100% !important;
    text-align: left;
  }

  .make-grid tr.make-row-k {
    display: block;
    border: 1px solid #e8e8e8;
    border-bottom: none;
    margin-bottom: -1px;
  }

  .make-grid tr.make-row-k td {
    display: block;
    width: 100% !important;
    border: none;
    border-bottom: 1px solid #e8e8e8;
    text-align: left;
  }

  .make-grid tr.make-row-k td:last-child {
    border-bottom: none;
  }

  .make-fen-stepper-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .make-modal-submit {
    max-width: 100%;
  }
}

@media screen and (max-width: 480px) {
  .make-grid {
    font-size: 13px;
  }

  .make-k-label {
    width: 46px;
    font-size: 12px;
  }
}
