$prefix: "order-operation-button-list";

.#{$prefix}-container {
  display: flex;
  align-items: center;
  flex-direction: row;
  justify-content: flex-end;
  width: 100%;
  padding-top: 24rpx;

  .order-operation-button-list {
    overflow: hidden;
    align-items: center;
    flex-direction: row;
    flex-direction: row-reverse;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;

    .order-op-button {
      margin-left: 16rpx;
    }

    .order-op-btn {
      align-items: center;
      justify-content: center;
      margin-left: 24rpx;
      color: var(--color-text1-4, #111);
      border: var(--line-1, 1rpx) solid var(--color-text1-2, #999);
      border-radius: var(--std-button-corner, 32rpx);
      padding: 13rpx 33rpx;

      &:last-child {
        margin-right: 0;
        margin-left: 24rpx;
      }

      &:first-child {
        color: var(--std-color-primary, var(--color-brand-3, #ff6a00));
        border: var(--line-1, 1rpx) solid
          var(--std-color-primary, var(--color-brand-3, #ff6a00));
      }

      &.delete {
        color: var(--color-text1-4, #111);
        border: var(--line-1, 1rpx) solid var(--color-text1-2, #999);
      }
    }

    .order-op-btn-text {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
      font-size: var(--p-caption-font-size, 24rpx);
    }

    .more-wrap {
      flex: 1 0 var(--p-caption-font-size, 24rpx);
      justify-content: flex-start;
      .more-button {
        width: var(--p-caption-font-size, 24rpx);
      }
    }

    .more-button-inner {
      width: (--s-3, 24rpx);
      color: var(--color-text1-2, #999);
    }
  }

  .share-btn {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    height: 56rpx;
    margin-left: 16rpx;
    color: var(--color-text2-4, #fff);
    border-radius: var(--std-button-corner, 27rpx);
    background-color: var(--std-color-primary, var(--color-brand-3, #ff6a00));
    font-size: var(--p-caption-font-size, 24rpx);
    line-height: 56rpx;

    .icon {
      width: 30rpx;
      height: 24rpx;
      margin-right: 12rpx;
    }
  }
}

.#{$prefix}-extra-ops {
  .mt-drawer-container {
    justify-content: flex-end;
  }
}

.order-op-btn-list-reason-popup,
.e-voucher-popup {
  &.rm-popup-drawer-m {
    max-height: 958rpx;
    height: fit-content;
  }
}

.order-op-btn-list-reason-popup,
.order-op-btn-list-confirm-good-popup {
  .dialog-body {
    position: relative;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    // height: 930rpx;
    padding: 0;
    border-radius: 20rpx 20rpx 0rpx 0rpx;
    background: var(--color-white, #fff);
  }

  .dialog-body-header {
    display: flex;
    overflow: hidden;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 90rpx;
    padding: 0 20rpx;
    line-height: 90rpx;
  }

  .dialog-body {
    .dialog-body-header .title {
      text-align: center;
      color: var(--color-text1-4, #111);
      font-size: var(--p-body-2-font-size, 32rpx);
      font-weight: bold;
    }

    .dialog-body-main {
      display: flex;
      overflow-y: scroll;
      align-items: flex-start;
      flex-direction: column;
      justify-content: flex-start;
      width: 100%;
      height: 624rpx;
      box-sizing: initial;
      padding-bottom: calc(env(safe-area-inset-bottom) + 88rpx);

      .good-item-pics {
        display: flex;
        flex-direction: row;
        width: 100%;
        justify-content: center;
      }
      .confirm-good-pic {
        width: 188rpx;
        height: 188rpx;
        border-radius: var(--corner-1, 8rpx);
        margin: var(--std-padding, var(--s-2, 16rpx));
      }
    }

    .row {
      display: flex;
      overflow: hidden;
      align-items: center;
      flex-direction: row;
      justify-content: flex-start;
      box-sizing: border-box;
      width: 100%;
      height: 88rpx;
      // padding: 0 20rpx;
      border-bottom: 2rpx solid #eee;
      line-height: 88rpx;

      .value {
        // width: 630rpx;
        flex: 1;
        height: 108rpx;
        text-align: left;
        color: var(--color-text1-4, #111);
        font-size: var(--p-body-1-font-size, 28rpx);
        line-height: 88rpx;
      }

      .icon {
        width: 32rpx;
        height: 32rpx;
      }
    }

    .cancel-order-hint {
      display: flex;
      align-items: center;
      justify-content: center;
      // width: 750rpx;
      margin: 20rpx 0;
      padding: 10rpx 20rpx;
      color: var(--std-color-primary, var(--color-brand-3, #ff6a00));
      border-radius: 5rpx;
      background-color: var(--color-brand-1, #ffede8);
      font-size: var(--p-body-1-font-size, 28rpx);

      &-text {
        font-size: var(--p-body-1-font-size, 28rpx);
      }
      span {
        font-size: var(--p-body-1-font-size, 28rpx);
      }
    }
    .confirm-good-order-tip {
      color: var(--color-text1-4, #111);
      font-size: var(--p-body-1-font-size, 28rpx);
      text-align: center;
      line-height: 40rpx;
      max-width: 468rpx;
      margin: 0 auto;
      margin-top: var(--s-4, 32rpx);
    }
  }

  .cancel-order-prompt,
  .confirm-good-order-hint {
    margin: 10rpx 0 20rpx 0;
    color: #aaa;
    font-size: var(--p-caption-font-size, 24rpx);
  }

  .dialog-body .cancel-btn-container,
  .dialog-body .confirm-good-btn-container {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    overflow: hidden;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    box-sizing: content-box;
    // width: 750rpx;
    height: 100rpx;
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 2rpx solid #eee;
    background: var(--color-white, #fff);

    .btn {
      display: inline-flex;
      align-items: center;
      flex-direction: column;
      justify-content: center;
      width: 355rpx;
      height: 72rpx;
      line-height: 72rpx;
    }

    .btn-primary {
      border-radius: 0rpx 40rpx 40rpx 0rpx;
      background: var(
        --btn-primary-background,
        linear-gradient(to right, rgb(255, 118, 35), rgb(255, 80, 0)) center
          (center / cover) no-repeat
      );
      background-color: var(--color-brand-3, #ff6a00);
    }

    .btn-secondary {
      border-radius: 40rpx 0rpx 0rpx 40rpx;
      background: var(
        --btn-secondary-background,
        linear-gradient(to right, rgb(255, 200, 45), rgb(255, 147, 40)) center
          (center / cover) no-repeat
      );
    }

    .btn-text {
      color: #fff;
      font-size: var(--p-body-2-font-size, 32rpx);
    }
  }

  .dialog-body {
    &.cloud {
      .cancel-btn-container {
        margin-left: -16rpx;
        .btn {
          width: 350rpx;
          height: 80rpx;
          margin: 0 8rpx;
        }

        .btn-normal {
          border-radius: 40rpx;
          background: var(--btn-normal-background, #fff);
          border: 1rpx solid var(--color-line1-3, #e6e6e6);
          .btn-text {
            color: var(--color-text1-4, #111);
          }
        }
        .btn-primary {
          border-radius: 40rpx;
          background: var(--color-brand-3, #ff6a00);
          border: 1rpx solid var(--color-brand-3, #ff6a00);
        }

        .btn-text {
          color: var(--color-white, #fff);
          font-size: var(--p-body-2-font-size, 32rpx);
          font-weight: --p-title-font-weight;
        }
      }

      .mt-checkbox-circle--small {
        border-width: 0;
      }
      .mt-checkbox-circle--selected {
        background: #fff;
      }
      .mt-icon {
        background: #fff;
        &::before {
          color: var(--color-brand-3, #ff6a00);
        }
      }
    }
  }
}

.e-voucher-popup {
  .dialog-body {
    position: relative;
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    border-top-left-radius: 24rpx;
    border-top-right-radius: 24rpx;
    background: var(--color-white, #fff);

    .detail-pic {
      width: 750rpx;
      height: 320rpx;
      margin-bottom: 32rpx;
      border-top-left-radius: 20rpx;
      border-top-right-radius: 20rpx;
    }
  }

  .voucher-title {
    margin-bottom: 16rpx;
    color: var(--color-text1-4, #111);
    font-size: var(--p-body-1-font-size, 28rpx);
  }

  .voucher-appointment {
    margin-bottom: 16rpx;
    color: var(--color-text1-2, #999);
    font-size: var(--p-caption-font-size, 24rpx);
  }

  .barcode-canvas {
    width: 320rpx;
    height: 80rpx;
    margin-bottom: 16rpx;
  }

  .qr-code-image {
    width: 160rpx;
    height: 160rpx;
    margin-bottom: 16rpx;
  }

  .voucher-value {
    margin-bottom: 16rpx;
    color: var(--color-text1-4, #111);
    font-size: var(--p-caption-font-size, 24rpx);
  }

  .code-type-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40rpx;
    padding: 4rpx 12rpx;
    color: var(--color-text1-3, #666);
    border-radius: 24rpx;
    background-color: #eee;
    font-size: var(--p-caption-font-size, 24rpx);
    line-height: 40rpx;
  }
}
