.box-page {
    padding-bottom: calc(130px + env(safe-area-inset-bottom));
}

.box-page .box-header {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    min-height: 54px;
    padding: 15px;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.box-page .box-header-space {
    width: 50px;
}

.box-page .box-title {
    margin: 0 auto;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: bold;
}

.box-page .rule-link {
    min-width: 70px;
    min-height: 30px;
    color: var(--text-sub);
    font-size: 12px;
    text-align: right;
}

.box-page .rule-link i,
.box-page .form-control i {
    margin-left: 5px;
    font-size: 10px;
}

.box-page .form-group {
    display: flex;
    min-height: 58px;
    margin: 0;
    padding: 15px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid var(--border-color);
    background: #fff;
}

.box-page .form-label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 14px;
}

.box-page .form-label i {
    width: 16px;
    color: var(--text-sub);
    font-size: 16px;
    text-align: center;
}

.box-page .form-control {
    width: auto;
    height: auto;
    min-height: 30px;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    color: var(--text-sub);
    font-size: 14px;
    text-align: right;
}

.box-page .form-control:focus {
    border: 0;
    box-shadow: none;
}

.box-page .js-service-picker {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: flex-end;
}

.box-page .js-service-picker.has-value {
    color: var(--text-main);
}

.box-page .js-service-label {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.box-page .wechat-input {
    min-width: 0;
    flex: 1;
    outline: 0;
}

.box-page .wechat-input::placeholder {
    color: #ccc;
}

.box-page .radio-pills {
    display: flex;
    align-items: center;
    gap: 10px;
}

.box-page .radio-pills button {
    min-width: 44px;
    min-height: 30px;
    padding: 5px 15px;
    border-radius: 15px;
    background: #f5f5f5;
    color: var(--text-main);
    font-size: 12px;
}

.box-page .radio-pills button.active {
    background: var(--primary-color);
    color: #fff;
}

.box-page .number-picker {
    display: flex;
    min-height: 30px;
    padding: 2px 10px;
    align-items: center;
    gap: 15px;
    border-radius: 15px;
    background: #f5f5f5;
}

.box-page .number-picker button {
    display: flex;
    width: 24px;
    height: 26px;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    font-size: 12px;
}

.box-page .number-picker button:disabled {
    cursor: not-allowed;
    opacity: 0.35;
}

.box-page .note-group {
    align-items: flex-start;
    flex-direction: column;
}

.box-page textarea.box-textarea {
    width: 100%;
    min-height: 44px;
    margin-top: 10px;
    padding: 0;
    resize: none;
    border: 0;
    outline: 0;
    color: var(--text-main);
    font-family: inherit;
    font-size: 14px;
}

.box-page textarea.box-textarea::placeholder {
    color: #ccc;
}

.box-page .char-count {
    width: 100%;
    margin-top: 5px;
    color: #ccc;
    font-size: 12px;
    text-align: right;
}

.box-page .char-count b {
    font-weight: normal;
}

.box-page .toggle-switch {
    position: relative;
    width: 42px;
    height: 24px;
    flex: 0 0 42px;
    border-radius: 15px;
    background: #e5e5ea;
    transition: background-color 0.3s;
}

.box-page .toggle-switch::after {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    content: "";
    transition: transform 0.3s;
}

.box-page .toggle-switch.active {
    background: var(--primary-color);
}

.box-page .toggle-switch.active::after {
    transform: translateX(18px);
}

.box-page .payment-heading {
    min-height: 46px;
    padding-bottom: 5px;
    border-bottom: 0;
}

.box-page .payment-list {
    padding: 0 15px 20px;
    background: #fff;
}

.box-page .payment-item {
    display: flex;
    width: 100%;
    min-height: 48px;
    padding: 15px 0 0 35px;
    align-items: center;
    justify-content: space-between;
    color: var(--text-main);
    font-size: 14px;
    text-align: left;
}

.box-page .payment-item small {
    color: var(--text-sub);
    font-size: 12px;
}

.box-page .radio-btn {
    position: relative;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 1px solid #ccc;
    border-radius: 50%;
}

.box-page .radio-btn.checked {
    border-color: var(--primary-color);
}

.box-page .radio-btn.checked::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-color);
    content: "";
}

.box-page .bottom-checkout {
    position: fixed;
    right: 0;
    bottom: calc(60px + env(safe-area-inset-bottom));
    left: 0;
    z-index: 90;
    display: flex;
    width: 100%;
    max-width: 750px;
    height: 60px;
    margin: 0 auto;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    background: #fff;
}

.box-page .total-price {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: bold;
}

.box-page .total-price b {
    font-weight: bold;
}

.box-page .bottom-checkout-btn {
    min-height: 38px;
    padding: 10px 25px;
    border-radius: 20px;
    background: var(--primary-color);
    color: #fff;
    font-size: 13px;
}

.box-page .box-submit-message {
    position: fixed;
    right: 12px;
    bottom: calc(126px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 89;
    max-width: 726px;
    margin: 0 auto;
    padding: 8px 12px;
    border: 1px solid #f2d7dc;
    border-radius: 6px;
    background: #fff7f8;
    color: #9d3448;
    font-size: 12px;
    text-align: center;
}

.box-page .bottom-checkout-btn:disabled {
    opacity: 0.55;
}

.box-page.service-picker-open {
    overflow-y: hidden;
}

.box-page .service-picker-layer {
    position: fixed;
    inset: 0;
    z-index: 110;
    display: flex;
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    align-items: flex-end;
}

.box-page .service-picker-mask {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.42);
}

.box-page .service-picker-sheet {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    max-height: calc(100vh - 44px);
    max-height: calc(100dvh - 44px);
    flex-direction: column;
    border-radius: 8px 8px 0 0;
    background: #fff;
}

.box-page .service-picker-header {
    display: flex;
    min-height: 52px;
    padding: 0 15px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.box-page .service-picker-header h2 {
    font-size: 16px;
    font-weight: bold;
}

.box-page .service-picker-close {
    width: 36px;
    height: 36px;
    color: var(--text-sub);
    font-size: 18px;
}

.box-page .service-options {
    padding: 0 15px calc(8px + env(safe-area-inset-bottom));
    overflow-y: auto;
}

.box-page .service-option {
    display: flex;
    width: 100%;
    min-height: 52px;
    padding: 0 4px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    font-size: 14px;
    text-align: left;
}

.box-page .service-option:last-child {
    border-bottom: 0;
}

.box-page .service-option i {
    visibility: hidden;
    color: var(--primary-color);
    font-size: 14px;
}

.box-page .service-option.active {
    color: var(--primary-color);
    font-weight: bold;
}

.box-page .service-option.active i {
    visibility: visible;
}

@media (max-width: 359px) {
    .box-page .form-group {
        padding-right: 12px;
        padding-left: 12px;
    }

    .box-page .radio-pills {
        gap: 5px;
    }

    .box-page .radio-pills button {
        min-width: 40px;
        padding-right: 10px;
        padding-left: 10px;
    }
}
