/**
 * @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 {
  .mat-icon-container {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.6;

    &:hover {
      opacity: 0.9;
    }

    mat-icon {
      font-size: 20px;
      width: 20px;
      height: 20px;
    }
  }
}

::ng-deep bubble-container:has(.model-explorer-edge-overlays-popup) {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

::ng-deep .model-explorer-edge-overlays-popup {
  padding: 12px;
  padding-top: 10px;
  font-size: 12px;
  background-color: white;
  display: flex;
  flex-direction: column;

  .icon-container {
    cursor: pointer;
    opacity: 0.8;
    display: flex;
    align-items: center;
    justify-content: center;

    &:hover {
      opacity: 1;
    }

    mat-icon {
      font-size: 16px;
      width: 16px;
      height: 16px;
      color: #777;
    }
  }

  .label {
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 170px;

    &:not(:first-child) {
      margin-top: 12px;
    }

    .right-wrapper {
      display: flex;
      align-items: center;
      gap: 4px;
    }
  }

  .loaded-overlays-container {
    display: flex;
    flex-direction: column;
    padding-bottom: 8px;
    border-bottom: 1px solid #ccc;
    gap: 8px;

    .no-overlays-label {
      color: #999;
    }

    .overlay-set-label {
      display: flex;
      align-items: center;
      justify-content: space-between;
      font-weight: 700;
      line-height: 15px;
      word-break: break-all;
      margin-bottom: 4px;
    }

    .overlay-item {
      display: flex;
      align-items: center;
      justify-content: space-between;

      label {
        display: flex;
        align-items: center;
        cursor: pointer;
        line-height: 15px;
        word-break: break-all;
        gap: 4px;
        user-select: none;

        input {
          cursor: pointer;
        }
      }

      .view-label {
        cursor: pointer;
        color: #00639b;
        opacity: .8;
        user-select: none;
        line-height: 15px;

        &:hover {
          opacity: 1;
        }
      }
    }
  }

  .upload-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0 16px 0 0;
    margin-top: 12px;
  }

  .upload-json-file-button {
    margin: 4px 0;
    width: 90px;
    height: 30px;
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    font-size: 12px !important;
    /* stylelint-disable-next-line declaration-no-important -- override MDC */
    letter-spacing: normal !important;

    &.upload {
      margin-top: 2px;
    }

    ::ng-deep .mat-mdc-button-touch-target {
      display: none;
    }
  }

  .or-divider {
    height: 1px;
    border-top: 1px solid #eee;
    position: relative;
    margin-top: 12px;

    .or-label {
      font-size: 10px;
      top: -12px;
      color: #aaa;
      position: absolute;
      padding: 2px;
      background-color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      width: 16px;
      left: calc(50% - 8px);
    }
  }

  .upload-json-file-input {
    display: none;
  }

}