// Copyright (C) 2021 The Android Open Source Project
//
// 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.

.pf-flags-page {
  &__card--changed {
    border-left: solid 3px var(--pf-color-primary);
  }

  &__flag-id {
    font-size: 0.7em;
    color: var(--pf-color-text-muted);
    font-family: var(--pf-font-monospace);
    margin-bottom: 6px;
  }

  &__description {
    font-size: smaller;
  }

  &__link-button {
    visibility: hidden;
  }
}

.pf-card:hover .pf-flags-page__link-button {
  visibility: visible;
}

.pf-flags-page {
  &__footer {
    margin-top: 12px;
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
  }

  // Highlight the focused flag when navigating directly to it
  &__card--focused {
    background-color: color-mix(
      in srgb,
      var(--pf-color-highlight) 70%,
      transparent
    );
    animation: highlight-flash 1s ease-out;
  }
}

@keyframes highlight-flash {
  0% {
    background-color: transparent;
  }
  30% {
    background-color: var(--pf-color-highlight);
  }
  100% {
    background-color: color-mix(
      in srgb,
      var(--pf-color-highlight) 70%,
      transparent
    );
  }
}
