@use 'pix-design-tokens/breakpoints';
@use 'pix-design-tokens/typography';

.login-or-register {
  margin: 20px 0;

  &__panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--pix-spacing-4x);
    padding: var(--pix-spacing-6x) 0 var(--pix-spacing-8x);

    @include breakpoints.device-is('tablet') {
      padding: var(--pix-spacing-8x);
    }

    @include breakpoints.device-is('large-screen') {
      padding: 40px 100px;
    }
  }

  &__language-switcher {
    @include breakpoints.device-is('mobile') {
      margin-left: var(--pix-spacing-4x);
    }
  }
}

.login-or-register-panel {
  &__logo {
    margin: auto;
  }

  &__invitation {
    @extend %pix-body-l;

    padding: var(--pix-spacing-6x) var(--pix-spacing-8x) var(--pix-spacing-3x);
    text-align: center;
  }

  &__forms-container {
    display: flex;
    flex-flow: row;
    justify-content: space-around;

    @include breakpoints.device-is('large-screen') {
      flex-flow: row;
      justify-content: space-between;
    }

    @include breakpoints.device-is('mobile') {
      flex-direction: column;
      margin: 10px 20px 0;
    }
  }

  &__form {
    display: flex;
    flex-direction: column;

    @include breakpoints.device-is('tablet') {
      min-width: 400px;
    }
  }

  &__divider {
    margin-top: 30px;
    border-left: 1px solid var(--pix-neutral-100);

    @include breakpoints.device-is('tablet') {
      margin: var(--pix-spacing-8x) var(--pix-spacing-6x) 0;
    }

    @include breakpoints.device-is('large-screen') {
      margin: 30px 60px 0;
    }
  }
}

.login-or-register-panel-form {
  &__expandable {
    overflow-y: hidden;
    transition: max-height 0.4s ease-in-out;

    &--expanded {
      max-height: 720px;
    }
  }

  &__title {
    margin-top: var(--pix-spacing-6x);
    text-align: center;
  }
}
