/* Quando il popup è aperto, disattivo lo scroll della pagina */
body.checkout-login-popup-open {
  overflow: hidden;
}

/* Popup di login */
.checkout-login-popup {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;

  &,
  div,
  a,
  span,
  p {
    --color: #000;
  }

  /* Popup attivo */
  &.is-active {
    display: flex;
  }

  /* Sfondo opaco */
  .checkout-login-popup__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
  }

  .checkout-login-popup__loading {
    display: none;
  }

  /* Dialog */
  .checkout-login-popup__dialog {
    position: relative;
    background: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    padding: 1rem 1.25rem;
    max-width: 350px;
    width: 100%;
    z-index: 2;
  }

  /* Pulsante di chiusura */
  .checkout-login-popup__close {
    --color: #000;
    position: absolute;
    top: 0.25rem;
    right: 0.4rem;
    border: 0;
    line-height: 1;
    cursor: pointer;
  }

  /* Form di login */
  .user-login-form {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    width: 100%;
    gap: 1rem 0;

    .form-item {
      display: flex;
      flex-direction: column;
      align-items: start;
      justify-content: start;
      width: 100%;
      gap: 0.35rem 0;
    }

    /* Actions */
    .form-actions {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      gap: 1rem 0;
    }

    /* Link finali */
    .newcom-user-links {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      width: 100%;
      gap: 0.5rem 0;
      font-size: 80%;
    }
  }
}

/* Solo desktop */
body.is-desktop .checkout-login-popup {
  /* Pulsante di chiusura */
  .checkout-login-popup__close:hover {
    --color: #f00;
  }
}

/*

.checkout-login-popup__body {
  margin-top: 0.5rem;
}

.checkout-login-popup__loading,
.checkout-login-popup__error {
  font-size: 0.9rem;
}
 */

/* Desktop: pannello compatto in alto a destra */
/* body.is-desktop .checkout-login-popup__dialog {
  align-self: flex-start;
  margin-top: 6rem;
  margin-right: 1.5rem;
}

body.is-desktop .checkout-login-popup__backdrop {
  background: transparent;
} */

/* Mobile: popup centrale con overlay scuro */
/* body.is-mobile .checkout-login-popup__dialog {
  max-width: 90%;
} */
