/*!
 * Copyright (c) 2020 the original author or 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
 *
 *      https://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 'colors.scss';
@import 'mixins.scss';
@import 'sizes.scss';

.face-displaying {
  display: flex;
  justify-content: center;

  &--wrapper {
    position: relative;
    line-height: 0;

    .spinner {
      position: absolute;
      background-color: $light-gray;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 5;

      app-spinner {
        @include wrapper-center();
      }
    }

    .canvas-landmarks {
      position: absolute;
      left: 0;
    }

    .canvas-pose { 
      position: absolute;
      left: 0;
    }

    .face-box {
      position: absolute;
      display: flex;
      flex-direction: column;

      &--face {
        width: 100%;
        min-height: 100%;
        box-sizing: border-box;
        border: 4px solid;
        border-radius: 12px;
        border-color: $transparent-gray;

        &.active-frame {
          border-color: $light-blue;
        }
      }

      &--info {
        position: relative;
        margin-top: 18px;
        padding: 8px 20px;
        max-width: 200px;
        width: fit-content;
        background-color: $light-blue;
        border-radius: 6px;
        color: $white;
        left: 50%;
        transform: translate(-50%, 0);
        line-height: 21px;

        &:before {
          position: absolute;
          content: '';
          top: 8px;
          left: 50%;
          width: 24px;
          height: 24px;
          background: $light-blue;
          transform: translate(-50%, -50%) rotate(45deg);
          z-index: -1;
        }

        &_name {
          @include not-break-string;
          margin-bottom: 4px;
          font-weight: 600;
          font-size: $text-md;
        }

        &_similarity {
          @include not-break-string;
          margin-bottom: 6px;
          font-weight: normal;
          font-size: $text-sm;
        }

        &_gender {
          @include not-break-string;
          font-size: $text-sm;
        }
      }
    }
  }
}
