/* Light mode colors */
:root{
  --main-color: #005799;
  --base-color: white;
  --base-variant: #eee;

  --text-color-primary: #000;
  --text-link-color: #005799;

  --button-text: white;
  --button-hover: #00467a;
  --button-disabled-color: #CCCCCC;
  --button-disabled-text: #888888;

  --img-border-color: #005699;
  --changelog-img-border: #d8d8d8;
  --changelog-img-shadow: rgba(0, 0, 0, 0.3);
  --carrousel-img-shadow: rgba(0, 0, 0, 0.8);
}

/* Dark mode colors */
@media (prefers-color-scheme: dark) {
  :root{
    --main-color: #012540;
    --base-color: #1e1e1e;
    --base-variant: #252728;
  
    --text-color-primary: #fff;
    --text-link-color: #89c4ff;
  
    --button-text: white;
    --button-hover: #00467a;
    --button-disabled-color: #8f8f8f;
    --button-disabled-text: #ffffff;
  
    --img-border-color: #005699;
    --changelog-img-border: #222222;
    --changelog-img-shadow: rgba(0, 0, 0, 0.3);
    --carrousel-img-shadow: rgba(255, 255, 255, 0.8);
  }
  
  :root hr {
    color: var(--secondary-color);
    background-color: var(--secondary-color);
  }

  :root img.dark-invert, :root #toggles #togglesKeys button {
    filter: invert(1);
    user-select: none;
  }
}

/* Element styling */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text-color-primary);
  background: var(--main-color);
  margin-top: 20px;
}

h1 {
  color: var(--text-color-primary);
  font-size: 2.3em;
}

a:link,
a:visited,
a:hover {
  color: var(--text-link-color);
  text-decoration-style: dotted;
  text-decoration-thickness: 1px;
}

table {
  border: 2px solid var(--base-variant);
}

th {
  text-align: left;
  background-color: var(--base-variant);
}

th,
td {
  padding: .2em .5em;
}

/* Common use classes */
.clear {
  clear: both;
}

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

.flex {
  display: flex;
  flex-direction: row;
  gap: 1em;
}

.flex>* {
  margin: auto;
}

.content {
  padding-bottom: 10px;
}

.content img {
  max-width: 100%;
}

.content.listings img {
  width: 16px;
}

.changelog ul img {
  box-shadow: 5px 5px 5px 0px var(--changelog-img-shadow);
  margin: 1em;
  border: 1px solid var(--changelog-img-border);
}

.text-decor-none {
  text-decoration: none;
}

.button-link {
  text-decoration: none;
}

.button {
  background-color: var(--main-color);
  border: none;
  border-radius: 15px;
  color: var(--button-text);
  padding: 16px;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  font-size: 16px;
  margin: 4px 2px;
  transition-duration: 0.4s;
  cursor: pointer;
  max-width: 100%;
  width: 400px;
}

.button:hover {
  background-color: var(--button-hover);
}

.button[disabled] {
  background-color: var(--button-disabled-color);
  color: var(--button-disabled-text);
}

.button[disabled] img {
  filter: grayscale(1);
}

.button img,
.button span {
  vertical-align: middle;
  padding: 0px 5px;
}

/* List modifiers */
ul.no-markers {
  list-style-type: none;
  padding: 0;
}

ul.padded {
  padding-left: .8em;
}

/* Content styling */
.container {
  max-width: 1000px;
  min-height: 50px;
  color: var(--text-color-primary);
  background-color:  var(--base-color);
  border-radius: 20px;
  margin: 0 auto;
  margin-bottom: 40px;
  padding: 20px 40px;
}

.container>.content,
.container>.question {
  word-wrap: break-word;
  margin: 0 auto;
}

.container.align-center>.content,
.container.align-center>.question {
  max-width: 70ch;
}

.display {
  text-align: center;
  margin: 1em 0;
}

.display>img {
  margin: 0 auto;
  border: 10px solid var(--img-border-color);
  border-radius: 20px;
  max-width: 400px;
  width: 90%;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
}

.header>div {
  display: flex;
  gap: 10px;
}

.header>div:first-child {
  text-align: left;
}

.header>div:last-child {
  text-align: right;
}

.subtitle {
  font-size: 2.5em;
  font-weight: 600;
  display: block;
  width: 100%;
  text-align: center;
  margin: 0 auto;
  margin-bottom: 0.83em;
  max-width: 600px;
}

.question {
  font-weight: 600;
  font-size: 1.2em;
  display: block;
  padding-bottom: 15px;
}

.no-wrap {
  white-space: nowrap;
}

.browser-icon {
  height: 1em;
  padding-left: 10px;
  vertical-align: middle;
}

@media (max-width: 800px) {
  .subtitle {
    font-size: 2em;
  }

  .header {
    flex-direction: column;
  }

  .header>div:first-child,
  .header>div:last-child {
    text-align: center;
  }

  .container {
    padding: 20px;
  }

  .flex {
    flex-direction: column;
  }
}

div.scroll {
  position: relative;
  height: 64px;
  background-color: transparent;
  overflow: hidden;
  z-index: 1;
  margin: 0 20px;
  padding: 10px 0;
}

.m-scroll1 {
  overflow: hidden;
  white-space: nowrap;
  animation: scrollText1 60s linear infinite alternate;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  margin: 0;
  font-size: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  width: fit-content;
}

.m-scroll2 {
  overflow: hidden;
  white-space: nowrap;
  animation: scrollText2 60s linear infinite alternate;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  margin: 0;
  font-size: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-around;
  width: fit-content;
}

div.scroll img {
  display: inline-block;
  max-width: 64px;
  max-height: 64px;
  padding: 4px 10px;
  filter: drop-shadow(1px 1px 1px var(--carrousel-img-shadow));
}
div.scroll abbr {
  display: flex;
  align-items: center;
}

@keyframes scrollText1 {
  from {
    transform: translateX(0%);
  }

  to {
    transform: translateX(-50%);
  }
}

@keyframes scrollText2 {
  from {
    transform: translateX(-50%);
  }

  to {
    transform: translateX(0%);
  }
}
