/* AmountSummary 组件样式 */
.amount-summary-container {
  min-height: 120px; // 改为最小高度，并增加高度以提供更好的视觉空间
  height: auto; // 允许高度自适应内容
  background: linear-gradient(135deg, #5d3f9f 0%, #5d3f9f 100%);
  border-radius: 12px 12px 0 0;
  padding: 16px; // 增加内边距，提供更好的视觉空间
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  box-sizing: border-box;
}
.payment-details {
  width: 100%;
  .payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
  }

  .payment-detail-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
  }

  .payment-detail-amount {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
  }
  .more-section {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .more-text {
    font-size: 14px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 6px;
    color: #c3b2e7;
    cursor: pointer;
    line-height: 1.2;
  }

  .more-icon {
    width: 18px;
    height: 18px;
  }
}
.amount-summary-module {
  /* 左侧按钮区域 */
  .left-section {
    display: flex;
    align-items: center;
    gap: 16px;
  }

  .payment-button {
    border-radius: 16px;
    color: white;
    height: 64px;
    padding: 8px;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 128px;
    line-height: 1.5;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
  }

  .payment-button-with-dropdown {
    border-radius: 16px;
    color: white;
    height: 64px;
    padding: 8px;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 128px;
    line-height: 1.5;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
    border: 1px solid #c3b2e7;
    flex-direction: row;
    gap: 8px;
  }

  .payment-button-without-dropdown {
    border-radius: 16px;
    color: white;
    height: 64px;
    padding: 8px;
    font-size: 16px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 128px;
    line-height: 1.5;
    box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
    border: none;
    flex-direction: column;
    gap: 2px;
  }

  .payment-button-regular {
    background: #7f56da;
  }

  .payment-button-deposit {
    background: #dc6803;
  }

  /* 覆盖按钮的hover和active状态 */
  :global(.ant-btn).payment-button-regular:hover,
  :global(.ant-btn).payment-button-regular:focus,
  :global(.ant-btn).payment-button-regular:active,
  .payment-button-regular:hover,
  .payment-button-regular:focus,
  .payment-button-regular:active {
    background: #7f56da !important;
    border-color: #c3b2e7 !important;
    color: white !important;
    box-shadow: none !important;
  }

  :global(.ant-btn).payment-button-deposit:hover,
  :global(.ant-btn).payment-button-deposit:focus,
  :global(.ant-btn).payment-button-deposit:active,
  .payment-button-deposit:hover,
  .payment-button-deposit:focus,
  .payment-button-deposit:active {
    background: #dc6803 !important;
    border-color: #c3b2e7 !important;
    color: white !important;
    box-shadow: none !important;
  }

  .button-content {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: space-between;
  }

  .button-text {
    white-space: pre-line;
    text-align: left;
  }

  .arrow-icon {
    width: 24px;
    height: 24px;
  }

  /* 中间内容区域 */
  .middle-section {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    align-items: stretch;
  }

  .partial-paid-card {
    background-color: #079455;
    border-radius: 8px;
    padding: 2px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 2px;
    border: 1px #c3b2e7 solid;
  }

  .partial-paid-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.8;
  }

  .partial-paid-amount {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.7;
  }

  .payment-details {
    width: 100%;
  }

  .payment-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0px;
  }

  .payment-detail-label {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
  }

  .payment-detail-amount {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
  }

  /* 右侧 Balance Due 卡片 */
  .balance-due-card {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 0 16px 0 16px;
    color: #1a1a1a;
    width: 400px;
    min-width: 200px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;

    // 确认模式下的特殊样式
    &.confirm-mode {
      width: 420px;
    }
  }

  .balance-due-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
  }

  .balance-due-label {
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    margin-bottom: 4px;
  }

  .balance-due-amount {
    font-size: 14px;
    font-weight: 600;
    color: #7f56da;
    line-height: 0.75;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .pay-section {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .pay-text {
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.09375em;
    margin-top: 12px;
  }

  .pay-amount {
    font-size: 36px;
    font-weight: 600;
    color: #1e1830;
    line-height: 0.75;
  }

  .edit-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    font-size: 20px;
    margin-left: 8px;
  }

  /* 覆盖下拉菜单选项的hover和active状态 */
  :global(.ant-dropdown-menu-item):hover,
  :global(.ant-dropdown-menu-item):focus,
  :global(.ant-dropdown-menu-item):active,
  :global(.ant-dropdown-menu-item-selected) {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
  }
}

/* 数字键盘模态框样式覆盖 */
:global(.keyboard-modal-wrapper .ant-modal .ant-modal-content),
:global(.keyboard-modal-wrapper .ant-modal-content),
:global(.keyboard-modal-wrapper.ant-modal .ant-modal-content),
:global(
    :where(.css-dev-only-do-not-override-1ebpks4).ant-modal
      .ant-modal-content.keyboard-modal-wrapper
  ),
:global(
    :where(.css-dev-only-do-not-override-1ebpks4).keyboard-modal-wrapper
      .ant-modal-content
  ) {
  padding: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  border: none !important;
}

:global(.keyboard-modal-wrapper .ant-modal .ant-modal-header),
:global(.keyboard-modal-wrapper .ant-modal-header),
:global(.keyboard-modal-wrapper.ant-modal .ant-modal-header) {
  display: none !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

:global(.keyboard-modal-wrapper .ant-modal .ant-modal-body),
:global(.keyboard-modal-wrapper .ant-modal-body),
:global(.keyboard-modal-wrapper.ant-modal .ant-modal-body) {
  padding: 0 !important;
  margin: 0 !important;
}

:global(#body .pisell-number-keyboard-wrap.pisell-number-keyboard-dark) {
  padding: 10px;
  border-radius: 10px;
}

/* AmountSummary 专用的键盘 Popover 样式 */
:global(.amount-summary-keyboard-popover) {
  .ant-popover-inner {
    padding: 0 !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
    overflow: hidden;
  }

  .ant-popover-content {
    padding: 0 !important;
  }

  .ant-popover-arrow {
    display: none !important;
  }
}

/* 确认支付界面样式 */
.confirm-payment-container {
  width: 100%;
  min-height: 104px; // 改为最小高度，并适当增加
  height: auto; // 允许高度自适应
  border-radius: 12px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  padding: 12px; // 添加内边距
}

.confirm-payment-content {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.confirm-payment-text {
  width: calc(50% - 8px);
  flex: 0 0 calc(50% - 8px);
  font-size: 16px;
  font-weight: 400;
  color: white;
  line-height: 1.5;
  word-wrap: break-word;
  word-break: break-word;
  color: #101828;

  .amount-text {
    font-size: 24px;
    font-weight: 600;
    color: #4a90e2; // 标蓝色
    line-height: 1.2;
  }
}

.confirm-button {
  width: calc(50% - 8px);
  flex: 0 0 calc(50% - 8px);
  background: #7f56da !important;
  border: none !important;
  border-radius: 12px !important;
  height: 48px !important;
  padding: 12px 0 !important;
  font-size: 16px !important;
  font-weight: 600 !important;
  color: white !important;

  box-shadow: 0 2px 8px rgba(127, 86, 218, 0.3) !important;
  transition: all 0.2s ease !important;

  &:hover,
  &:focus,
  &:active {
    background: #6d48b8 !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(127, 86, 218, 0.4) !important;
    transform: translateY(-1px);
  }

  &:focus {
    box-shadow: 0 0 0 3px rgba(127, 86, 218, 0.2),
      0 4px 12px rgba(127, 86, 218, 0.4) !important;
  }
}

/* 下拉菜单样式 - 只影响AmountSummary下的dropdown */
.amount-summary-dropdown-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: #ffffff;
  font-size: 16px;

  .dropdown-icon {
    font-size: 16px;
  }
}


.amount-summary-dropdown {
  .pisell-lowcode-dropdown-menu {
    .pisell-lowcode-dropdown-menu-item:not(:last-child) {
      border-bottom: 1px solid rgba(255,255,255, 0.5);
      border-radius: unset!important;
    }
    .pisell-lowcode-dropdown-menu-item:hover {
      background: unset!important;
    }
  }
}

/* 支付详情弹窗专用样式 - 去除关闭按钮的背景色 */
.payment-detail-modal-wrapper {
  .pisell-lowcode-modal {
    .pisell-lowcode-modal-content {
      .pisell-lowcode-modal-close {
        &:hover,
        &:active,
        &:focus {
          background-color: transparent !important;
          background: transparent !important;
          color: #667085!important;
        }
      }
    }
  }
}

.split-payment-button {
  width: 80px;
  padding: 0 8px;
  background: #079455;
  color: white;
  font-size: 14px;
  border: 1px solid #C3B2E7;
  height: 80px;
  white-space: pre-line; // 让换行符(\n)生效
  text-align: left; // 确保文本居中对齐
  min-width: 68px;
}
.cancel-split-payment-button {
  width: 80px;
  padding: 0 8px;
  background: #DF5342;
  color: white;
  font-size: 14px;
  border: 1px solid #C3B2E7;
  height: 80px;
  white-space: pre-line; // 让换行符(\n)生效
  text-align: left; // 确保文本居中对齐
  min-width: 68px;
}