/* Copyright (c) 2012 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

.suggestions {
  position: absolute;
  z-index: 0;
}

.suggestions {
  -webkit-box-orient: vertical;
  display: -webkit-box;
  position: absolute;
  text-decoration: none;
}

.suggestions:focus {
  outline: none;
}

.suggestions .close-button {
  -webkit-transition: opacity 150ms;
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 5;
}

html[dir=rtl] .suggestions .close-button {
  left: 0;
  right: auto;
}

.suggestions:hover .close-button {
  -webkit-transition-delay: 500ms;
  opacity: 1;
}

.suggestions .close-button:hover {
  -webkit-transition: none;
}

.suggestions .favicon {
  -webkit-margin-start: 5px;
  background: no-repeat left 50%;
  bottom: 7px;
  box-sizing: border-box;
  display: block;
  height: 16px;
  position: absolute;
  width: 16px;
}

html[dir='rtl'] .suggestions .favicon {
  background-position-x: right;
}

.suggestions .color-stripe {
  border-bottom-left-radius: 3px 3px;
  border-bottom-right-radius: 3px 3px;
  /* Matches height of title plus height of score.  */
  bottom: 36px;
  height: 3px;
  position: absolute;
  width: 100%;
  z-index: 10;
}

.suggestions .title {
  display: block;
  height: 18px;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.suggestions .score {
  display: block;
  height: 18px;
  overflow: hidden;
  text-align: center;
}

.suggestions:focus .thumbnail,
.suggestions:hover .thumbnail {
  opacity: 0.95;
}

.suggestions:focus .thumbnail-shield,
.suggestions:hover .thumbnail-shield,
.suggestions:active .thumbnail-shield {
  background: -webkit-linear-gradient(rgba(255, 255, 255, 0),
                                      rgba(255, 255, 255, 0) 80%,
                                      rgba(255, 255, 255, 0.9));
}

/* The thumbnail gets lighter when clicked, but not when the click is on the
 * close button. */
.suggestions:active .close-button:not(:active) + .thumbnail {
  opacity: 0.9;
}

/* The thumbnail gets a shadow when clicked, but not when the click is on the
 * close button. */
.suggestions:active .close-button:not(:active) + .thumbnail .thumbnail-shield {
  -webkit-box-shadow: inset 0 1px 10px rgba(0, 0, 0, 0.2);
}
