@import '../../styles/shangjia-xym-form.wxss';

page {
  background: #f5f5f5;
}

/* 商家派单 - 布局补充 */
.balance-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: 12rpx 0 8rpx;
}

.balance-value {
  font-size: 52rpx;
  font-weight: 700;
  line-height: 1;
}

.balance-unit {
  font-size: 26rpx;
  margin-left: 6rpx;
  font-weight: 500;
}

.balance-tip {
  font-size: 20rpx;
  display: block;
}

/* 卡片 */
.card-header {
  display: flex;
  align-items: center;
  margin-bottom: 20rpx;
}

.card-dot {
  width: 8rpx;
  height: 8rpx;
  border-radius: 4rpx;
  margin-right: 12rpx;
  flex-shrink: 0;
}

.type-scroll {
  white-space: nowrap;
  display: flex;
  padding: 8rpx 0;
}

/* 表单字段 */
.field {
  margin-bottom: 24rpx;
}

.field:last-child {
  margin-bottom: 0;
}

.field-head {
  display: flex;
  align-items: center;
  margin-bottom: 10rpx;
}

.field-label {
  font-size: 26rpx;
  font-weight: 600;
  color: #333;
}

.field-required {
  font-size: 26rpx;
  color: #e04040;
  margin-left: 4rpx;
}

.field-optional {
  font-size: 20rpx;
  color: #bbb;
  margin-left: 8rpx;
}

.field-count {
  font-size: 20rpx;
  color: #ccc;
  margin-left: auto;
}

.field-input {
  width: 100%;
  height: 76rpx;
  background: #f7f7f7;
  border-radius: 12rpx;
  padding: 0 20rpx;
  font-size: 26rpx;
  color: #333;
  border: 1rpx solid #eee;
  box-sizing: border-box;
}

.field-hint {
  font-size: 20rpx;
  color: #bbb;
  margin-top: 8rpx;
  display: block;
}

/* 价格输入 */
.price-input-wrap {
  display: flex;
  align-items: center;
  background: #f7f7f7;
  border-radius: 12rpx;
  border: 1rpx solid #eee;
  overflow: hidden;
}

.price-prefix {
  font-size: 28rpx;
  font-weight: 700;
  color: #999;
  padding-left: 20rpx;
  flex-shrink: 0;
}

.price-input {
  border: none;
  background: transparent;
  flex: 1;
}

/* Picker */
.field-picker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76rpx;
  background: #f7f7f7;
  border-radius: 12rpx;
  padding: 0 20rpx;
  border: 1rpx solid #eee;
  font-size: 26rpx;
  color: #333;
}

.field-picker-ph {
  color: #bbb;
}

.field-picker-arrow {
  font-size: 24rpx;
  color: #ccc;
}

/* Switch 行 */
.switch-row {
  display: flex;
  align-items: center;
  margin-bottom: 12rpx;
}

.switch-label {
  font-size: 22rpx;
  color: #999;
  margin-left: 12rpx;
}

/* 底部留白 */
.bottom-space {
  height: 20rpx;
}

/* 提交栏 */
.submit-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  padding: 16rpx 24rpx;
  padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
  border-top: 1rpx solid #f0f0f0;
  z-index: 9999;
}

.submit-btn {
  height: 88rpx;
  background: #e04040;
  border-radius: 12rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32rpx;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2rpx;
}

.submit-btn--hover {
  opacity: 0.85;
}

.submit-btn--disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* 加载 */
.loading-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.loading-box {
  background: #fff;
  padding: 48rpx 64rpx;
  border-radius: 16rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 4rpx 20rpx rgba(0,0,0,0.08);
}

.loading-spinner {
  width: 44rpx;
  height: 44rpx;
  border: 4rpx solid #eee;
  border-top-color: #333;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16rpx;
}

.loading-text {
  font-size: 24rpx;
  color: #666;
}

/* 教程按钮 */
.tutorial-btn {
  position: fixed;
  right: 0;
  top: 20%;
  transform: translateY(-50%);
  width: 72rpx;
  height: 72rpx;
  background: #9C27B0;
  border-radius: 36rpx 0 0 36rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  transition: right 0.3s ease-out;
}

.tutorial-btn-text {
  color: #fff;
  font-size: 22rpx;
  font-weight: 600;
  writing-mode: vertical-rl;
  letter-spacing: 4rpx;
}

.tutorial-btn--hidden {
  right: -44rpx;
}

.tutorial-btn--hover {
  opacity: 0.85;
}
