.stellar-login-popup-overlay.is-open {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: #00000033;
  z-index: 1000;
  backdrop-filter: blur(8px);
}
.stellar-login-popup {
  display: none;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  max-width: 100%;
  position: fixed;
  top: 0;
  z-index: 1001;

  /* Clickable backdrop inside the popup container */
  .stellar-login-popup__backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 0;
  }

  &.is-open {
    display: flex;
  }

  /* Tabs (Darmowa / Płatna) */
  .stellar-login-popup__tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px;
    padding: 0 30px;
    @media (max-width: 1024px) {
      gap: 10px;
      padding: 0 13px;
    }
  }
  .stellar-login-popup__tab {
    appearance: none;
    background: none;
    border: none;
    border-radius: 34px;
    border: 1px solid #fff;
    cursor: pointer;
    font-weight: 600;
    font-size: 24px;
    color: #fff;
    padding: 10px 14px;
    background: #303030;
    transition: 0.3s;
    @media (max-width: 1024px) {
      font-size: 13px;
      line-height: 21px;
      padding: 5px 10px;
      border-radius: 22px;
      width: 50%;
    }

    &:hover {
      background: #00b9f2;
      border-color: #00b9f2;
      transition: 0.3s;
    }
  }
  .stellar-login-popup__tab.is-active {
    color: #fff;
    background: #00b9f2;
    border-color: #00b9f2;
  }
  .stellar-login-popup__panes {
    padding: 12px;
    height: 800px;
    @media (max-width: 1024px) {
      height: 100%;
      padding: 0;
    }
  }
  .stellar-login-popup__pane {
    display: none;
    border-radius: 34px;
    padding: 30px;
    background: #202020;
    height: 100%;
    @media (max-width: 1024px) {
      padding: 13px;
    }

    &#stellar-tab-paid-pane {
      justify-content: flex-start;

      #pms_register-form {
        overflow-y: auto;
        height: 100%;
        max-height: 100%;
        padding-right: 30px;
        display: flex;
        flex-direction: column;
        @media (max-width: 1024px) {
          padding-right: 0;
        }

        .pms-form-fields-wrapper {
          @media (max-width: 1024px) {
            padding: 0;
            margin: 0;
            gap: 13px;
            display: flex;
            flex-direction: column;
          }
          .pms-field-subscriptions {
            order: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            margin: 0;
            background: #090909;
            border-radius: 30px;
            padding: 30px;
            @media (max-width: 1024px) {
              padding: 13px;
            }

            &::before {
              content: "Wybierz subskrypcje: ";
              color: #fff;
              font-size: 27px;
              line-height: 55px;
              margin-bottom: 30px;
              font-family: "Anton", sans-serif;
              font-weight: 500;
              text-align: center;
              @media (max-width: 1024px) {
                font-size: 17px;
                line-height: 25px;
                margin-bottom: 13px;
              }
            }

            .pms-subscription-plan {
              @media (max-width: 1024px) {
                margin-bottom: 13px;
              }
              label {
                input {
                  display: none;
                }
                span {
                  color: #fff;
                  font-weight: 500;
                  font-size: 17px;
                  line-height: 25px;
                  @media (max-width: 1024px) {
                    font-size: 13px;
                    line-height: 21px;
                  }
                }
                &:has(input:checked) {
                  span {
                    color: #00b9f2;
                  }
                }
              }
            }
          }

          .pms-field-section {
            gap: 20px;
            margin-top: 50px;
            background: #090909;
            border-radius: 30px;
            padding: 30px;
            @media (max-width: 1024px) {
              padding: 13px;
              margin-top: 0;
            }
            li {
              width: calc(50% - 10px);
              flex-basis: calc(50% - 10px);
              @media (max-width: 1024px) {
                width: 100%;
                flex-basis: 100%;
              }
              &:first-child {
                width: 100%;
                flex-basis: 100%;
              }
              label {
                color: #fff;
                font-weight: 500;
                font-size: 21px;
                line-height: 34px;
                @media (max-width: 1024px) {
                  font-size: 17px;
                  line-height: 25px;
                }
              }
              input,
              select {
                border-radius: 30px;
                @media (max-width: 1024px) {
                  border-radius: 22px;
                }
              }
              p {
                color: #fff;
                @media (max-width: 1024px) {
                  font-size: 13px;
                }
              }
            }
          }

          #pms-stripe-connect {
            background: #090909;
            border-radius: 30px;
            padding: 30px;
            @media (max-width: 1024px) {
              padding: 13px;
            }
            #pms-stripe-payment-elements {
              background: transparent;
              border: none;
              width: 100%;
              max-width: 100%;
              height: 100%;
              max-height: 100%;
              height: 100%;
              max-height: 100%;
            }
          }
          .pms-account-section-wrapper {
            display: flex;
            flex-wrap: wrap;
            gap: 20px;
            background: #090909;
            border-radius: 30px;
            padding: 30px;
            margin-top: 50px;
            @media (max-width: 1024px) {
              padding: 13px;
              margin-top: 13px;
            }

            .pms-account-details-title {
              width: 100%;
            }
            li {
              width: calc(50% - 10px);
              flex-basis: calc(50% - 10px);
              @media (max-width: 1024px) {
                width: 100%;
                flex-basis: 100%;
              }
              label {
                color: #fff;
                font-weight: 500;
                font-size: 21px;
                line-height: 34px;
                @media (max-width: 1024px) {
                  font-size: 17px;
                  line-height: 25px;
                }
              }
              input {
                border-radius: 30px;
                @media (max-width: 1024px) {
                  border-radius: 22px;
                }
              }
            }
          }
        }
        .pms-form-submit {
          margin: 0 auto;
          margin-top: 30px;
          background: #00b9f2;
          border-radius: 18px;
          font-size: 23px;
          line-height: 46px;
          letter-spacing: 0%;
          font-weight: 500;
          width: 270px;
          height: 73px;
          display: flex;
          align-items: center;
          justify-content: center;
          text-decoration: none;
          color: #ffffff;
          transition: 0.3s;
          @media (max-width: 1024px) {
            font-size: 17px;
            line-height: 25px;
            width: 100%;
            height: 50px;
            margin-top: 13px;
          }

          &:hover {
            background: #005a87;
            transition: 0.3s;
          }
        }
      }
    }

    h3 {
      color: #fff;
      font-weight: 500;
      font-size: 27px;
      letter-spacing: 0%;
      text-align: center;
      @media (max-width: 1024px) {
        font-size: 17px;
      }
    }
  }
  .stellar-login-popup__pane.is-active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .stellar-login-popup__dialog {
    position: relative;
    z-index: 1;
    background: #303030;
    border-radius: 21px;
    padding: 13px;
    min-height: 500px;
    width: 1320px;
    max-width: 80vw;
    height: auto;
    max-height: 80vh;
    overflow-y: auto;
    &:not(:has(.stellar-login-popup__inner)) {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      .stellar-login-popup__header {
        position: static;
      }
    }
    @media (max-width: 1024px) {
      width: 90%;
      max-width: 90%;
      height: 100%;
      max-height: 90%;
      border-radius: 21px;
      padding: 13px;
    }

    &:focus-visible {
      outline: none;
    }

    .stellar-login-popup__header {
      position: relative;
      img {
        width: 100%;
        height: auto;
        object-fit: cover;
      }
      .stellar-login-popup__close {
        position: absolute;
        top: 13px;
        right: 13px;
        background: #00000033;
        z-index: 1000;
        border: none;
        background: none;
        cursor: pointer;
      }
    }

    .stellar-login-popup__content {
      color: #303030;
      display: flex;
      flex-direction: row;
      align-items: stretch;
      height: 100%;
      &:not(:has(.stellar-login-popup__inner)) {
        flex-direction: column;
        h3 {
          text-align: center;
        }
      }
      @media (max-width: 1024px) {
        flex-direction: column;
      }

      .stellar-login-popup__title {
        color: #fff;
        font-weight: 500;
        font-size: 40px;
        text-align: center;
        margin-bottom: 30px;
        @media (max-width: 1024px) {
          font-size: 21px;
          line-height: 34px;
          margin-bottom: 13px;
        }
      }
      .stellar-login-popup__header-image {
        flex: 1;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        border-radius: 34px;
        padding: 30px;
        box-shadow: inset 100px 100px 100px 100px rgba(0, 0, 0, 0.6);
        @media (max-width: 1024px) {
          padding: 60px 13px 13px 13px;
        }

        .stellar-login-popup__features {
          color: #fff;
          font-weight: 500;
          font-size: 21px;
          line-height: 34px;
          letter-spacing: 0%;
          margin-bottom: 30px;
          @media (max-width: 1024px) {
            font-size: 17px;
            line-height: 25px;
            margin-bottom: 13px;
          }
          li {
            margin-bottom: 10px;
          }
        }
      }
      .stellar-login-popup__header-content {
        flex: 2;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        @media (max-width: 1024px) {
          gap: 13px;
        }
      }

      .stellar-login-popup__actions {
        .stellar-btn {
          margin: 0 auto;
          background: #00b9f2;
          border-radius: 18px;
          font-size: 23px;
          line-height: 46px;
          letter-spacing: 0%;
          font-weight: 500;
          width: 270px;
          height: 73px;
          display: flex;
          align-items: center;
          justify-content: center;
          text-decoration: none;
          color: #ffffff;
          transition: 0.3s;
          @media (max-width: 1024px) {
            font-size: 17px;
            line-height: 25px;
            width: 100%;
            height: 50px;
            margin-top: 13px;
          }
          &:hover {
            background: #005a87;
            transition: 0.3s;
          }
        }

        .stellar-login-popup__actions-item {
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 5px;
          margin-top: 27px;
          span {
            color: #fff;
            font-weight: 500;
            font-size: 17px;
            line-height: 25px;
          }
          .stellar-btn-register {
            color: #fff;
            font-weight: 500;
            font-size: 17px;
            line-height: 25px;
            text-decoration: underline;
            transition: 0.3s;

            &:hover {
              color: #00b9f2;
              transition: 0.3s;
            }
          }
        }
      }
    }
  }
}

/* Mobile: when header-image is moved inside header-content under tabs */
@media (max-width: 1024px) {
  #stellar-login-popup
    .stellar-login-popup__dialog
    .stellar-login-popup__content
    .stellar-login-popup__header-content {
    justify-content: flex-start;
  }
  #stellar-login-popup
    .stellar-login-popup__dialog
    .stellar-login-popup__content
    .stellar-login-popup__header-content
    .stellar-login-popup__header-image {
    margin-top: 0;
    border-radius: 21px;
  }
}
