/**
 * Copyright © 2016-2023 The Thingsboard Authors
 *
 * 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.
 */
.tb-image-cards-select.tb-form-panel {
  .tb-form-row {
    transition: all .3s;
    &.expanded {
      padding: 11px 7px 11px 16px;
    }
  }
  .tb-image-cards-value-field {
    cursor: pointer;
    user-select: none;
    input {
      cursor: pointer;
      pointer-events: none;
    }
  }
  .mat-expansion-panel {
    &.tb-settings {
      > .mat-expansion-panel-header {
        height: auto;
        .mat-content {
          margin: 0;
        }
        .tb-form-row {
          font-weight: normal;
          font-size: 16px;
          color: rgba(0, 0, 0, 0.87);
        }
        .mat-expansion-indicator {
          display: none;
        }
      }
      > .mat-expansion-panel-content {
        > .mat-expansion-panel-body {
          padding: 0 16px 16px !important;
        }
      }
    }
  }
  .tb-image-cards-option {
    width: 100%;
    height: 100%;
    cursor: pointer;
    padding: 8px 12px 12px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: start;
    position: relative;
    .tb-image-cards-option-background {
      border-radius: 4px;
      position: absolute;
      top: 1px;
      left: 1px;
      right: 1px;
      bottom: 1px;
      background: rgba(0, 0, 0, 0.04);
    }
    &:before {
      content: unset;
      border-radius: 4px;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
    }
    .tb-image-cards-option-title {
      z-index: 1;
      font-size: 12px;
      font-style: normal;
      font-weight: 400;
      line-height: 16px;
      letter-spacing: 0.25px;
      color: rgba(0, 0, 0, 0.54);
    }
    .tb-image-cards-option-image-container {
      z-index: 1;
      flex: 1;
      width: 100%;
      min-height: 0;
      display: flex;
      justify-content: center;

      .tb-image-cards-option-image {
        max-width: 100%;
        max-height: 100%;
      }
    }
    &.selected {
      .tb-image-cards-option-background {
        background: #305680;
        opacity: 0.04;
      }
      &:before {
        content: "";
        border: 1px solid #305680;
        opacity: 0.32;
      }
      .tb-image-cards-option-title {
        font-size: 13px;
        font-weight: 500;
        color: #305680;
      }
    }
  }
}
