/**
 * novo-cartao.html — somente desktop (≥992px).
 * Regra: não adicionar regras em (max-width: 991px) neste arquivo.
 */

.fe-desktop-only {
  display: none !important;
}

.fe-mobile-only {
  display: block;
}

@media only screen and (min-width: 992px) {
  footer.cf-footer {
    display: none !important;
  }

  .fe-mobile-only {
    display: none !important;
  }

  h1.nc-page-title.fe-desktop-only {
    display: block !important;
  }

  .nc-method-bar.fe-desktop-only {
    display: block !important;
  }

  #nc-pricebox-aside.fe-desktop-only {
    display: block !important;
  }

  .nc-left-col > .cf-navbar {
    display: none !important;
  }

  body[data-site="ML"][data-country="BR"] #root-app #attach.attach-page.nc-attach-page {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
  }

  #nc-step-root.nc-step-container {
    width: 100%;
    max-width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    background-color: #ededed;
    padding: 32px 12px 40px;
  }

  #nc-main-container.nc-main-container {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    width: 1200px;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    gap: 36px;
    min-height: 0;
  }

  .nc-left-col {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(800px, 100%);
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nc-page-title {
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.9);
    margin: 0 0 16px;
    padding: 0;
    letter-spacing: -0.02em;
  }

  .nc-method-bar.fe-desktop-only {
    width: 776px;
    max-width: 100%;
    height: 72px;
    min-height: 72px;
    box-sizing: border-box;
    margin-bottom: 16px;
  }

  .nc-method-bar__card {
    width: 100%;
    height: 100%;
    min-height: 72px;
    box-sizing: border-box;
    border-radius: 6px;
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #f5f5f5;
    display: flex;
    align-items: center;
  }

  .nc-method-bar__row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 0 4px 0 12px;
    box-sizing: border-box;
  }

  .nc-method-bar .andes-thumbnail-container {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nc-method-bar .andes-thumbnail.nc-method-bar__thumb,
  .nc-method-bar .andes-thumbnail--circle.nc-method-bar__thumb {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    min-height: 44px;
    max-width: 44px;
    max-height: 44px;
    box-sizing: border-box;
  }

  .nc-method-bar__thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }

  .nc-method-bar__thumb img {
    width: 40px;
    height: 40px;
    object-fit: contain;
  }

  .nc-method-bar__label {
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: rgba(0, 0, 0, 0.9);
  }

  .nc-inner.cf-main {
    margin: 0 !important;
    padding: 0 0 40px !important;
    background: transparent !important;
    border-radius: 0 !important;
  }

  /**
   * Grid: coluna 1 = formulário; coluna 2 = preview centralizado na célula.
   * Botão Continuar fica fora deste card (.nc-desktop-continue), no cinza abaixo.
   */
  .nc-desktop-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 280px);
    grid-template-rows: auto;
    column-gap: 32px;
    row-gap: 0;
    align-items: stretch;
    justify-items: stretch;
    background: #fff;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12);
    padding: 28px 32px 32px;
    box-sizing: border-box;
  }

  .nc-form-wrap {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .nc-card-preview-wrap {
    grid-column: 2;
    grid-row: 1;
    width: 258px;
    height: 160px;
    max-width: 258px;
    justify-self: center;
    align-self: center;
  }

  .nc-card-preview-wrap .cf-card-preview {
    max-width: 100%;
    width: 100%;
    height: 100%;
    margin: 0;
  }

  .nc-card-preview-wrap .cf-card-draw {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    height: 100%;
  }

  /* Preview do cartão (desktop): BIN com tamanho exato solicitado */
  .nc-card-preview-wrap #cf-card-bin.cf-card-bin--standalone {
    width: 130.03px !important;
    height: 26px !important;
    min-height: 26px !important;
    padding: 0 !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    font-size: 12px !important;
    line-height: 26px !important;
    letter-spacing: 0.6px !important;
  }

  /* Não mostrar a tarja quando BIN está vazia */
  .nc-card-preview-wrap #cf-card-bin.cf-card-bin--standalone:empty {
    display: none !important;
  }

  #cf-form {
    margin: 0;
    padding: 0;
  }

  .cf-form-slider {
    overflow: visible !important;
    width: 100%;
    padding: 0;
    margin: 0;
  }

  #cf-form-slides.cf-form-slides {
    display: flex !important;
    flex-direction: column !important;
    gap: 0;
    transform: none !important;
    transition: none !important;
    width: 100%;
  }

  .cf-form-slides .cf-step {
    flex: 0 0 auto !important;
    min-width: 100% !important;
    width: 100%;
    opacity: 1 !important;
  }

  .cf-form-slides .cf-step[data-step="4"] {
    margin-top: 20px;
  }

  /* Alinhar todas as seções de input com a mesma coluna do "Número do cartão". */
  .cf-step .cf-field,
  .cf-step .cf-row-split,
  .cf-step #cf-field-doc {
    width: 350px;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* Na linha Vencimento + Código, os itens seguem as colunas do grid (170 + 170). */
  .cf-row-split > .cf-field {
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .cf-row-split {
    display: grid;
    grid-template-columns: 170px 170px;
    gap: 10px;
  }

  /* Sobe apenas a linha de vencimento/cvv sem afetar o bloco de documento. */
  #cf-field-name {
    margin-bottom: 24px;
  }

  #cf-expiration,
  #cf-security {
    width: 170px !important;
    max-width: 170px !important;
    min-height: 48px !important;
    height: 48px !important;
    box-sizing: border-box;
  }

  .nc-inner > .nc-desktop-continue.fe-desktop-only {
    display: flex !important;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    max-width: 100%;
    margin-top: 32px;
    padding: 0;
    box-sizing: border-box;
  }

  .nc-desktop-continue .andes-button.bf-ui-core-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 132px;
    padding: 14px 28px;
    background: #3483fa;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
  }

  .nc-desktop-continue .andes-button.bf-ui-core-button:hover:not(:disabled) {
    background: #2968c8;
  }

  .nc-desktop-continue .andes-button.bf-ui-core-button:disabled {
    background: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.25);
    cursor: not-allowed;
    pointer-events: none;
  }

  .nc-desktop-continue .andes-button.bf-ui-core-button:disabled .andes-button__text {
    color: inherit;
  }

  .nc-desktop-continue .andes-button__content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  #nc-pricebox-aside.nc-pricebox-aside.fe-card {
    flex: 0 0 360px;
    width: 360px;
    max-width: 100%;
    position: sticky;
    top: 24px;
    align-self: flex-start;
    overflow: hidden;
    zoom: 0.9;
    background-color: #f5f5f5;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.12) !important;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.1);
  }

  .nc-pricebox-aside__header {
    padding: 16px 16px 0;
  }

  .nc-aside-section-title {
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: rgba(0, 0, 0, 0.9);
    margin: 0 0 8px;
  }

  .nc-pricebox-aside__body {
    padding: 0 16px 16px;
  }

  .nc-pricebox-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: 15px;
    color: rgba(0, 0, 0, 0.9);
    font-family: 'Proxima Nova', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  }

  #nc-pricebox-aside .nc-pricebox-row[data-testid="nc_aside_product_row"] {
    margin-top: 10px;
    margin-left: -16px;
    margin-right: -16px;
    padding-top: 10px;
    padding-left: 16px;
    padding-right: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
  }

  .nc-pricebox-row--pay {
    font-size: 16px;
    font-weight: 700;
    padding-top: 8px;
  }

  /* Garantir negrito no valor de "Você pagará" */
  .nc-pricebox-row--pay .nc-pricebox-row__value {
    font-weight: 700;
  }

  .nc-pricebox-row__value--total {
    font-weight: 700;
    font-size: 18px;
  }

  .nc-pricebox-row__value {
    font-weight: 400;
    white-space: nowrap;
    text-align: right;
  }

  .nc-pricebox-row__value--positive {
    color: #00a650;
  }

  .nc-pricebox-sep {
    border: 0;
    height: 1px;
    margin: 8px 0 12px;
    background: rgba(0, 0, 0, 0.1);
  }
}
