/**
 * Copyright © 2016-2026 The Thingsboard Authors
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
@import '../../../../../scss/constants';
@import '../../../../../theme';

:host {
  display: flex;
  flex: 1 1 0;
  .tb-login-content {
    margin-top: 36px;
    margin-bottom: 76px;
    background-color: #eee;
    --mat-card-elevated-container-elevation: none;
    .tb-login-form {
      @media #{$mat-gt-xs} {
        width: 480px !important;
      }

      .forgot-password {
        --mat-button-text-horizontal-padding: 0;
        --mat-button-text-container-height: 20px;
      }

      .tb-action-button{
        margin: 20px 0 16px;
      }
    }

    .container-divider {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      width: 100%;
      margin-bottom: 16px;

      .mat-divider-horizontal{
        --mat-divider-color: var(--mat-form-field-outlined-outline-color);
      }

      .text {
        padding-right: 8px;
        padding-left: 8px;
        font-size: 16px;
        line-height: 24px;
      }
    }

    .oauth-container{
      .title {
        font-size: 20px;
        line-height: 24px;
        letter-spacing: .1px;
        text-align: center;
        margin-bottom: 4px;
      }

      .material-icons{
        width: 20px;
        min-width: 20px;
      }

      a.login-with-button {
        color: rgba(black, 0.87);
        background-color: #ffffff;
      }

      .login-button-container {
        a.login-with-button {
          max-width: 170px;
          min-width: 60px;
          flex-grow: 1;
          flex-basis: 130px;

          .tb-mat-20 {
            margin-right: 12px;
          }
        }

        &:has(> :nth-child(1):last-child) {
          a.login-with-button {
            max-width: 100%;
          }
        }

        &:has(> :nth-child(2):last-child),
        &:has(> :nth-child(4):last-child) {
          a.login-with-button {
            max-width: 100%;
            flex-basis: 180px;
          }
        }
      }
    }
  }
}

