/**
 * 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.
 */

.preset-field {
  display: flex;
  .formly-field {
    flex-grow: 1;
  }
  .save-button {
    margin: calc(1em - 21px) 0 0 0.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.1;
    &:hover {
      opacity: 1;
    }
  }
}

::ng-deep .preset-dropdown {
  transform: translateY(4px) !important;
  &.no-results {
    display: none;
  }
  .preset-menu {
    max-height: 150px;
    overflow: auto;
  }
  .preset-dropdown-item {
    pointer-events: auto;
    display: flex;
    .dropdown-entry {
      flex-grow: 1;
      display: flex;
      overflow: hidden;
      .title {
        text-align: left;
        margin-right: 0.8em;
        font-size: 1.1em;
        text-overflow: ellipsis;
        overflow: hidden;
      }
      .description {
        flex-grow: 1;
        font-size: 0.7em;
        text-align: right;
        color: rgba(0, 0, 0, 0.45);
        font-style: italic;
        text-overflow: ellipsis;
        overflow: hidden;
        padding-right: 0.2em;
      }
    }
    .delete-button {
      margin: 0 0 0 0.5em;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0.1;
      &:hover {
        opacity: 1;
      }
    }
  }
}
