

.app {
  outline: none;
  position: absolute;
  text-align: center;
}

.app-contents {
  -webkit-transition: -webkit-transform 100ms;
}

.app-contents:active:not(.suppress-active),
.app:not(.click-focus):focus .app-contents:not(.suppress-active),
.drag-representation:not(.placing) .app-contents {
  -webkit-transform: scale(1.1);
}

/* Don't animate the initial scaling.  */
.app-contents:active:not(.suppress-active),
/* Active gets applied right before .suppress-active, so to avoid flicker
 * we need to make the scale go back to normal without an animation. */
.app-contents.suppress-active {
  -webkit-transition-duration: 0;
}

.app-contents > span {
  display: block;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-img-container {
  margin-left: auto;
  margin-right: auto;
  /* -webkit-mask-image set by JavaScript to the image source */
  -webkit-mask-size: 100% 100%;
}

.app-img-container > * {
  height: 100%;
  width: 100%;
}

.app-icon-div {
  background-color: white;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  display: -webkit-box;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  vertical-align: middle;
  z-index: 0;
  -webkit-box-align: center;
  -webkit-box-pack: center;
}

.app-icon-div .app-img-container {
  bottom: 10px;
  left: 10px;
  position: absolute;
}

.app-icon-div .color-stripe {
  border-bottom-left-radius: 5px 5px;
  border-bottom-right-radius: 5px 5px;
  bottom: 0;
  height: 3px;
  opacity: 1.0;
  position: absolute;
  width: 100%;
  z-index: 100;
}

.app-context-menu > button:first-child {
  font-weight: bold;
}

.app-context-menu {
  z-index: 1000;
}

.launch-click-target {
  cursor: pointer;
}

/* Notifications */

.app-notification {
  color: #999999;  
  display: block;
  font-size: 11px;
  white-space: nowrap;
  -webkit-transition: color 150ms linear;
}

.app-notification:hover {
  text-decoration: underline;
}

/* Promo */
/* Show the promo if the webstore has a promo and is the only app on the page.
 */
.tile:only-of-type > .has-promo > .app-contents > span {
  display: none;
}

.tile:only-of-type > .has-promo .app-img-container > .apps-promo-logo {
  display: block;
}

.apps-promo-logo {
  display: none;
  height: 128px;
  width: 128px;
}

.tile:only-of-type > .has-promo .app-img-container > img:first-child {
  display: none;
}

.app-img-container > img:first-child {
  display: block;
}

/* TODO(estade): animation? */
.tile:only-of-type > .has-promo > .apps-promo-extras {
  display: block;
}

.apps-promo-extras {
  display: none;
  /* 128 * 5/4 */
  left: 160px;
  position: absolute;
  text-align: left;
  top: 0;
}

html[dir="rtl"] .apps-promo-extras {
  left: auto;
  right: 160px;
}

.apps-promo-heading {
  font-weight: bold;
  margin-bottom: 5px;
  -webkit-margin-start: 3px;
}

.g-button-basic {
  border-width: 6px 10px 12px 6px;
  color: #fff !important;
  display: inline-block;
  font-size: 1.3em;
  font-weight: bold;
  padding: 2px 10px;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  -webkit-border-image: url('images/app_promo_button.png') 6 10 12 6;
}

.app .invisible {
  visibility: hidden;
}
