/* http://meyerweb.com/eric/tools/css/reset/ 
   v2.0 | 20110126
   License: none (public domain)
*/

html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
h3,
h4,
h5,
h6,
p,
blockquote,
pre,
a,
abbr,
acronym,
address,
big,
cite,
code,
del,
dfn,
em,
img,
ins,
kbd,
q,
s,
samp,
small,
strike,
strong,
sub,
sup,
tt,
var,
b,
u,
i,
center,
dl,
dt,
dd,
ol,
ul,
li,
fieldset,
form,
label,
legend,
table,
caption,
tbody,
tfoot,
thead,
tr,
th,
td,
article,
aside,
canvas,
details,
embed,
figure,
figcaption,
footer,
header,
hgroup,
menu,
nav,
output,
ruby,
section,
summary,
time,
mark,
audio,
video {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  font-size: 100%;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
  display: block;
}
body {
  line-height: 1;
}
ol,
ul {
  list-style: none;
}
blockquote,
q {
  quotes: none;
}
blockquote:before,
blockquote:after,
q:before,
q:after {
  content: "";
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/***************** site styles ********************/
html {
  font-size: min(calc(1.02em + 0.5vw), 1.35em);
}

body {
  font-family: "Zilla Slab", serif;
  line-height: 1.2;
  padding: 0;
  margin: 0;
  min-width: 300px;
}

h1,
h2,
h3,
h4 {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

h1,
h3 {
  margin-top: 0.75rem;
}

h1 {
  font-size: 1.73rem;
}

h2 {
  font-size: 1.44rem;
}

h3 {
  font-size: 1.25rem;
}

h4 {
  font-size: 1.188rem;
}

p {
  margin-bottom: 1rem;
}

p,
li {
  /* These are technically the same, but use both */
  overflow-wrap: break-word;
  word-wrap: break-word;

  -ms-word-break: break-all;
  /* This is the dangerous one in WebKit, as it breaks things wherever */
  word-break: break-all;
  /* Instead use this non-standard one: */
  word-break: break-word;

  /* Adds a hyphen where the word breaks, if supported (No Blink) */
  -ms-hyphens: auto;
  -moz-hyphens: auto;
  -webkit-hyphens: auto;
  hyphens: auto;
}

ol,
ul {
  margin-bottom: 1rem;
  margin-left: 5%;
}

ul {
  list-style-type: disc;
}

ol {
  list-style-type: decimal;
}

em {
  font-style: italic;
}

button {
  font-family: "Zilla Slab", serif;
  font-size: 0.8rem;
  border-radius: 0.3rem;
}

a {
  color: #551a8b;
}

header {
  background-color: #333;
}

header h1 {
  font-size: 2.07rem;
  color: #fff;
  text-align: center;
}

header p {
  color: #fff;
  text-align: center;
}

header a,
header a:visited {
  color: #eee;
}

header form {
  margin-bottom: 1rem;
}

header input,
header button {
  display: inline-block;
  border: 0.25rem solid #888;
}

header input {
  font-size: 1.1rem;
  color: #333;
  margin: 0;
}

header button {
  border-radius: 0 0.5rem 0.5rem 0;
  margin: 0 0 0 -0.25rem;
  background-color: #fff;
  width: 3.3rem;
}

.magnifying-glass {
  fill: #888;
  stroke: #888;
}

header input[type="text"] {
  border-radius: 0.5rem 0 0 0.5rem;
  flex: 1;
}

*:focus {
  outline: none;
  background-color: #cdf;
  color: #333 !important;
}

button:active svg {
  -webkit-transform: scale(0.95);
  -ms-transform: scale(0.95);
  transform: scale(0.95);
}

button:active .magnifying-glass {
  fill: #222;
  stroke: #444;
}

header input[type="submit"]:focus {
  background-color: #79f;
}

header .beta {
  float: left;
}

header .choose-country {
  float: right;
}

header .current-flag {
  height: 0.9rem;
  border: 0.08rem solid white;
  margin-bottom: -0.15rem;
}

header .container {
  padding-top: 0.5rem;
}

footer {
  border-top: 0.15rem solid #999;
}

footer ul {
  margin-left: 0;
  list-style-type: none;
}

footer li {
  display: inline;
}

footer li:after {
  content: "  /  ";
}

footer li:last-child:after {
  content: "";
}

.hidden {
  display: none !important;
}

.visually-hidden {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.js-only {
  display: none !important;
}

.container {
  padding: 2rem 1rem 2rem 1rem;
  max-width: 1200px;
  margin: auto;
  box-sizing: border-box;
}

div.centered-no-wrap {
  display: flex;
  flex-wrap: no-wrap;
  justify-content: center;
}

h2.centered,
p.centered {
  text-align: center;
}

ul.flags-list {
  margin: 1rem auto 1rem auto;
  column-count: 3;
  list-style: none;
}

@media only screen and (max-width: 50rem) {
  ul.flags-list {
    column-count: 2;
  }
}

@media only screen and (max-width: 25rem) {
  ul.flags-list {
    column-count: 1;
  }
}

.flags-list a.flag {
  display: inline-block;
  height: 0.75rem;
  width: 1.5rem;
  margin-right: 0.25rem;
}

.flags-list a.flag img {
  height: 100%;
  object-fit: fill;
  border: 0.02rem solid #999;
}

.flags-list li {
  margin-bottom: 0.75rem;
}

.back-to-top {
  text-align: right;
}

.highlight {
  padding: 0.5rem;
  background-color: LightYellow;
}

.book {
  margin-top: 0.5rem;
  display: flex;
  align-items: flex-start;
}

.book-header-image {
  box-sizing: border-box;
  width: 7.5rem;
  margin-bottom: 2rem;
  padding-right: 1rem;
}

.book-header-image img {
  width: 100%;
}

.book-header {
  margin-bottom: 2rem;
}

.book-header h1 {
  margin-top: 0;
}

.share-buttons {
  flex-grow: 2;
  padding-left: 1rem;
}

.share-buttons img {
  width: 1.3rem;
  vertical-align: bottom;
}

.share-buttons a {
  float: right;
  position: relative;
  white-space: nowrap;
}

@media only screen and (max-width: 25rem) {
  .share-text {
    display: none;
  }
}

.tooltip-text {
  font-size: 0.8rem;
  visibility: hidden;
  background-color: #888;
  color: #fff;
  text-align: right;
  border-radius: 0.25rem;
  padding: 0.25rem;
  position: absolute;
  z-index: 1;
  bottom: 115%;
  right: 0;
  margin-left: -7.5rem;
  opacity: 0;
  max-width: 100vw;
  transition: opacity 0.3s;
}

.tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0.75rem;
  margin-left: -0.25rem;
  border-width: 0.25rem;
  border-style: solid;
  border-color: #888 transparent transparent transparent;
}
.share-buttons a:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

.notice {
  font-weight: bold;
}

.offer-search-results {
  margin-top: 1rem;
}

.search-results {
  list-style-type: none;
  margin-left: 0;
}

.search-results li {
  margin: 0 0 2rem 1rem;
}

.search-results > li {
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
}

.search-result-thumbnail {
  position: relative;
  box-sizing: border-box;
  width: 7.5rem;
  padding-right: 1rem;
}

.offer-search-results .search-result-thumbnail {
  width: 5rem;
}

.search-result-thumbnail img {
  width: 100%;
}

.search-result-header {
  box-sizing: border-box;
  max-width: 75%;
}

.search-result-header h3 {
  margin-top: 0;
}

.price span {
  font-weight: bold;
}

.offer-detail {
  margin-bottom: 0.5rem;
}

.offer-detail-note {
  margin-top: -0.25rem;
  font-size: 0.935rem;
}

.format-ribbon {
  color: white;
  font-size: 0.6rem;
  line-height: 0.85rem;
  padding: 0.25rem;
  position: absolute;
  left: -0.25rem;
  bottom: 1.25rem;
}
.format-ribbon:before,
.format-ribbon:after {
  content: "";
  position: absolute;
}
.format-ribbon:before {
  height: 0;
  width: 0;
  top: -0.25rem;
  left: 0;
  border-left: 0.25rem solid transparent;
}

.format-ribbon-ebook {
  background: #cc3333;
}

.format-ribbon-ebook:before {
  border-bottom: 0.25rem solid #660000;
}

.format-ribbon-audiobook {
  background: #3333cc;
}

.format-ribbon-audiobook:before {
  border-bottom: 0.25rem solid #000066;
}

.offer-details {
  margin-bottom: 0.75rem;
}

.offer-source p,
.offer-source li {
  margin-bottom: 0.35rem;
}

.credentials img {
  height: 0.95rem;
}

.offer-source .credentials {
  font-size: 0.85rem;
}

.offer-source .credentials img {
  height: 0.8rem;
}

.source-logo {
  height: 1rem;
}

.search-filters {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.search-filters h3 {
  margin-top: 0;
}

.search-filters ul {
  list-style-type: none;
  margin-left: 0;
}

.search-filters li {
  font-size: 0.875rem;
  margin: 0 0 0.5rem 1.4rem;
  text-indent: -1.4rem;
}

.search-filters input[type="checkbox"] {
  width: 0.935rem;
  height: 0.935rem;
}

.fade {
  opacity: 0;
  transition: opacity 0.2s;
}

sup {
  vertical-align: super;
  font-size: 0.6rem;
  margin-right: -0.05rem;
}

sub {
  vertical-align: baseline;
  font-size: 0.6rem;
  margin-left: -0.05rem;
}

@media only screen and (max-width: 599px) {
  .search-filters h3:hover {
    cursor: pointer;
  }

  .search-filters h3:after {
    content: " ↓";
  }

  .search-filters-open h3:after {
    content: " ↑";
  }

  .search-filters form {
    display: none;
  }

  .search-filters-open form {
    display: block;
  }

  .offer-search-results h3 {
    margin-bottom: 1rem;
  }
}

@media only screen and (min-width: 600px) {
  .filters-and-results-container {
    display: flex;
    align-items: flex-start;
  }

  .search-filters {
    box-sizing: border-box;
    padding-right: 1.5rem;
    border-right: 1px solid #aaaaaa;
    width: 25rem;
  }

  .offer-search-results {
    box-sizing: border-box;
    padding-left: 1.5rem;
  }

  .offer-search-results h3 {
    display: none;
  }

  .search-results > li {
    margin-left: 0;
  }
}

@media only screen and (min-width: 1000px) {
  .search-result-header {
    display: flex;
    flex: 1;
  }

  .offer-details {
    box-sizing: border-box;
    width: 60%;
    padding-right: 1rem;
  }

  .offer-source {
    box-sizing: border-box;
    width: 40%;
  }
}

code {
  font-family: monospace;
  font-size: 0.8rem;
}

#filter-status button {
  margin-left: 1rem;
}

#waiting-animation {
  position: relative;
  display: inline-block;
  width: 5em;
  height: 0.4em;
}

.waiting-animation {
  position: absolute;
  bottom: 0.03em;
  background-color: #ffffff;
  width: 0.4em;
  height: 0.4em;
  animation-name: bounce-waiting-animation;
  animation-duration: 1.505s;
  animation-iteration-count: infinite;
  animation-direction: normal;
  transform: scale(0.3);
  border-radius: 0.4em;
}

#waiting-animation-1 {
  left: 0.4em;
  animation-delay: 0.446s;
}

#waiting-animation-2 {
  left: 1.2em;
  animation-delay: 0.5525s;
}

#waiting-animation-3 {
  left: 2em;
  animation-delay: 0.659s;
}

#waiting-animation-4 {
  left: 2.8em;
  animation-delay: 0.7755s;
}

#waiting-animation-5 {
  left: 3.6em;
  animation-delay: 0.882s;
}

@keyframes bounce-waiting-animation {
  0% {
    transform: scale(1);
  }

  100% {
    transform: scale(0.3);
  }
}

.read-more__link-wrap {
  display: block;
  text-align: right;
  margin-top: -1em;
  margin-bottom: 1em;
}

.read-more__link {
  cursor: pointer;
  text-decoration: underline;
  color: #551a8b;
}
