:root[theme='rounded'] {
  --installments-radius: 0.25rem;
}

:root[theme='circle'] {
  --installments-radius: 0.5rem;
}

.o-installments {
  color: oklch(62.4% 0 0);

  .grid-section & {
    line-height: 1.2;
    margin-block-start: 0.25rem;
  }

  :is(.sellers-list, .body-multiseller) & {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-block-start: 0.25rem;
  }

  .cartpopup_producttotal & {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-block-start: 0.25rem;
  }
}

.o-installments__full-price,
.o-installments__max-number,
.o-installments__value {
  color: oklch(36.1% 0 0);
  font-weight: 600;

  .o-installments--product.o-installments--upfront & {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
  }
}

.o-installments__full-price {
  .product-view .price-box & .price {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
  }
}

.o-installments__see-more {
  align-items: center;
  background: transparent;
  border: 0;
  color: initial;
  display: flex;
  gap: 0.25rem;
  margin-block-start: 0.5rem;
  padding: 0;
  text-align: left;

  svg {
    height: 1.25rem;
    width: 1.25rem;
  }

  .o-installments--upfront & {
    align-items: center;
    background: oklch(100% 0 0);
    border: 1px solid oklch(90% 0 0);
    border-radius: var(--installments-radius, 0);
    color: oklch(62.4% 0 0);
    font-size: 0.75rem;
    font-weight: 500;
    justify-content: space-between;
    line-height: 1.3;
    padding: 0.75rem 1rem;
    width: 100%;
  }

  .o-installments--upfront &:hover {
    box-shadow: 0 1px 6px 0 oklch(44.6% 0 0 / 25%);
    opacity: 1;
  }

  :is(.sellers-list, .body-multiseller) .o-installments--upfront & {
    background: transparent;
    border: none;
    box-shadow: none;
    font-size: 0.75rem;
    line-height: 1.2;
    margin-block-start: 0.25rem;
    padding: 0;
  }

  .body-multiseller .o-installments--upfront & {
    justify-content: center;
  }

  .o-installments__bl {
    color: oklch(36.1% 0 0);
    display: block;
    font-size: 0.875rem;
    font-weight: bold;

    :is(.sellers-list, .body-multiseller) [class*='upfront'] & {
      font-size: inherit;
    }
  }

  :is(.sellers-list, .body-multiseller) & {
    font-size: 0.75rem;
    line-height: 1.2;
    margin-block-start: 0;
    text-wrap: nowrap;
  }

  :is(.sellers-list, .body-multiseller) [class*='upfront'] & .o-installments__icon {
    display: none;
  }
}

@scope (#installments-modal) {
  .modal-content {
    border: 1px solid oklch(69.1% 0 0);
    border-radius: var(--asd-parcel-modal-radius, 0);
  }

  .modal-body {
    padding: 0;
  }

  .installments-modal__header {
    border-bottom: 1px solid oklch(90% 0 0);
    padding: 1.25rem 2rem;
  }

  .installments-modal__title {
    color: oklch(32.1% 0 0);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.009em;
    line-height: 1;
    margin: 0;
  }

  .installments-modal__row {
    align-items: center;
    color: oklch(32.1% 0 0);
    display: grid;
    font-size: 0.875rem;
    font-weight: 700;
    gap: 1rem;
    grid-template-columns: 30px 1fr 2fr 1fr;
    letter-spacing: -0.009em;
    line-height: 1;
    padding: 1.25rem 2rem;
  }

  .installments-modal__interest {
    color: oklch(60.7% 0 0);
    font-weight: 500;
    text-align: center;
  }

  .installments-modal__total {
    text-align: right;
  }

  .installments-modal__row:nth-child(odd) {
    background-color: oklch(97% 0 0);
  }
}
