/* 验证码行共用尺寸；输入框外层不再参与表单文本基线布局。 */
.tc-code-row {
  --tc-code-height: 40px;
  display: flex;
  align-items: stretch;
  min-width: 0;
  width: 100%;
}

.tc-code-row > .el-input {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  width: 0;
  line-height: normal;
}

.tc-code-row > .el-input > .el-input__inner {
  display: block;
  height: var(--tc-code-height);
  min-height: var(--tc-code-height);
  line-height: normal;
}

.tc-code-row > .code-btn.el-button {
  flex: 0 0 auto;
  max-width: 50%;
  height: var(--tc-code-height);
  margin-top: 0;
  margin-bottom: 0;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.tc-code-row > .code-btn.el-button > span {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 750px) {
  .tc-code-row {
    --tc-code-height: clamp(40px, 10.6667vw, 44px);
  }
}

.tc-ac-dialog .tc-code-row {
  --tc-code-height: 36px;
}

/* 区号外框含上下边框，内部选择框需扣除这 2px。 */
.tc-ac-dialog .el-input-group__prepend .el-input__inner {
  min-height: 34px;
  height: 34px;
  line-height: normal;
}

/* 购物车优惠码、代金券：避免 rem 缩放和内联基线压缩操作行。 */
.tc-coupon-popover.discount-content {
  width: min(384px, calc(100vw - 48px));
  height: auto;
  min-height: 112px;
  padding: 36px 16px 20px;
  box-sizing: border-box;
}

.tc-coupon-popover .close-btn-img {
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
}

.tc-coupon-popover .tc-input-action-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.tc-input-action-row > .discount-input {
  display: flex;
  flex: 1 1 0;
  width: 0;
  min-width: 0;
  line-height: normal;
}

.tc-input-action-row > .el-select > .el-input {
  display: flex;
  width: 100%;
  min-width: 0;
}

.tc-coupon-popover .tc-input-action-row .el-input__inner {
  display: block;
  height: 40px;
  line-height: 40px;
  font-size: 14px;
}

.tc-input-action-row > .discount-btn.el-button {
  display: flex;
  flex: 0 0 auto;
  width: auto;
  min-width: 72px;
  max-width: 45%;
  height: 40px;
  margin: 0;
  padding: 0 12px;
  font-size: 14px;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* 长标题为关闭按钮预留空间。 */
.tc-ac-dialog.el-dialog .el-dialog__header {
  padding-right: 48px !important;
}

.tc-ac-dialog .el-dialog__title {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 发送中的加载图标也限制在验证码按钮内。 */
.tc-code-row > .code-btn .el-loading-spinner {
  margin-top: -10px;
}

.tc-code-row > .code-btn .el-loading-spinner .circular {
  width: 20px;
  height: 20px;
}
