.only-desktop {
  display: none !important;
}

.only-mobile {
  display: flex;
}

.invoice__modal {
  display: none;
  position: fixed;
  align-items: flex-end;
  inset: 0;
  background: var(--backdrop, rgba(0, 0, 0, 0.5));
  z-index: 999;
  overscroll-behavior: contain;
}

.invoice__modal[aria-hidden="false"] {
  display: block;
}

body:has(.invoice__modal[aria-hidden="false"]) {
  overflow: hidden;
  touch-action: none;
}

.modal__container {
  position: fixed;
  bottom: 0;
  left: 0;

  width: 100%;
  height: auto;
  max-height: 75vh;

  overflow-y: auto;

  padding: 0 24px 24px;

  border-top-left-radius: 24px;
  border-top-right-radius: 24px;

  background-color: #fff;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);

  transform: none;
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.scheduled-payment__top-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
}

.scheduled-payment__modal-toggle {
  width: 80px;
  height: 8px;
  border-radius: 4px;
  background: var(--color-neutral-lightest);
}

.scheduled-payment__close-modal {
  display: none;
}

.scheduled-payment__container {
  padding: 12px 0 24px;
  overflow: hidden;
}

.scheduled-payment__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.scheduled-payment__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scheduled-payment__label {
  display: none;
}

.scheduled-payment__value,
.scheduled-payment__contact-text {
  font-size: 12px;
  font-weight: 400;
  line-height: 150%;
  letter-spacing: 0;
}

.scheduled-payment__value--charge {
  color: var(--color-neutral-mid);
  margin-bottom: 0;
}

.scheduled-payment__value--amount {
  font-family: "BwGradual", sans-serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 120%;
  margin-bottom: 0;
}

.scheduled-payment__value--due-date {
  color: var(--color-neutral-dark);
}

.scheduled-payment__status {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 14px;
  height: 29px;
  min-width: 100px;
}

.scheduled-payment__status--scheduled {
  background: var(--color-yellow-dark);
}

.scheduled-payment__status--delayed {
  background: var(--color-coral-mid);
}

.scheduled-payment__alert {
  display: flex;
  gap: 12px;
  background: var(--color-coral-lightest);
  color: var(--color-coral-darkest);
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  margin: 12px 0 24px;
}

.scheduled-payment__alert p {
  font-weight: 700;
  font-size: 14px;
  line-height: 150%;
  vertical-align: middle;
}

.scheduled-payment__alert-icon {
  vertical-align: middle;
}

.scheduled-payment__content,
.scheduled-payment__instructions {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scheduled-payment__content {
  padding-top: 24px;
}

.scheduled-payment__paragraph,
.scheduled-payment__list-item,
.scheduled-payment__highlight {
  font-family: "Simplon BP", sans-serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0;
}

.scheduled-payment__list,
.scheduled-payment__content ul {
  list-style: disc;
  padding-left: 20px;
  margin: 8px 0;
}

.scheduled-payment__content strong {
  display: block;
  font-weight: bold;
}

.scheduled-payment__button-group {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scheduled-payment__button {
  width: 100%;
  height: 48px;
  padding: 8px 24px;
  border-radius: 9999px;
  background: var(--header-text-green-color);
  color: var(--color-nio-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  gap: 12px; /* espaço entre ícone e texto */
  position: relative;
}

.scheduled-payment__button--outline {
  width: 100%;
  height: 48px;
  padding: 8px 24px;
  border-radius: 9999px;
  border: 1px solid var(--color-nio-green-dark);
  color: var(--color-nio-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  gap: 12px;
  position: relative;
}

.scheduled-payment__button-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-nio-green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--color-nio-green-dark);
  position: absolute;
  left: 8px;
}

.scheduled-payment__contact-text {
  color: var(--color-neutral-mid);
  text-align: center;
  vertical-align: bottom;
}

.scheduled-payment__plan-info,
.scheduled-payment__close-button {
  display: none;
}

.scheduled-payment__state {
  display: flex;
  flex-direction: column;
}

.scheduled-payment__state.is-hidden {
  display: none !important;
}

.scheduled-payment__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.scheduled-payment__options {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.scheduled-payment__option {
  border: 1px solid #333;
  border-radius: 12px;
  padding: 24px 24px 12px 24px;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.scheduled-payment__option.is-active {
  border-color: var(--color-green-dark);
  padding: 24px 24px 24px 24px;
}

.scheduled-payment__option-header {
  display: flex;
  gap: 16px;
  align-items: center;
  position: relative;
  width: calc(100% + 48px);
  left: -24px;
  margin: -24px 0 -12px;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
}

.scheduled-payment__option.is-active .scheduled-payment__option-header {
  background: var(--color-green-dark);
  color: #fff;
}

.scheduled-payment__option.is-active .scheduled-payment__option-title,
.scheduled-payment__option.is-active .scheduled-payment__option-subtitle {
  color: #fff;
}

.scheduled-payment__checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #666;
  border-radius: 30%;
  display: inline-block;
  cursor: pointer;
  position: relative;
}

.scheduled-payment__option.is-active .scheduled-payment__checkbox {
  background: #fff;
  border-color: #fff;
}

.scheduled-payment__option.is-active .scheduled-payment__checkbox::after {
  content: "✔";
  color: var(--color-green-dark);
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.scheduled-payment__option-title {
  font-size: 16px;
  font-weight: 500;
}

.scheduled-payment__option-subtitle {
  font-size: 12px;
  color: #aaa;
}

.scheduled-payment__option-icon {
  width: 40px;
  height: 40px;
}

.scheduled-payment__option-body {
  display: none;
  height: 0;
  overflow: hidden;
  transition: height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

.scheduled-payment__option-body.is-visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  opacity: 1;
  height: auto;
  padding: 36px 0 0 0;
}

.scheduled-payment__option-body-title {
  font-weight: 500;
  font-style: Medium;
  font-size: 20px;
  line-height: 120%;
  letter-spacing: 0%;
}

.scheduled-payment__option-body-text {
  font-weight: 400;
  font-size: 16px;
  line-height: 150%;
  letter-spacing: 0%;
  text-align: center;
  color: var(--color-neutral-dark);
}

.scheduled-payment__dashed-container {
  width: 100%;                      /* largo até o limite, igual pix-gerado.html original */
  height: auto;
  min-height: 48px;
  border-radius: 4px;
  border-width: 1px;
  border-style: dashed;
  border-color: var(--color-neutral-dark);
  padding: 12px 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: "Simplon BP", sans-serif;
  color: var(--color-neutral-dark);

  /* Ellipsis igual pix-gerado.html original — span mantém BR-Code COMPLETO
     no DOM. Click em "Copiar Código" usa `[data-pix-code].textContent`
     (não o rendered), então copia tudo mesmo com ellipsis visual. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scheduled-payment__dashed-container [data-pix-code] {
  display: inline-block;
  min-width: 0;
  flex: 0 1 auto;
  max-width: 300px;                 /* trunca sempre — container fica largo, mas texto limitado a 300px + ellipsis */
  margin: 0 auto;                   /* centraliza o span dentro do container largo */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* QR SVG (renderizado server-side via Pixgen) — tamanho fixo 256px,
   mesmo canvas do pix-gerado.html original. */
.scheduled-payment__qrcode-image img {
  width: 256px;
  height: 256px;
  display: block;
}

/* Botão-group do PIX Copia-e-Cola — força coluna (Copiar Código EM CIMA,
   Já efetuei o pagamento EM BAIXO), alinhado. Sem isso, o @media desktop
   deixa o group como row e o segundo botão fica lateral desalinhado. */
.scheduled-payment__button-group:has(#pixConfirmedBtn),
.scheduled-payment__button-group:has(#pixConfirmedBtnDesktop) {
  flex-direction: column !important;
  gap: 12px;
  align-items: stretch;
}


.pix-expired {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 24px;
  text-align: center;
}

.pix-expired__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.pix-expired__bell {
  width: 34px;
  height: 37px;
}

.pix-expired__title {
  font-size: 16px;
  font-weight: 600;
  color: #1f1f1f;
  max-width: 420px;
}

.pix-expired__description {
  font-size: 14px;
  color: #6b6b6b;
  max-width: 460px;
  line-height: 1.4;
}

.pix-expired__button {
  margin-top: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  background-color: #22c400;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

@media (min-width: 768px) {
  .only-desktop {
    display: flex !important;
    flex-direction: row;
  }

  .only-mobile {
    display: none;
  }

  .modal__container {
    overflow: visible;
    display: flex;
    flex-direction: column;
    width: fit-content;
    max-width: 1100px;
    height: 70vh;
    max-height: none;
    padding: 24px;
    border-radius: 40px;
    gap: 24px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    background-color: #fff;
    animation: none;
  }

  .scheduled-payment__container {
    height: auto;
    max-height: none;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    overflow-y: auto;
    scrollbar-width: none;
    padding-bottom: 48px;
  }

  .scheduled-payment__container::-webkit-scrollbar {
    display: none;
  }

  .scheduled-payment__top-actions {
    flex-direction: row;
    height: 48px;
    justify-content: space-between;
  }

  .scheduled-payment__modal-toggle {
    display: none;
  }

  .scheduled-payment__close-modal {
    display: inline-flex;
    cursor: pointer;
  }

  .scheduled-payment__plan-info {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
  }

  .scheduled-payment__plan-title,
  .scheduled-payment__address {
    font-family: "Simplon BP", sans-serif;
    line-height: 120%;
  }

  .scheduled-payment__plan-title {
    font-weight: 500;
    font-size: 20px;
    margin-bottom: 0;
  }

  .scheduled-payment__address {
    font-weight: 300;
    font-size: 16px;
    line-height: 150%;
  }

  .scheduled-payment__close-button {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: inline-block;
    transition: transform 0.2s ease;
  }

  .scheduled-payment__header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-radius: 24px;
    border: 1px solid var(--color-neutral-light);
  }

  .scheduled-payment__info {
    flex-direction: row;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
  }

  .scheduled-payment__info-item {
    display: flex;
    flex-direction: column;
    width: 277px;
  }

  .scheduled-payment__label {
    display: flex;
    font-weight: 500;
    font-size: 12px;
    line-height: 150%;
    color: var(--color-neutral-mid);
  }

  .scheduled-payment__value,
  .scheduled-payment__value--charge,
  .scheduled-payment__value--amount,
  .scheduled-payment__value--due-date {
    font-size: 16px;
    line-height: 150%;
    color: var(--color-neutral-darkest);
  }

  .scheduled-payment__status {
    min-width: 110px;
    background: #d4b100;
    color: #000;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
  }

  .scheduled-payment__alert.is-hidden {
    display: none !important;
  }

  .scheduled-payment__container {
    gap: 24px;
  }

  .scheduled-payment__alert {
    height: 56px;
    margin: 0;
  }

  .scheduled-payment__content {
    padding: 0px;
    border-radius: 24px;
    border: 1px solid var(--color-neutral-light);
  }

  .scheduled-payment__button {
    width: 214px;
  }

  .scheduled-payment__contact-text--bottom {
    display: none;
  }

  .desktop-payment__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    list-style-type: none !important;
    margin: 0px !important;
    padding: 0px !important;
  }

  .desktop-payment__item {
    width: 317px;
    height: 66px;
    display: flex;
    padding: 12px 8px;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    border-radius: 12px;
    cursor: pointer;
  }

  .desktop-payment__item svg {
    fill: #000;
  }

  .desktop-payment__item-button-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    color: #000;
  }

  .desktop-payment__item-title {
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
  }

  .desktop-payment__item-subtitle {
    font-size: 12px;
    font-style: normal;
    font-weight: 500;
    line-height: 150%;
  }

  .desktop-payment__item--selected {
    background-color: #1a7200;
    color: #fff;
    border-color: #1a7200;
  }

  .desktop-payment__item--selected .desktop-payment__item-button-text {
    color: #fff;
  }

  .desktop-payment__item--selected svg {
    fill: #fff;
  }

  .desktop-payment__item:hover {
    background-color: rgba(0, 0, 0, 0.03);
  }
  .desktop-payment__item--selected:hover {
    background-color: #186a00;
  }

  .scheduled-payment__navigation {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 24px;
    border-right: 1px solid var(--color-neutral-light);
  }

  .scheduled-payment__title {
    margin: 0;
  }

  .scheduled-payment__details {
    padding: 24px;
    width: 100%;
    justify-content: center;
  }

  .scheduled-payment__option-body.is-visible {
    padding: 0;
    gap: 40px;
  }

  .scheduled-payment__qrcode-section {
    display: flex;
    flex-direction: row;
    gap: 16px;
  }

  .scheduled-payment__qrcode-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    justify-content: center;
  }

  .scheduled-payment__option-body-title {
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 120%;
    margin: 0;
    text-align: left;
  }

  .scheduled-payment__option-body-text {
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 150%;
    margin: 0;
    text-align: left;
  }

  .scheduled-payment__divider {
    width: 100%;
    border-bottom: 1px solid var(--color-neutral-light);
  }

  .scheduled-payment__copy {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .scheduled-payment__dashed-container {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .scheduled-payment__button-group {
    flex-direction: row;
  }

  .scheduled-payment__button {
    width: 100%;
  }

  .scheduled-payment__button.action-button {
    max-width: 206px;
  }

  .scheduled-payment__bank-list {
    width: 100%;
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: space-between;
    margin: 0px !important;
    padding: 0px !important;
  }

  .scheduled-payment__bank-item {
    width: 70px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 12px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
  }

  .scheduled-payment__bank-item:hover {
    border-color: #1a7200;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.1);
  }
}
