.pisell-sale-detail-voucher {
  margin-bottom: 8px;
  width: 100%;
  display: flex;
  flex-direction: column;

  &__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0;
  }

  &__title-left {
    color: var(--base-black, #000);
    font-size: 18px;
    font-style: normal;
    font-weight: 600;
    line-height: 28px;
    display: flex;
    flex-direction: column;
  }

  &__title-right {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #7f56d9;
    cursor: pointer;
    font-size: 18px;
    font-style: normal;
    font-weight: 500;
  }

  &__title-icon {
    font-size: 20px;
    width: 24px;
    height: 24px;
    color: #7f56d9;
    display: flex;
    align-items: center;
    justify-content: center;

    &--show {
      transform: rotate(180deg);
    }
  }

  &__detail {
    width: 100%;
    transition: 0.2s;
    max-height: 0;
    display: flex;
    flex-direction: column;
    overflow: auto;

    &--show {
      max-height: unset;
    }
  }

  &__code-wrapper {
    margin-top: 6px;
    display: flex;
    width: 100%;
    padding: 8px;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    border-radius: 8px;
    border: 1px solid var(--Gray-300, #d0d5dd);
    background: #fff;
  }

  &__empty {
    margin: 12px 0;
  }

  &--desktop,
  &--tablet,
  &--pos {
    .pisell-sale-detail-voucher__code-wrapper {
      height: 50px;
    }
  }

  &__code-input {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;

    .pisell-lowcode-input-affix-wrapper,
    .pisell-lowcode-input {
      flex: 1;
      min-width: 0;
    }
  }

  &__code-label {
    color: var(--Gray-500, #667085);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 600;
    line-height: 20px;
    margin-right: 8px;
    white-space: nowrap;
  }
}

.pisell-sale-detail-voucher-container {
  .pisell-sale-detail-voucher-container__content {
    width: 100%;
  }

  &--drawer {
    .pisell-lowcode-drawer-body {
      max-height: 80dvh;
      overflow: auto;
    }
  }

  &--hidden {
    pointer-events: none;
  }
}

.pisell-sale-detail-discount-holder-modal {
  .pisell-lowcode-modal-header,
  .pisell-lowcode-drawer-header {
    border-bottom: none;
    padding-bottom: 0;
  }

  .pisell-lowcode-modal-title,
  .pisell-lowcode-drawer-title {
    display: none;
  }

  .pisell-lowcode-floating-layer-body {
    padding: 0 24px 24px !important;
  }

  &--drawer {
    .pisell-lowcode-drawer-body {
      padding-top: 16px !important;
    }

    .pisell-sale-detail-discount-holder-modal__header {
      margin-top: 0;
    }

    .pisell-sale-detail-discount-holder-modal__list-layout {
      display: block;
      min-height: 0;
    }

    .pisell-sale-detail-discount-holder-modal__pass-list {
      margin: 0 -16px 16px;
      padding: 0 16px 16px;
      border-right: 0;
      border-bottom: 1px solid #eaecf0;
    }

    .pisell-sale-detail-discount-holder-modal__pass-list-items {
      max-height: 220px;
    }

    .pisell-sale-detail-discount-holder-modal__picker-panel {
      padding: 0;
    }
  }

  &__header {
    margin-bottom: 16px;
  }

  &__list-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
    min-height: 520px;
  }

  &__pass-list {
    padding: 20px;
    border-right: 1px solid #eaecf0;
    background: #fcfcfd;
  }

  &__pass-list-title {
    margin-bottom: 12px;
    color: #101828;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
  }

  &__pass-list-items {
    display: flex;
    max-height: 600px;
    flex-direction: column;
    gap: 12px;
    overflow: auto;
  }

  &__pass-card {
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    overflow: hidden;

    &--active {
      border-color: var(--theme-color, #7f56d9);
    }

    &--pending {
      box-shadow: 0 0 0 1px rgba(247, 144, 9, 0.28);
    }
  }

  &__picker-panel {
    min-width: 0;
    padding: 24px;
  }

  &__title {
    color: #101828;
    font-size: 18px;
    font-weight: 600;
    line-height: 28px;
    margin-bottom: 8px;
  }

  &__title-pass {
    color: var(--theme-color, #7f56d9);
  }

  &__desc {
    color: #667085;
    font-size: 14px;
    line-height: 22px;
    margin-bottom: 12px;
  }

  &__badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fff6ed;
    color: #b54708;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
  }

  &__badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #f79009;
    flex-shrink: 0;
  }

  &__content {
    max-height: 360px;
    overflow: auto;
    padding: 4px 2px 8px;
  }

  &__item-wrapper {
    border: 2px solid transparent;
    border-radius: 12px;
    height: 100%;
    transition: border-color 0.2s ease;

    &--add {
      .pisell-sale-detail-discount-holder-modal__item {
        border-style: dashed;
        border-color: #d0d5dd;
        box-shadow: none;
      }
    }

    &--active {
      border-color: var(--theme-color, #7f56d9);

      .pisell-sale-detail-discount-holder-modal__item {
        border-color: transparent;
        box-shadow: none;
      }
    }
  }

  &__item {
    background-color: #fff;
    padding: 20px 12px;
    border: 1px solid #eaecf0;
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 1px 2px 0 rgba(16, 24, 40, 0.05);
    transition: background-color 0.2s ease, box-shadow 0.2s ease;

    &:hover {
      background-color: #f9fafb;
    }
  }

  &__avatar {
    display: flex;
    justify-content: center;
    align-items: center;

    .pisell-lowcode-avatar {
      background: #f2f4f7;
      color: #475467;
    }

    &--add {
      .pisell-lowcode-avatar {
        background: #f4ebff;
        color: var(--theme-color, #7f56d9);
      }

      .anticon {
        font-size: 24px;
      }
    }
  }

  &__name {
    font-size: 14px;
    color: #1b1b1b;
    word-break: break-all;
    line-height: 20px;
    font-weight: 600;
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  &__footer {
    margin-top: 20px;
  }

  &__footer-actions {
    display: flex;
    gap: 12px;
    width: 100%;

    .pisell-lowcode-btn,
    .pisell-sale-detail-discount-holder-modal__btn-cancel,
    .pisell-sale-detail-discount-holder-modal__btn-confirm {
      flex: 1;
      height: 44px;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
    }
  }

  &__btn-cancel {
    border-color: #d0d5dd;
    color: #344054;
  }

  &__btn-confirm {
    background: var(--theme-color, #7f56d9);
    border-color: var(--theme-color, #7f56d9);

    &:disabled {
      background: #e9d7fe;
      border-color: #e9d7fe;
      color: #fff;
    }
  }

  &__footer-note {
    margin-top: 12px;
    color: #98a2b3;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
  }
}

.pisell-sale-detail-discount-holder-prompt {
  display: flex;
  width: 100%;
  min-height: 72px;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
  padding: 12px 18px;
  border: 1px solid #f79009;
  border-radius: 16px;
  background: #fff8ed;
  color: #b54708;
  cursor: pointer;
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  text-align: left;

  &__icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff2dd;
    color: #f15a24;
    font-size: 24px;
    font-weight: 700;
  }

  &__text {
    min-width: 0;
    flex: 1;
  }

  &__action {
    color: #d84a10;
    white-space: nowrap;
  }
}

.pisell-sale-detail-discount-holder-modal {
  .pisell-lowcode-modal-header,
  .pisell-lowcode-drawer-header {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .pisell-lowcode-modal-title,
  .pisell-lowcode-drawer-title {
    display: none;
  }

  .pisell-lowcode-modal-body,
  .pisell-lowcode-drawer-body,
  .pisell-lowcode-floating-layer-body {
    padding: 0 !important;
  }

  &__topbar,
  &__header {
    padding: 28px 40px 20px;
    border-bottom: 1px solid #eaecf0;
  }

  &__header {
    border-bottom: 0;
  }

  &__title {
    margin: 0 0 6px;
    color: #101828;
    font-size: 30px;
    font-weight: 700;
    line-height: 38px;
  }

  &__title-count {
    color: var(--theme-color, #7f56d9);
  }

  &__desc {
    max-width: 760px;
    margin: 0 0 14px;
    color: #475467;
    font-size: 16px;
    line-height: 24px;
  }

  &__badge {
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
  }

  &__list-layout {
    grid-template-columns: 38% 62%;
    min-height: 570px;
  }

  &__pass-list {
    min-width: 0;
    padding: 24px 36px;
  }

  &__pass-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    color: #101828;
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;

    span:last-child {
      color: #98a2b3;
      font-size: 13px;
      font-weight: 500;
    }
  }

  &__pass-list-items {
    max-height: 520px;
    gap: 14px;
  }

  &__pass-card {
    border-width: 3px;
    border-radius: 12px;
  }

  &__picker-panel {
    padding: 26px 34px;
  }

  &__selected-pass {
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border: 1px solid #eaecf0;
    border-radius: 12px;
    background: #fcfcfd;
  }

  &__selected-label {
    margin-bottom: 2px;
    color: #98a2b3;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-transform: uppercase;
  }

  &__selected-name {
    color: #101828;
    font-size: 18px;
    font-weight: 700;
    line-height: 26px;
  }

  &__selected-meta {
    margin-top: 2px;
    color: #667085;
    font-size: 13px;
    line-height: 20px;
  }

  &__picker-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;

    h3 {
      margin: 0;
      color: #101828;
      font-size: 18px;
      font-weight: 700;
      line-height: 26px;
    }

    span {
      color: #98a2b3;
      font-size: 12px;
      line-height: 18px;
      text-align: right;
    }
  }

  &__holder-grid {
    max-height: 360px;
    overflow: auto;
    padding: 4px 2px 8px;
  }

  &__footer {
    display: flex;
    min-height: 106px;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 20px 40px;
    border-top: 1px solid #eaecf0;
    background: #fff;
  }

  &__btn-cancel,
  &__btn-confirm {
    height: 54px;
    border-radius: 28px;
    font-size: 16px;
    font-weight: 700;
  }

  &__btn-cancel {
    min-width: 220px;
  }

  &__btn-confirm {
    min-width: 250px;
  }

  &__footer-note {
    flex: 1;
    margin: 0;
    font-size: 13px;
  }

  &--drawer {
    .pisell-sale-detail-discount-holder-modal__list-layout {
      display: block;
      min-height: 0;
    }

    .pisell-sale-detail-discount-holder-modal__pass-list {
      margin: 0;
      padding: 16px;
      border-right: 0;
      border-bottom: 1px solid #eaecf0;
    }

    .pisell-sale-detail-discount-holder-modal__pass-list-items {
      max-height: 220px;
    }

    .pisell-sale-detail-discount-holder-modal__picker-panel {
      padding: 16px;
    }

    .pisell-sale-detail-discount-holder-modal__topbar,
    .pisell-sale-detail-discount-holder-modal__header {
      padding: 0px 16px 16px;
    }

    .pisell-sale-detail-discount-holder-modal__footer {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
      padding: 16px;
    }

    .pisell-sale-detail-discount-holder-modal__footer-note {
      grid-column: 1 / -1;
      grid-row: 2;
      order: 3;
    }

    .pisell-sale-detail-discount-holder-modal__btn-cancel,
    .pisell-sale-detail-discount-holder-modal__btn-confirm {
      min-width: 0;
    }
  }
}

.pisell-sale-detail-discount-holder-prompt {
  min-height: 56px;
  gap: 10px;
  margin: 6px 0;
  padding: 8px 12px;
  border: 1px solid #fdb022;
  border-radius: 12px;
  background: #fff9ef;
  font-size: 16px;
  line-height: 22px;

  &__icon {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    font-size: 20px;
  }

  &__action {
    color: #c4320a;

    &::after {
      content: ' ›';
    }
  }
}

.pisell-sale-detail-discount-holder-modal {
  &--single.pisell-sale-detail-discount-holder-modal--single {
    .pisell-lowcode-modal-title,
    .pisell-lowcode-drawer-title {
      display: block;
    }

    .pisell-lowcode-floating-layer-body {
      padding: 0 24px 24px !important;
    }

    .pisell-sale-detail-discount-holder-modal__header {
      margin-bottom: 16px;
      padding: 0;
      border: 0;
    }

    .pisell-sale-detail-discount-holder-modal__title {
      margin: 0 0 8px;
      color: #101828;
      font-size: 18px;
      font-weight: 600;
      line-height: 28px;
    }

    .pisell-sale-detail-discount-holder-modal__title-pass {
      color: var(--theme-color, #7f56d9);
    }

    .pisell-sale-detail-discount-holder-modal__desc {
      margin-bottom: 12px;
      font-size: 14px;
      line-height: 22px;
    }

    .pisell-sale-detail-discount-holder-modal__holder-grid {
      max-height: 360px;
      padding: 4px 2px 8px;
    }

    .pisell-sale-detail-discount-holder-modal__item {
      min-height: 132px;
      padding: 20px 12px;
    }

    .pisell-sale-detail-discount-holder-modal__footer {
      display: block;
      min-height: 0;
      margin: 20px 0 0;
      padding: 0;
      border: 0;
      background: transparent;
    }

    .pisell-sale-detail-discount-holder-modal__footer-actions {
      display: flex;
      gap: 12px;

      .pisell-sale-detail-discount-holder-modal__btn-cancel,
      .pisell-sale-detail-discount-holder-modal__btn-confirm {
        min-width: 0;
        flex: 1;
        height: 44px;
        border-radius: 8px;
      }
    }

    .pisell-sale-detail-discount-holder-modal__footer-note {
      margin-top: 12px;
      text-align: center;
    }
  }

  &__topbar {
    padding: 0 36px 16px;
  }

  &__title {
    font-size: 26px;
    line-height: 34px;
  }

  &__desc {
    margin-bottom: 10px;
  }

  &__list-layout {
    min-height: 0;
  }

  &__pass-list {
    padding: 18px 24px;
  }

  &__pass-list-items {
    max-height: 310px;
    gap: 10px;
  }

  &__pass-card {
    border-width: 2px;
    position: relative;

    .pisell-wallet-card-wrapper {
      pointer-events: none;
    }
  }

  &__pass-holder-mask {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    pointer-events: none;
    text-align: center;

    strong {
      padding: 8px 14px;
      border-radius: 8px;
      background: var(--theme-color, #7f56d9);
      font-size: 13px;
      line-height: 18px;
    }
  }

  &__picker-panel {
    padding: 20px 26px;
  }

  &__selected-pass {
    min-height: 72px;
    margin-bottom: 14px;
    padding: 12px 14px;
  }

  &__picker-heading {
    margin-bottom: 10px;
  }

  &__holder-grid {
    max-height: 250px;
  }

  &__item {
    min-height: 112px;
    padding: 14px 10px;
  }

  &__footer {
    min-height: 76px;
    padding: 12px 36px;
  }

  &__btn-cancel,
  &__btn-confirm {
    height: 44px;
  }

  &__btn-cancel {
    min-width: 180px;
  }

  &__btn-confirm {
    min-width: 210px;
  }
}
