/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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 '../../../../../variables';

.expression-entry {
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  margin-bottom: 5px;

  @include card-like;
  padding: 4px 7px;
  height: 46px;
  user-select: none;

  &.timestamp {
    background: rgba($cobalt3, 0.44);
  }

  &.dimension {
    background: rgba($green3, 0.3);

    &.bigint,
    &.float,
    &.double {
      background: rgba($blue3, 0.3);
    }
  }

  &.metric {
    background: rgba($rose2, 0.16);
  }

  .type-icon {
    position: absolute;
    top: 6px;
    left: 6px;
  }

  .output-name {
    padding-left: 20px;

    .type-name {
      opacity: 0.6;
    }
  }

  .expression {
    padding-left: 20px;
    opacity: 0.5;
    font-family: monospace;
  }

  &.selected::after {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    content: '';
    border: 2px solid $blue4;
    border-radius: $pt-border-radius;
    pointer-events: none;
  }
}
