.pisell-sale-detail-refund-modal-wrap,
.pisell-sale-detail-refund-confirm-modal-wrap {
  .pisell-lowcode-modal-content,
  .pisell-lowcode-floating-layer-content {
    overflow: hidden;
    border: 1px solid #40537c;
    border-radius: 20px;
    color: #edf2ff;
    background: #080e1d;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.72);
  }

  .pisell-lowcode-modal-header,
  .pisell-lowcode-floating-layer-header {
    margin: 0;
    padding: 18px 24px;
    border-bottom: 1px solid #2a395d !important;
    background: #0e1629;
  }

  .pisell-lowcode-modal-title,
  .pisell-lowcode-floating-layer-title {
    color: #edf2ff;
    font-size: 22px;
    font-weight: 800;
    line-height: 30px;
    text-align: center;
  }

  .pisell-lowcode-modal-close,
  .pisell-lowcode-floating-layer-close {
    color: #edf2ff;
  }

  .pisell-lowcode-modal-body,
  .pisell-lowcode-floating-layer-body {
    min-height: 0;
    overflow: hidden;
    padding: 0;
    background: #080e1d;
  }
}

.pisell-sale-detail-refund-modal-wrap {
  .pisell-lowcode-modal {
    max-width: 880px;
  }
}

.pisell-lowcode-modal-root
  .pisell-pc-modal.pisell-sale-detail-refund-modal-wrap
  .pisell-lowcode-modal-content
  .pisell-lowcode-modal-body {
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.pisell-sale-detail-refund-modal-wrap
  .pisell-lowcode-floating-layer-content
  .pisell-lowcode-floating-layer-body {
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.pisell-sale-detail-refund-modal {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  height: min(720px, calc(100vh - 128px));
  height: min(720px, calc(100dvh - 128px));
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  color: #edf2ff;
  background: #080e1d;
  box-sizing: border-box;

  &__methods {
    display: flex;
    min-height: 0;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    overflow: hidden;
    padding: 14px 12px 12px;
    border: 1px solid #263557;
    border-radius: 16px;
    background: #091122;
  }

  &__method-list {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 8px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  &__method {
    display: grid;
    align-items: center;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    min-height: 54px;
    padding: 9px 12px;
    border: 1px solid #314263;
    border-radius: 12px;
    color: #b8c4e8;
    font: inherit;
    text-align: left;
    background: #0d1527;
    cursor: pointer;

    &:hover:not(:disabled) {
      border-color: #8b5cf6;
      color: #fff;
    }

    &:disabled {
      cursor: not-allowed;
      opacity: 0.42;
    }

    &--active {
      border-color: #9b6cff;
      color: #fff;
      background: linear-gradient(135deg, #8c5ce9, #7444d6);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
    }
  }

  &__method-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
  }

  &__method-label {
    min-width: 0;
    font-size: 14px;
    font-weight: 800;
    line-height: 18px;
  }

  &__void-button.pisell-lowcode-btn {
    flex: none;
    align-self: flex-start;
    border-color: #2d3b5d;
    border-radius: 999px;
    color: #7985a3;
    background: #0b1324;
  }

  &__workspace {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
    padding: 12px;
    border: 1px solid #263557;
    border-radius: 16px;
    background: #091122;
  }

  &__workspace-scroll {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  &__workspace-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    h2 {
      margin: 0;
      color: #edf2ff;
      font-size: 20px;
      font-weight: 850;
      line-height: 28px;
    }

    > span {
      color: #9aa8ce;
      font-size: 14px;
      font-weight: 800;
    }
  }

  &__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 18px 14px;
    border: 1px solid #813cf2;
    border-radius: 16px;
    background:
      linear-gradient(135deg, rgba(119, 63, 210, 0.86), rgba(55, 34, 107, 0.96)),
      #2f1b61;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  &__summary--overview {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  &__summary-item {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
    text-align: center;

    span,
    small {
      color: #c6b9ec;
      font-size: 12px;
      font-weight: 800;
      line-height: 16px;
    }

    strong {
      max-width: 100%;
      overflow: hidden;
      color: #d9c7ff;
      font-size: 24px;
      font-weight: 900;
      line-height: 30px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  &__summary--overview &__summary-item > span {
    letter-spacing: 0.5px;
    text-transform: uppercase;
  }

  &__summary-item--warning strong {
    color: #fdb022;
  }

  &__summary-note {
    padding: 0 4px;
    color: #a9b7dc;
    font-size: 11px;
    font-weight: 700;
    line-height: 15px;
  }

  &__selection-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 12px;
    border: 1px solid #304263;
    border-radius: 12px;
    background: #0d1629;

    > div:first-child {
      display: flex;
      align-items: baseline;
      flex-wrap: wrap;
      gap: 5px 7px;
      min-width: 0;
      color: #a9b7dc;
      font-size: 13px;
      font-weight: 800;

      strong {
        color: #edf2ff;
        font-size: 20px;
        font-weight: 900;
      }
    }
  }

  &__notice {
    padding: 9px 12px;
    border: 1px solid rgba(255, 184, 77, 0.48);
    border-radius: 10px;
    color: #ffd18a;
    font-size: 13px;
    font-weight: 700;
    line-height: 18px;
    background: rgba(127, 75, 16, 0.22);
  }

  &__selection-actions {
    display: flex;
    flex: none;
    gap: 8px;

    .pisell-lowcode-btn {
      height: 38px;
      border-color: #42557d;
      border-radius: 10px;
      color: #edf2ff;
      background: #101a2e;
      font-weight: 800;
    }
  }

  &__transactions {
    display: flex;
    flex: none;
    min-height: 0;
    flex-direction: column;
    gap: 8px;
    overflow: visible;
  }

  &__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: #7f8bab;
    font-size: 14px;
    font-weight: 700;
  }

  &__transaction {
    display: grid;
    align-items: center;
    grid-template-columns: 32px minmax(0, 1fr) minmax(140px, 0.42fr);
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #6732ca;
    border-left: 4px solid #2fbd70;
    border-radius: 12px;
    color: #e8edff;
    font: inherit;
    text-align: left;
    background: #1a1238;
    cursor: pointer;

    &:not(.pisell-sale-detail-refund-modal__transaction--disabled):hover {
      border-color: #9a65ff;
    }

    &--disabled {
      cursor: default;
      opacity: 0.42;
    }

    &--read-only {
      opacity: 1;
    }

    &--selected {
      border-color: #7f3ff2;
      box-shadow: inset 0 0 0 1px rgba(150, 95, 255, 0.34);
    }

    &--partial {
      border-left-color: #40537c;
    }
  }

  &__transaction-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #7e38ef;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    font-weight: 900;
    font-family: inherit;
    background: rgba(91, 39, 178, 0.72);
    cursor: pointer;

    &:disabled {
      cursor: not-allowed;
    }
  }

  &__transaction-copy,
  &__transaction-amounts {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
  }

  &__transaction-copy {
    > strong {
      color: #edf2ff;
      font-size: 17px;
      font-weight: 850;
      line-height: 22px;
      overflow-wrap: anywhere;
    }

    > span:not(:first-child) {
      color: #aeb9db;
      font-size: 13px;
      font-weight: 700;
      line-height: 18px;
      overflow-wrap: anywhere;
    }
  }

  &__transaction-badges {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
  }

  &__transaction-status,
  &__transaction-refund-status {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 24px;
    padding: 2px 9px;
    border: 1px solid #287b57;
    border-radius: 999px;
    color: #71efad;
    font-size: 12px;
    font-weight: 900;
    line-height: 16px;
    text-transform: uppercase;
    background: rgba(15, 91, 61, 0.34);
  }

  &__transaction-refund-status {
    border-color: #d48624;
    color: #ffb84d;
    background: rgba(160, 90, 18, 0.32);
  }

  &__transaction-amounts {
    align-items: flex-end;
    color: #aeb9db;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-align: right;

    > span {
      max-width: 100%;
      overflow-wrap: anywhere;
    }

    > strong {
      color: #edf2ff;
      font-size: 22px;
      font-weight: 900;
      line-height: 28px;
    }
  }

  &__transaction-amount-edit {
    padding: 0;
    border: 0;
    color: #edf2ff;
    font: inherit;
    font-size: 22px;
    font-weight: 900;
    line-height: 28px;
    text-decoration: underline;
    text-underline-offset: 5px;
    background: transparent;
    cursor: pointer;
  }

  &__transaction-calculation {
    color: #ffb546;
    font-size: 16px;
    font-weight: 900;
  }

  &__transaction-service-charge {
    color: #aeb9db;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
  }

  &__refund-note {
    display: flex;
    flex: none;
    flex-direction: column;
    width: 100%;
    padding: 0 4px 8px;
    border-bottom: 1px solid #304263;
    color: #aeb9db;
    box-sizing: border-box;

    textarea {
      width: 100%;
      height: 44px;
      min-height: 44px;
      max-height: 44px;
      overflow-y: auto;
      padding: 8px 0;
      border: 0;
      outline: 0;
      color: #edf2ff;
      font: inherit;
      line-height: 20px;
      background: transparent;
      resize: none;
      box-sizing: border-box;

      &::placeholder {
        color: #aeb9db;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
        opacity: 1;
      }

      &:disabled {
        cursor: not-allowed;
        opacity: 0.5;
      }
    }
  }

  &__footer {
    display: flex;
    flex: none;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #304263;
    border-radius: 12px;
    background: #0d1629;

    .pisell-lowcode-btn {
      min-width: 220px;
      height: 50px;
      border: 0;
      border-radius: 10px;
      color: #fff;
      font-size: 16px;
      font-weight: 900;
      background: linear-gradient(135deg, #8d4df6, #6d23d4);

      &:disabled {
        color: rgba(255, 255, 255, 0.45);
        background: #392752;
      }
    }
  }

  &__footer-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  &__footer-summary {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    color: #aeb9db;
    font-size: 12px;
    font-weight: 800;

    strong {
      color: #fff;
      font-size: 22px;
      font-weight: 900;
    }
  }
}

.pisell-sale-detail-refund-confirm-modal-wrap {
  z-index: 1100;

  .pisell-lowcode-modal-header {
    display: none !important;
  }

  .pisell-lowcode-modal-body {
    padding: 0;
  }
}

.pisell-sale-detail-refund-confirm-modal {
  display: flex;
  align-items: center;
  flex-direction: column;
  padding: 32px 28px 26px;
  color: #edf2ff;
  text-align: center;
  background: #0c1426;

  &__warning {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 110px;
    margin-bottom: 14px;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
    color: #231306;
    font-size: 56px;
    font-weight: 950;
    line-height: 66px;
    background: #ffb020;
  }

  h2 {
    width: 100%;
    margin: 0;
    color: #f4f7ff;
    font-size: 24px;
    font-weight: 900;
    line-height: 32px;
    text-align: left;
  }

  p {
    width: 100%;
    max-width: none;
    margin: 10px 0 24px;
    color: #aeb9db;
    font-size: 14px;
    font-weight: 600;
    line-height: 21px;
    text-align: left;
  }

  &__actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
    gap: 10px;

    .pisell-lowcode-btn {
      height: 56px;
      border-color: #46597f;
      border-radius: 10px;
      color: #edf2ff;
      background: #111b30;
      font-weight: 850;
    }

    .pisell-lowcode-btn-primary {
      border-color: #46597f;
      background: #111b30;
    }
  }
}

@media (max-width: 860px) {
  .pisell-sale-detail-refund-modal {
    grid-template-columns: 190px minmax(0, 1fr);

    &__methods,
    &__workspace {
      padding: 10px;
    }

    &__method {
      grid-template-columns: 24px minmax(0, 1fr);
      min-height: 48px;
      padding: 7px 9px;
    }

    &__method-icon {
      font-size: 20px;
    }
  }
}

@media (max-width: 620px) {
  .pisell-sale-detail-refund-modal {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    height: calc(100vh - 96px);
    height: calc(100dvh - 96px);
    min-height: 0;

    &__methods {
      min-height: 0;
      padding: 10px 8px;
    }

    &__method-list {
      display: flex;
    }

    &__method {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      min-width: 0;
      min-height: 42px;
    }

    &__method-icon {
      display: none !important;
    }

    &__method-label {
      font-size: 11px;
      text-align: center;
      overflow-wrap: anywhere;
      white-space: normal;
    }

    &__workspace {
      min-height: 0;
      padding: 8px;
    }

    &__summary {
      padding: 10px 6px;
    }

    &__summary--overview {
      gap: 4px;
    }

    &__summary--overview &__summary-item > span {
      font-size: 10px;
    }

    &__summary-item strong {
      font-size: 18px;
    }

    &__selection-bar {
      align-items: stretch;
      flex-direction: column;
      gap: 8px;
    }

    &__selection-actions .pisell-lowcode-btn {
      flex: 1;
    }

    &__footer-actions {
      justify-content: space-between;

      .pisell-lowcode-btn {
        min-width: 0;
      }
    }

    &__refund-note textarea {
      height: 40px;
      min-height: 40px;
      max-height: 40px;
    }
  }

  .pisell-sale-detail-refund-confirm-modal {
    &__actions {
      grid-template-columns: 1fr;
    }
  }
}
