/**
 * #.# FooGalleryModal Editor Styles
 *
 * CSS for just Backend enqueued after style.scss
 * which makes it higher in priority.
 */

.foogallery-modal__content {
  text-align: center;
}

.foogallery-modal__content-container {
  position: relative;
  display: block;
  outline: none;
}

.foogallery-modal__content-container .components-placeholder.foogallery-modal__content-placeholder {
  background-color: transparent;
  min-height: 150px;
  border: none;
  outline: none;
  box-shadow: none;
  margin: 0;
  display: flex;
  flex-direction: column-reverse;
  justify-content: center;
  align-items: center;
}

.foogallery-modal__content-placeholder .components-placeholder__fieldset {
  justify-content: center;
  align-items: center;
  margin-bottom: 10px;
}

.foogallery-modal__content-placeholder .components-placeholder__fieldset .components-spinner {
  margin: 0;
}

.foogallery-modal__content-placeholder .components-placeholder__label {
  margin-bottom: 0;
}

.foogallery-modal__footer {
  border-top: 1px solid #e2e4e7;
  padding: 0 16px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  background: #fff;
  align-items: center;
  box-sizing: border-box;
  height: 56px;
  position: -webkit-sticky;
  position: sticky;
  bottom: 0;
  z-index: 10;
  margin: 24px -24px -24px;
}

.foogallery-modal__footer-search {
  flex: 1;
}
.foogallery-modal__footer-buttons {
  display: flex;
  flex: 1;
  justify-content: flex-end;
}
.foogallery-modal__footer-buttons .components-button,
.foogallery-modal__footer-buttons .components-icon-button {
  display: inline-flex;
}
.foogallery-modal__footer-buttons .components-button {
  margin-right: 4px;
}
.foogallery-modal__footer-buttons .components-button:last-of-type {
  margin-right: 0;
}
.foogallery-modal__footer-buttons .components-button.has-icon .dashicon {
  margin-right: 0;
  margin-left: 0;
}

/* #.# FooGalleryItem Editor Styles */

.foogallery-modal__item {
  display: inline-block;
  position: relative;
  width: 150px;
  height: 150px;
  border: solid 3px #FFF;
  box-shadow: 0 0 0 1px #ccc, inset 0 0 0 1px #ccc;
  background-color: #f7f7f7;
  margin: 10px;
  cursor: pointer;
  border-radius: 3px;
  outline: none;
}
.foogallery-modal__item:focus {
  border-style: dashed;
}
.foogallery-modal__item:hover,
.foogallery-modal__item.is-selected {
  border-style: solid;
}
.foogallery-modal__item:hover,
.foogallery-modal__item:focus,
.foogallery-modal__item.is-selected {
  border-color: #0085ba;
  box-shadow: 0 0 0 1px #00648c, inset 0 0 0 1px #00648c;
  outline: none;
}
.foogallery-modal__item.is-disabled {
  border-color: #e4e4e4;
  box-shadow: 0 0 0 1px #ccc, inset 0 0 0 1px #ccc;
  cursor: not-allowed;
}

img.foogallery-modal__item-thumbnail {
  display: block;
  width: 100%;
  height: 100%;
}
.foogallery-modal__item.is-disabled  img.foogallery-modal__item-thumbnail {
  filter: grayscale(1);
}
svg.foogallery-modal__item-thumbnail {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 64px;
  height: 64px;
  fill: #CCC;
}

.foogallery-modal__item-caption {
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: auto;
  max-height: 100%;
  overflow: hidden;
  color: #FFF;
  padding: 10px 5px 5px;
  background: rgba(0,0,0,0.5);
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.5) 15px, rgba(0,0,0,0.5) 100%);
}


.dashicon.foogallery-modal__icon-selected,
.dashicon.foogallery-modal__icon-disabled {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  color: #FFF;
  width: 60px;
  height: 60px;
  font-size: 60px;
  filter: drop-shadow( 0px 0px 5px #000 );
}