@import url("https://fonts.googleapis.com/css?family=Open+Sans");

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

html,
body {
  padding: 0;
  margin: 0;
}

body {
  min-height: 100%;
  padding: 24px;
  font-size: 14px;
  line-height: 24px;
  overflow-y: scroll;
  display: flex;
  font-family: "Open Sans", sans-serif;
  background: #f0f2f5;
  flex-direction: column;
}

a {
  color: #5468ff;
}

em {
  font-style: normal;
  font-weight: bold;
  text-decoration: underline;
}

.search-container {
  flex-grow: 1;
  display: flex;
  width: 960px;
  min-height: 100%;
  margin: 0 auto;
}

@media (max-width: 1007px) {
  .search-container {
    width: 100%;
  }
}

#categories {
  margin-right: 24px;
  padding: 8px 0;
}

#categories,
.ais-hits--item,
.ais-search-box--input {
  height: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.ais-search-box--input:focus {
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

.left-panel {
  flex: 0 0 240px;
}

.right-panel {
  width: calc(100% - 256px);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

#searchbox {
  flex-grow: 0;
  margin-bottom: 8px;
}

#searchbox,
#stats {
  flex-grow: 0;
}

.ais-search-box {
  position: relative;
  height: auto;
  width: 100%;
}

.ais-search-box--magnifier,
.ais-search-box--reset {
  position: absolute;
  top: 0;
  left: inherit;
  margin: 14px 16px;
  cursor: pointer;
}

.ais-search-box--magnifier svg,
.ais-search-box--reset svg {
  width: 13px;
  height: 13px;
  display: block;
}

.ais-search-box--magnifier svg {
  fill: #5468ff;
}

.ais-search-box--reset svg {
  fill: #ed5a6a;
}

.ais-search-box--magnifier {
  right: 0;
}

.ais-search-box--reset {
  background: none;
  padding: 0;
  border: none;
  right: 30px;
}

.ais-search-box--input {
  width: 100%;
  padding: 8px 16px;
  font-weight: normal;
  border: none;
  -webkit-appearance: none;
  appearance: none;
}

#stats {
  flex-grow: 0;
  margin-bottom: 16px;
}

.ais-stats {
  font-size: 12px;
  color: #697782;
  opacity: 1;
}

#hits {
  flex-grow: 1;
}

.ais-refinement-list--header {
  font-weight: bolder;
  margin: 0;
  padding: 0 16px 8px;
  font-size: inherit;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
}

.ais-hits--item {
  margin-bottom: 24px;
}

.ais-hits--item article {
  display: flex;
}

.ais-hits--item .entry-author-content {
  font-size: 13px;
}

.ais-hits--item .post-date,
.ais-hits--item .post-meta-info {
  color: #999;
  font-size: 12px;
}

.ais-hits--item .entry-meta {
  display: flex;
}

.ais-hits--item .entry-title a {
  text-decoration: none;
}

.ais-hits--item .author-gravatar img {
  border-radius: 50%;
  margin-right: 8px;
  display: block;
}

.ais-hits--item .post-img a,
.ais-hits--item .post-img img {
  width: 180px;
  height: 230px;
  display: block;
}

@media (min-width: 768px) {
  .ais-hits--item .post-img {
    flex: 0 0 180px;
    overflow: hidden;
  }

  .ais-hits--item .post-img,
  .ais-hits--item .post-img a {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .ais-hits--item .post-img a {
    height: 100%;
  }

  .ais-hits--item .post-img img {
    width: 180px;
    height: 240px;
    display: block;
    border-radius: 8px;
    overflow: hidden;
  }
}

@media (max-width: 767px) {
  .ais-hits--item article {
    flex-direction: column;
  }
}

.ais-hits--item .post-excerpt {
  margin-bottom: 16px;
}

.ais-hits--item .entry-title {
  margin: 0 0 16px 0;
  font-size: 16px;
  font-weight: normal;
}

.ais-hits--item .post-content {
  padding: 16px;
}

.ais-refinement-list--item {
  padding: 8px 16px;
}

.ais-refinement-list--label,
.ais-refinement-list--label:hover {
  color: black;
}

.ais-refinement-list--count {
  background: none;
  padding: 0;
  font-size: 12px;
  line-height: 24px;
  color: #999;
  float: right;
}

.ais-refinement-list--checkbox {
  margin: 0;
}

.ais-refinement-list--item__active .ais-refinement-list--label,
.ais-refinement-list--item__active .ais-refinement-list--count {
  font-weight: normal;
}

.ais-pagination {
  display: flex;
  margin: 0 0 16px;
  padding: 0;
  background: none;
  list-style: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  border: none;
  box-shadow: none;
  flex-wrap: wrap;
}

.ais-pagination--item,
.ais-pagination--item__disabled {
  flex: 0 0 40px;
  width: auto;
  height: auto;
  margin: 4px;
  background-color: #5468ff;
  list-style-image: none;
  list-style-position: outside;
  list-style-type: none;
  text-align: center;
  border-radius: 4px;
  transition: all 0.1s linear;
}

.ais-pagination--item__disabled {
  display: none;
}

.ais-pagination--item:hover,
.ais-pagination--item__active {
  background-color: #3a46a1;
}

.ais-pagination--item .ais-pagination--link,
.ais-pagination--item__disabled .ais-pagination--link {
  text-decoration: none;
  color: #fff;
  line-height: 32px;
}

footer {
  flex-grow: 0;
  text-align: center;
  font-size: 12px;
  color: #999;
}

/* Placeholders */

#searchbox:empty:before,
#hits:empty:before,
#categories:empty:before,
#stats:empty:before,
#pagination:empty:before {
  display: block;
  color: #999;
  padding: 16px;
}

#searchbox:empty,
#hits:empty,
#categories:empty,
#stats:empty,
#pagination:empty {
  padding: 0;
  background: none;
  border: dashed 3px #ddd;
  box-shadow: none;
  border-radius: 4px;
}

#searchbox:empty,
#stats:empty,
#hits:empty,
#pagination:empty {
  margin-bottom: 24px;
}
