@prefix: pisell-sale-detail-better-wallet-pass-selection-modal;

.pisell-lowcode-modal-root {
  .pisell-pc-modal.@{prefix} {
    .pisell-lowcode-modal-content {
      overflow: hidden;
      border: 1px solid #52678f;
      border-radius: 28px;
      color: #f5f7ff;
      background: #080e1f;
      box-shadow: 0 24px 72px rgba(0, 0, 0, 0.48);
    }

    .pisell-lowcode-modal-header {
      padding: 40px 40px 26px;
      border: 0;
      background: transparent;
    }

    .pisell-lowcode-modal-title {
      color: #f5f7ff;
      font-size: clamp(24px, 2vw, 36px);
      font-weight: 700;
      line-height: 1.2;
    }

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

.@{prefix} {
  &__content {
    min-width: 0;
  }

  &__comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    height: min(620px, calc(100vh - 300px));
    min-height: 360px;
  }

  &__selection {
    display: flex;
    min-width: 0;
    min-height: 0;
    padding: 8px;
    overflow: hidden;
    flex-direction: column;
    border: 2px solid #455a82;
    border-radius: 26px;
    background: #0d1529;

    &--recommended {
      border-color: #21b881;
      background: rgba(14, 111, 83, 0.4);
    }
  }

  &__selection-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 42px;
    margin-bottom: 10px;
  }

  &__selection-title {
    min-width: 0;
    margin: 0;
    color: #b8c6ed;
    font-size: clamp(18px, 1.55vw, 28px);
    font-weight: 700;
    line-height: 1.25;
  }

  &__balance-due {
    display: inline-flex;
    flex: none;
    align-items: baseline;
    gap: 8px;
    color: #f5f7ff;
    font-size: clamp(18px, 1.55vw, 28px);
    line-height: 1.25;
    white-space: nowrap;

    span,
    strong {
      font-weight: 700;
    }
  }

  &__items {
    display: flex;
    min-height: 0;
    padding-right: 2px;
    overflow-x: hidden;
    overflow-y: auto;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    scrollbar-color: rgba(184, 198, 237, 0.42) transparent;
    scrollbar-width: thin;
  }

  &__item {
    flex: none;
    min-width: 0;
    padding: 6px 8px;
    border: 2px solid #278f82;
    border-radius: 18px;
    background: #12313c;
  }

  &__item-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
  }

  &__item-title,
  &__item-amount {
    font-size: clamp(20px, 1.55vw, 29px);
    font-weight: 700;
    line-height: 1.25;
  }

  &__item-title {
    min-width: 0;
    overflow: hidden;
    color: #f1f5ff;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &__item-amount {
    flex: none;
    color: #25dda5;
    white-space: nowrap;
  }

  &__item-status {
    margin-top: 4px;
    color: #25dda5;
    font-size: clamp(18px, 1.35vw, 26px);
    font-weight: 700;
    line-height: 1.25;
  }

  &__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    margin-top: 40px;
  }

  &__button.pisell-lowcode-btn {
    min-width: 296px;
    height: 66px;
    padding: 0 30px;
    border-radius: 18px;
    font-size: clamp(20px, 1.5vw, 28px);
    font-weight: 700;
    box-shadow: none;

    &:focus-visible {
      outline: 3px solid #b8c6ed;
      outline-offset: 3px;
    }

    &:disabled {
      color: rgba(245, 247, 255, 0.45);
      border-color: rgba(184, 198, 237, 0.22);
      background: rgba(255, 255, 255, 0.04);
    }
  }

  &__button--continue.pisell-lowcode-btn {
    border: 2px solid #60718f;
    color: #f5f7ff;
    background: #101a2d;

    &:hover:not(:disabled) {
      color: #fff;
      border-color: #8194ba;
      background: #17243b;
    }
  }

  &__button--apply.pisell-lowcode-btn {
    min-width: 340px;
    border-color: #762ee8;
    color: #fff;
    background: linear-gradient(105deg, #823cf5 0%, #6421c7 100%);

    &:hover:not(:disabled) {
      border-color: #955eff;
      color: #fff;
      background: linear-gradient(105deg, #955eff 0%, #762ee8 100%);
    }
  }
}

@media (max-width: 900px) {
  .pisell-lowcode-modal-root {
    .pisell-pc-modal.@{prefix} {
      .pisell-lowcode-modal {
        width: calc(100vw - 24px) !important;
      }

      .pisell-lowcode-modal-content {
        border-radius: 20px;
      }

      .pisell-lowcode-modal-header {
        padding: 24px 20px 18px;
      }

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

  .@{prefix} {
    &__comparison {
      grid-template-columns: minmax(0, 1fr);
      height: auto;
      max-height: calc(100vh - 260px);
      min-height: 0;
      overflow-y: auto;
    }

    &__selection {
      min-height: 240px;
      border-radius: 18px;
    }

    &__item {
      min-height: 78px;
    }

    &__actions {
      gap: 12px;
      margin-top: 20px;
    }

    &__button.pisell-lowcode-btn,
    &__button--apply.pisell-lowcode-btn {
      min-width: 0;
      height: 52px;
      flex: 1;
      border-radius: 12px;
    }
  }
}

@media (max-width: 560px) {
  .@{prefix} {
    &__selection-header {
      align-items: flex-start;
      flex-direction: column;
      gap: 4px;
    }

    &__balance-due {
      align-self: flex-end;
    }

    &__actions {
      flex-direction: column-reverse;
    }

    &__button.pisell-lowcode-btn,
    &__button--apply.pisell-lowcode-btn {
      width: 100%;
      flex: none;
    }
  }
}
