/*
 * Copyright 2017-2020 EPAM Systems, Inc. (https://www.epam.com/)
 *
 * 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.
 */

.card {
  cursor: pointer;
  flex-grow: 1;
  position: relative;
  overflow: hidden;
}

.cards-panel-container {
  height: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
}

.actions-container {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  text-align: right;
  padding: 5px 5px 5px 15px;
  overflow: hidden;
  min-width: 100px;
  opacity: 0;
  -webkit-transition: opacity 250ms;
  -moz-transition: opacity 250ms;
  -ms-transition: opacity 250ms;
  -o-transition: opacity 250ms;
  transition: opacity 250ms;
  display: flex;
  flex-direction: column;
}

.actions-container-background {
  position: absolute;
  top: -10px;
  left: 15px;
  right: -10px;
  bottom: -10px;
  filter: blur(7px);
  -webkit-transition: background-color 250ms;
  -moz-transition: background-color 250ms;
  -ms-transition: background-color 250ms;
  -o-transition: background-color 250ms;
  transition: background-color 250ms;
}

.action-button {
  z-index: 1;
}

.action-button span,
.action-button i {
  text-transform: uppercase;
  font-weight: bold;
  margin-left: 5px;
  z-index: 1;
  -webkit-transition: color 250ms;
  -moz-transition: color 250ms;
  -ms-transition: color 250ms;
  -o-transition: color 250ms;
  transition: color 250ms;
}

.actions-container:hover > .actions-container-background,
.actions-container.hovered > .actions-container-background {
  opacity: 1;
}

.actions-container:hover .action-button span,
.actions-container:hover .action-button i {

}

.card:hover .actions-container {
  opacity: 1;
}

.actions-container.hovered {
  opacity: 1;
}

.action-button:hover span {
  text-decoration: underline;
}

.action-button.disabled:hover span {
  text-decoration: none;
}

.card .card-content {
  height: 100%;
  position: relative;
  left: 0;
}

.card.favourite-item .card-content,
.card.not-favourite-item.favourite-enabled:hover .card-content {
  left: 28px;
}

.card-content:hover span[type=main] {
  text-decoration: underline;
}

.card-favourite-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 20px;
  width: 38px;
  opacity: 0;
}

.card.favourite-item .card-favourite-container,
.card.not-favourite-item.favourite-enabled:hover .card-favourite-container {
  opacity: 1;
  left: 0;
}

.favourite-selector,
.not-favourite-selector {
  color: orangered;
  left: 10px;
}

.favourite-item .not-favourite-selector,
.favourite-item .card-favourite-container:hover .favourite-selector {
  display: none;
}

.favourite-item .favourite-selector,
.favourite-item .card-favourite-container:hover .not-favourite-selector {
  display: block;
}

.not-favourite-item .favourite-selector,
.not-favourite-item .card-favourite-container:hover .not-favourite-selector {
  display: none;
}

.not-favourite-item .not-favourite-selector,
.not-favourite-item .card-favourite-container:hover .favourite-selector {
  display: block;
}

.blink {
  animation: blink-animation 1s infinite;
  -webkit-animation: blink-animation 1s infinite;
}

@keyframes blink-animation {
  from {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@-webkit-keyframes blink-animation {
  from {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}
