/**
 * @license
 * Copyright 2024 The Model Explorer Authors. All Rights Reserved.
 *
 * 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.
 * ==============================================================================
 */

.container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: relative;

  canvas.main {
    /* stylelint-disable-next-line declaration-no-important -- override default */
    width: 100% !important;
    /* stylelint-disable-next-line declaration-no-important -- override default */
    height: 100% !important;
    box-sizing: border-box;
  }

  canvas.snapshot,
  canvas.download-png {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 400px;
    height: 300px;
    border: 1px solid red;
    box-sizing: border-box;
    background-color: white;
    display: none;
  }

  .hover-toolbar {
    position: absolute;
    width: 50px;
    height: 40px;
    box-sizing: border-box;
    display: flex;
    transition: opacity 150ms;
    opacity: 1;
    pointer-events: none;

    &.hide {
      transition: none;
      opacity: 0;
    }

    .content {
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;

      .main-content-wrapper {
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: all;
      }

      .main-content {
        font-size: 12px;
        border: 1px solid #ccc;
        background-color: rgba(250, 250, 250, 0.9);
        border-radius: 99px;
        padding: 0 8px;
        box-sizing: border-box;
        box-shadow:
          0 1px 3px 0 rgb(0 0 0 / 0.1),
          0 1px 2px -1px rgb(0 0 0 / 0.1);
        display: flex;
        align-items: center;

        .icon-container {
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          opacity: 0.8;
          width: 24px;
          padding: 4px 0;

          &:hover {
            opacity: 1;
            background-color: #eee;
          }
        }

        mat-icon {
          font-size: 16px;
          font-weight: bold;
          width: 16px;
          height: 16px;
          line-height: 16px;
          color: #ea8600;
        }
      }
    }
  }

  .io-picker,
  .group-node-icon,
  .subgraph-indicator {
    position: absolute;
    box-sizing: border-box;
    display: flex;
    background-color: transparent;
  }

  .group-node-icon,
  .io-picker {
    z-index: 100;
  }

  .group-node-icon-tooltip,
  .io-picker-tooltip {
    position: absolute;
    z-index: 50;
  }

  .subgraph-indicator-menu-trigger,
  .more-actions-menu-trigger {
    position: absolute;
    visibility: hidden;
  }

  .flash {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5000;
    box-sizing: border-box;
    border: 5px solid #1976d2;
    pointer-events: none;
    opacity: 0;
  }

  @keyframes flashing {
    5% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  .flashing {
    animation: flashing 300ms ease-out;
  }

  .fps {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 100;
    font-size: 32px;
    border: 1px solid #777;
    padding: 8px;
    border-radius: 4px;
    background-color: white;
  }
}

::ng-deep .multiline-tooltip {
  white-space: pre-line;
}

::ng-deep .multiline-tooltip-left {
  white-space: pre-line;

  > div {
    text-align: left;
  }
}

::ng-deep .model-explorer-menu-item-with-icon {
  font-family: 'Google Sans Text', Arial, Helvetica, sans-serif;
  display: flex;
  align-items: center;
  font-size: 12px;
  padding: 5px 8px;
  line-height: 15px;
  letter-spacing: normal;

  mat-icon {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    color: #999;
  }

  &:hover {
    background-color: rgba(0, 0, 0, 0.04);
  }
}

::ng-deep .model-explorer-alt-click-info {
  height: 32px;
  min-height: 32px;
  background-color: #f6f6f6;
  border-top: 1px solid #ddd;
  box-sizing: border-box;
  padding: 0 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  color: #777;
  margin-bottom: -8px;
}
