html {
  padding-bottom: 20px;
}

body {
  overflow-x: hidden;
  overflow-y: scroll;
  font-family: sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

label, p, a {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1.4;
  font-family: sans-serif;
}

a {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}

input[type=radio], input[type=checkbox] {
  margin-right: 5px;
}

.ps-input {
  color: inherit;
  border-radius: 2px;
  border: 1px solid #333;
  padding: 5px;
  outline: 0;
}

.ps-button {
  color: inherit;
  border-radius: 2px;
  border: 1px solid #333;
  cursor: pointer;
  padding: 5px;
  outline: 0;
}

.ps-button--active {
  cursor: default;
}

.ps-button--large {
  padding: 10px;
}

.ps-button-bar {
  position: fixed;
  top: 34px;
  right: 0;
  left: 0;
  z-index: 5;
  transform: translateZ(0);
  font-size: 0;
}

.ps-button-bar + .content {
  padding-top: 60px;
}

.ps-button-bar.hidden + .content {
  padding-top: 35px;
}

.search.hidden ~ .content {
  padding-top: 0;
}

.ps-button-bar .ps-button {
  font-weight: bold;
  border-radius: 0;
  width: 33.33333%;
  border-left-width: 0;
  border-right-width: 0;
}

.ps-button-bar .ps-button:not(:first-child) {
  border-left-width: 1px;
}

.hidden {
  display: none !important;
}

.container {
  margin: 10px;
}

.popular-searches__title {
  margin-bottom: 5px;
}

.popular-searches a {
  display: inline-block;
  margin-right: 8px;
  line-height: 1.2;
}

.search {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 5;
  transform: translateZ(0);
}

.search__input {
  padding: 10px 10px 10px 30px;
  margin-bottom: -1px;
  width: 100%;
  border-radius: 0;
}

.search__icon {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 25px;
}

.search__icon--back {
  cursor: pointer;
}

.search__icon--back .search__icon-search {
  display: none;
}

.search__icon--back .search__icon-back {
  display: block;
}

.search__icon-search {
  fill: currentColor;
  width: 24px;
  height: 24px;
  margin-top: 6px;
  margin-left: 5px;
}

.search__icon-back {
  display: none;
  fill: currentColor;
  width: 20px;
  height: 20px;
  margin-top: 8px;
  margin-left: 7px;
}

.is-downloading {
  overflow: hidden;
}

.is-downloading .downloading-message {
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
}

.downloading-message {
  display: none;
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: rgba(0, 0, 0, .7);
  font-weight: bold;
  text-align: center;
  color: #fff;
  font-size: 20px;
  line-height: 1.5;
  -webkit-flex-direction: column;
  flex-direction: column;
  -webkit-justify-content: center;
  justify-content: center;
}

.photos {
  text-align: center;
}

.photos:hover ~ .bottom-bar .bottom-bar__size {
  opacity: 1;
}

.photo-container {
  position: relative;
  margin-bottom: 5px;
  float: left;
  cursor: pointer;
}

@media (max-width: 499px) {
  .photo-container {
    float: none;
    margin-right: auto;
    margin-left: auto;
  }
}

.photo-container__photo {
  width: auto;
  height: auto;
  max-width: 100%;
}

.photo-container:hover .photo-container__button, .photo-container:hover .photo-container__actions:before {
  opacity: 1;
  transition-delay: .1s;
}

.photo-container__actions:before {
  opacity: 0;
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 50px;
  pointer-events: none;
  background: -moz-linear-gradient(top,  rgba(0,0,0,0) 0%, rgba(0,0,0,0.3) 100%);
  background: -webkit-linear-gradient(top,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 100%);
  background: linear-gradient(to bottom,  rgba(0,0,0,0) 0%,rgba(0,0,0,0.3) 100%);
}

.photo-container__button {
  opacity: 0;
  transition: opacity .3s 0s;
  margin-left: 5px;
}


.btn-like, .btn-view, .btn-insert {
  position: absolute;
  bottom: 10px;
  right: 10px;
  height: 25px;
  width: 25px;
  display: inline-block;
  padding: 0;
  margin: 0;
  outline: none;
  background: transparent;
  cursor: pointer;
  border-width: 0;
  filter: drop-shadow(0 0 2px rgba(0,0,0,.4));
}

.btn-like:after {
  display: inline-block;
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  content: "";
  border-radius: 50%;
}

.btn-like--no-animations:after {
  /* prevent animation on init */
  animation: none !important;
  -webkit-animation: none !important;
}

.btn-like__icon {
  height: 25px;
  width: 25px;
  stroke: #fff;
  stroke-width: 6px;
  fill: transparent;
}

.btn-like:hover .btn-like__icon {
  fill: rgba(255,255,255,.3);
}

.btn-like--active {
  opacity: 1;
}

.btn-like.btn-like--active .btn-like__icon {
  fill: #e74c3c;
  stroke: #e74c3c;
}

.btn-like--active:after {
  animation: like-red .4s;
  -webkit-animation: like-red .4s;
}

@keyframes like-red {
  0% {
    transform: scale(1);
    background: rgba(231, 76, 60, 1);
  }
  100% {
    transform: scale(3);
    background: rgba(231, 76, 60, 0);
  }
}

@-webkit-keyframes like-red {
  0% {
    transform: scale(1);
    background: rgba(231, 76, 60, 1);
  }
  100% {
    transform: scale(3);
    background: rgba(231, 76, 60, 0);
  }
}

.btn-view {
  right: 45px;
  bottom: 14px;
  height: 16px;
  width: 16px;
}

.btn-view__icon {
  fill: #fff;
}

.btn-view__icon {
  opacity: 1;
}

.btn-insert {
  left: 10px !important;
  bottom: 8px;
  max-width: 90%;
  max-width: calc(100% - 80px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: bold;
  width: auto;
  color: #fff;
  text-shadow: 0 0 2px rgba(0,0,0,.4);
  text-align: left;
  pointer-events: none;
}



.loading-bar, .no-results {
  position: relative;
  top: 40px;
  margin: 0 0 80px 0;
  text-align: center;
  font-weight: bold;
  font-size: 16px;
}

.no-results:not(.hidden) + .popular-searches {
  text-align: center;
}

.loading-bar__icon {
  height: 25px;
  width: 25px;
  -webkit-animation: spin .6s linear infinite;
  animation: spin .6s linear infinite;
}

@-webkit-keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}
@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}


.box-error, .box-notification {
  padding: 10px 40px;
  font-weight: bold;
  text-align: center;
  color: #fff;
}

.box-error {
  background: #e74c3c;
}

.box-notification {
  background: #2980b9;
}


.bottom-bar {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  height: 20px;
  line-height: 20px;
  padding: 0 10px;
  transform: translateZ(0);
}

.bottom-bar__size {
  width: calc(100% - 20px);
  float: left;
  opacity: 0;
  transition: opacity .1s .1s;
}

.bottom-bar__settings {
  position: relative;
  right: 6px;
  width: 20px;
  float: right;
  text-align: right;
  cursor: pointer;
}

.bottom-bar__settings svg {
  height: 16px;
  width: 16px;
  margin-top: 2px;
}

.bottom-bar__settings path {
  fill: currentColor;
}

.settings {
  display: inline-block;
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  z-index: 10;
  padding: 20px;
  box-shadow: 0 0 200px 200px rgba(0, 0, 0, 0);
  -ms-transform: translateY(100%);
  -webkit-transform: translateY(100%);
  transform: translateY(100%);
  transition: all .3s;
}

.is-settings-open {
  overflow: hidden;
}

.is-settings-open .settings {
  -ms-transform: translateY(0%);
  -webkit-transform: translateY(0%);
  transform: translateY(0%);
  box-shadow: 0 0 200px 200px rgba(0, 0, 0, .5);
}

.settings__content {
  max-height: 90vh;
  max-height: calc(100vh - 40px);
  overflow-y: scroll;
  overflow-x: hidden;
}

.settings__close {
  position: absolute;
  right: 40px;
  top: 20px;
  font-size: 20px;
  cursor: pointer;
}

.settings__group {
  margin: 10px 0 20px;
}

.settings__group:last-child {
  margin-bottom: 0;
}

.settings__group > * {
  display: block;
}

.form__group {
  margin: 20px 0;
}

.form__group > * {
  display: block;
  width: 100%;
}

.form__label {
  font-weight: bold;
}