.modal {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

form {
  font-size: 14px;
}

/* 调整modal-content的内边距 */
.modal-content {
    background-color: #fff;
    padding: 16px 24px;
    width: 500px;
    border-radius: 4px;
    min-width: 300px;
}

.modal-content form {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    max-height: 500px;
    overflow-y: auto;
}

.modal-content label {
    margin: 10px 0 5px;
    font-size: 14px;
}

.modal-content select {
    padding: 5px;
    font-size: 14px;
    width: 200px;
}

.text-input {
    padding: 5px;
    font-size: 14px;
    width: 240px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
}

.text-input.field-error {
    border-color: #ff4d4f;
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 6px;
    border-radius: 50%;
    border: 1px solid #d9d9d9;
    color: #666;
    font-size: 12px;
    font-weight: normal;
    cursor: pointer;
}

select:disabled,
select[disabled] {
    background-color: #f5f5f5;
    color: #aaa;
    cursor: not-allowed;
}

/* modal底部按钮区域样式 */
.modal-actions {
    padding: 16px 24px;
    text-align: right;
    border-top: 1px solid #f0f0f0;
    margin: 0 -24px -16px;
}

.modal-actions button {
    height: 32px;
    line-height: 1.5715;
    padding: 4px 15px;
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0;
}

/* 确认按钮样式 */
.modal-actions .confirm-btn {
    background-color: #FFB85F;
    border: 1px solid #FFB85F;
    color: #fff;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.modal-actions .confirm-btn:hover {
    background-color: #ffc583;
    border-color: #ffc583;
}

/* 取消按钮样式 */
.modal-actions .cancel-btn {
    margin-right: 8px;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: rgba(0, 0, 0, 0.85);
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.modal-actions .cancel-btn:hover {
    color: #FFB85F;
    border-color: #FFB85F;
    background: #fff;
}

.modal-header {
    margin: 0 0 20px;
    text-align: left;
    font-size: 16px;
    padding-left: 0;
    padding: 0 16px 16px 0;
    line-height: 24px;
}

.form-group-modal-inline {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 24px;
    width: 100%;
}

.form-group-modal-inline label {
    min-width: 130px;
    margin: 0;
    text-align: left;
    font-weight: bold;
}

.form-group-modal-inline label::after {
    content: ":";
}

/* 包含多个radio选项时改为竖向排列 */
.form-group-modal-inline.multi-options {
    flex-direction: column;
    align-items: flex-start;
}

.form-group-modal-inline.multi-options label {
    margin-bottom: 8px;
}

.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0;
}

/* radio组中的选项样式 */
.radio-group > div {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.radio-group span {
    margin-left: 4px;
}

.radio-group label {
    min-width: auto;
    margin: 0;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.switch-group label {
  min-width: unset;
  margin-right: 4px;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px!important;  /* 减小宽度 */
    height: 22px; /* 减小高度 */
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px; /* 减小滑块大小 */
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #FFB85F;
}

input:disabled + .slider {
  filter: grayscale(40%);
  cursor: not-allowed;
}

input:checked + .slider:before {
  transform: translateX(18px); /* 调整滑块移动距离 */
}

.close-icon {
    position: absolute;
    top: 15px;
    right: 16px;
    cursor: pointer;
    font-size: 30px;
    color: #999;
    transition: all 0.3s;
    font-weight: 300;
    line-height: 24px;
}

.close-icon:hover {
    color: #666;
}

/* 错误提示文本样式 */
.purchase-prompt {
    color: red;
    font-size: 12px;
    margin-top: 8px;
}

/* 自定义checkbox和radio样式 */
input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
    position: relative;
    width: 16px;
    height: 16px;
    border: 1px solid #d9d9d9;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
    appearance: none;
    -webkit-appearance: none;
}

input[type="radio"] {
    border-radius: 50%;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
    border-color: #FFB85F;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    border-color: #FFB85F;
    background: #fff;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 10px;
    height: 10px;
    background-color: #FFB85F;
    border-radius: 1px;
}

input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 2px;
    width: 10px;
    height: 10px;
    background: #FFB85F;
    border-radius: 50%;
}

input[type="checkbox"]:disabled,
input[type="radio"]:disabled {
    background-color: #f5f5f5;
    border-color: #d9d9d9;
    cursor: not-allowed;
}

/* Ant Design 4 风格的仓库选择器样式 */
.warehouse-select-wrapper {
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif;
}

.warehouse-select-display {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 11px;
    color: rgba(0, 0, 0, 0.85);
    font-size: 14px;
    line-height: 1.5715;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    outline: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-sizing: border-box;
}

.warehouse-select-display:hover {
    border-color: #ffc583 !important;
}

.warehouse-select-display:focus,
.warehouse-select-display.open {
    border-color: #FFB85F !important;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 184, 95, 0.2);
}

.warehouse-select-display.open {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.warehouse-arrow {
    flex: none;
    align-self: center;
    margin-left: auto;
    color: rgba(0, 0, 0, 0.25);
    font-size: 12px;
    line-height: 1;
    text-align: center;
    text-transform: none;
    vertical-align: -0.125em;
    transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    width: 0;
    height: 0;
    margin-right: 0;
    border-style: solid;
}

.warehouse-arrow.open {
    transform: translateY(-50%) rotate(180deg) !important;
}

.warehouse-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #d9d9d9;
    border-top: none;
    animation: antSlideUp 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    transform-origin: 0 0;
}

@keyframes antSlideUp {
    0% {
        opacity: 0;
        transform-origin: 0% 0%;
        transform: scaleY(0.8);
    }
    100% {
        opacity: 1;
        transform-origin: 0% 0%;
        transform: scaleY(1);
    }
}

.warehouse-dropdown input[type="text"] {
    width: 100%;
    height: 32px;
    margin: 0;
    padding: 4px 11px;
    color: rgba(0, 0, 0, 0.85);
    font-size: 14px;
    line-height: 1.5715;
    background-color: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px 6px 0 0;
    border-bottom: 1px solid #f0f0f0;
    outline: 0;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
    box-sizing: border-box;
}

.warehouse-dropdown input[type="text"]:focus {
    border-color: #FFB85F;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 184, 95, 0.2);
}

.warehouse-dropdown input[type="text"]::placeholder {
    color: #bfbfbf;
}

.warehouse-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.warehouse-option {
    position: relative;
    display: block;
    min-height: 32px;
    padding: 5px 12px;
    color: rgba(0, 0, 0, 0.85);
    font-weight: 400;
    font-size: 14px;
    line-height: 22px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-bottom: none !important;
}

.warehouse-option:hover {
    background-color: #fff7e6 !important;
    color: #FFB85F !important;
}

.warehouse-option:last-child {
    border-bottom: none !important;
}

/* 空状态样式 */
.warehouse-dropdown .no-results {
    padding: 12px;
    text-align: center;
    color: rgba(0, 0, 0, 0.25);
    font-size: 14px;
}

/* 禁用状态样式 */
.warehouse-select-display.disabled {
    color: rgba(0, 0, 0, 0.25);
    background-color: #f5f5f5;
    border-color: #d9d9d9;
    cursor: not-allowed;
    opacity: 1;
}

.warehouse-select-display.disabled:hover {
    border-color: #d9d9d9 !important;
}
.warehouse-select-wrapper.is-disabled .warehouse-arrow {
    border-top-color: rgba(0, 0, 0, 0.15);
}

/* 聚焦态优化 */
.warehouse-select-display:focus-within {
    border-color: #FFB85F !important;
    border-right-width: 1px !important;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(255, 184, 95, 0.2);
}

/* 确保下拉列表在模态框上方 */
.warehouse-dropdown {
    z-index: 1050;
}

/* 选中状态样式 */
.warehouse-select-display span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: auto;
    opacity: 1;
}

/* 占位符样式 */
.warehouse-select-display span[style*="color: #999"] {
    color: #bfbfbf !important;
}

/* 滚动条样式 */
.warehouse-options::-webkit-scrollbar {
    width: 6px;
    background: #f0f0f0;
}

.warehouse-options::-webkit-scrollbar-thumb {
    background: #d9d9d9;
    border-radius: 3px;
}

.warehouse-options::-webkit-scrollbar-thumb:hover {
    background: #bfbfbf;
}
