/**
 * Copyright IBM Corp. 2021-2023
 *
 * This source code is licensed under the IBM Public License Version 1.0 found in the
 * LICENSE file in the root directory of this source tree.
 */
.TriFloorPlan {
  display: flex;
  overflow: hidden;
  position: relative;
  flex-direction: column;

  & svg {
    height: 100%;
    width: 100%;
    fill-rule: evenodd;
    display: flex;
    flex: 1 1 1e-9px;
  }

  &__placeholder {
    height: 100%;
    width: 100%;
  }

  div.TriNavWindow {
    position: absolute;
    bottom: 0;
    right: 0;
    width: fit-content;
    height: fit-content;
    background-color: transparent;
    filter: alpha(opacity=50);
    -moz-opacity: 0.5;
    opacity: 0.5;
    padding-bottom: 6px;
    padding-right: 6px;
  }

  div.TriNavWindow:hover {
    filter: alpha(opacity=100);
    -moz-opacity: 1;
    opacity: 1;
  }

  div.TriNavZoomBar {
    width: 100%;
    height: 24px;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    background-color: transparent;
  }

  div.TriNavThumbBar {
    display: flex;
  }

  div.TriNavControlBar {
    flex: 0 0 24px;
  }

  div.TriNavDrag {
    height: 24px;
    cursor: move;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    margin-top: 6px;
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
  }

  div.TriNavControl {
    height: 24px;
    background-color: white;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    margin-top: 6px;
  }

  div.TriNavControlActive {
    height: 24px;
    background-color: gray;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    margin-top: 6px;
  }

  div.TriNavShadow {
    position: absolute;
    visibility: hidden;
    margin: 0;
    padding: 0;
  }

  div.TriNavThumbnail {
    position: relative;
    flex: 1 1;
    background-color: white;
    border: 1px solid black;
    box-shadow: 0 2px 6px rgba(0,0,0,.3);
    max-height: none;
    max-width: none;
    margin-top: 6px;
    margin-left: 6px;
  }

  div.TriNavViewport {
    position: absolute;
    max-height: none;
    max-width: none;
    border: 2px solid cornflowerblue;
    background-color: lightsteelblue;
    filter: alpha(opacity=40);
    -moz-opacity: 0.4;
    opacity: 0.4;
  }

  .TriNavZoom {
    height: 24px;
    background-color: white;
    margin-top: 0;
    margin-bottom: 0;
    margin-left: 2px;
    margin-right: 2px;
  }

  input[type="range"].TriNavZoom {
    -webkit-appearance: none;
  }

  input[type="range"].TriNavZoom:focus {
    outline: none;
  }

  input[type="range"].TriNavZoom::-webkit-slider-runnable-track {
    background: black;
    height: 2px;
  }

  input[type="range"].TriNavZoom::-moz-range-track {
    background: black;
    height: 2px;
  }

  input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 16px;
    width: 16px;
    border-radius: 8px;
    background: black;
    cursor: pointer;
    margin-top: -8px; /* You need to specify a margin in Chrome, but in Firefox it is automatic */
  }
  /* All the same stuff for Firefox */
  input[type="range"]::-moz-range-thumb {
    height: 16px;
    width: 16px;
    border-radius: 8px;
    background: black;
    cursor: pointer;
  }

  div.TriDragBox {
    border: 2px solid black;
    background-color: lightsteelblue;
    filter: alpha(opacity=40);
    -moz-opacity: 0.4;
    opacity: 0.4;
  }
}

.TriFloorPlanSkeleton {
  position: relative;
  padding: 0;
  border: none;
  color: black;
  background: #e8e8e8;
  box-shadow: none;
  pointer-events: none;

  &:hover,
  &:focus,
  &:active {
    border: none;
    cursor: default;
    outline: none;
  }

  &::before {
    position: absolute;
    width: 100%;
    height: 100%;
    animation: 3000ms ease-in-out skeleton infinite;
    color:lightgray;
    background: #c1c7cd;
    content: '';
    will-change: transform-origin, transform, opacity;

    @media (prefers-reduced-motion: reduce) {
      animation: none;
    }
  }
}
