/* ----------------- MAIN ----------------- */

@font-face {
  font-family: "Futura";
  src: local("fonts/futura_bold.otf");
}

:root {
	--text: rgba(255, 255, 255, 0.85);
	--main: rgba(232, 158, 68, 1);
	--main2: rgba(244, 108, 59, 1);
  --main3: rgb(242, 154, 65, 0.7);
  --main4: rgba(171, 102, 33, 0.5);
	--bg: #272a30;
  --bg2: rgba(0, 0, 0, 0.5);
  color-scheme: light only; /*Prevents dark mode from activating on mobile*/
}

html {
  height: 100%;
}

body {
  background: var(--bg);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

header {
  display: flex;
  z-index: 999;
}

header h1 {
  margin-top: 0.4em;
}

header #links {
  text-transform: uppercase;
  margin-left: auto;
}

header #links ul {
  display: flex;
  border-bottom-left-radius: 20px;
  padding: 25px;
  font-size: 14px;
  background: rgba(0, 0, 0, .4);
  margin: 0;
}

header #links li {
  display: flex;
  margin: 0 2em 0 2em;
  cursor: pointer;
}

header #links li a {
  display: flex;
  text-decoration: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

header #links .clock {
  position: relative;
  bottom: 0.5em;
}

header #links .fa-circle-info {
  margin-bottom: 0.3em;
  font-size: 30px;
}

html, body, div, h1, h2 {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
	font-family: Arial;
  color: var(--text);
}

hr {
  width: 100%;
  color: var(--main);
  opacity: 0.3;
  box-sizing: border-box; /*Prevents overflowing*/
  margin-top: 1em;
}

h1 {
  font-size: 30px;
  font-weight: bold;
  position: relative;
  text-align: left;
  left: 2em;
  max-width: 90%;
  white-space: nowrap;
  margin-bottom: 0.5em;
}

h1 img {
  display: inline-block;
  vertical-align: middle;
  z-index: 999;
  position: relative;
}

h1 span {
  margin: 0 auto;
  display: inline-block;
  vertical-align: middle;
}

h2 {
  font-size: 28px;
  font-family: "Inter", sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  margin: 6vh 0 4vh 0;
  padding: 7px;
  background: var(--bg2);
  text-align: center;
}

h2 span {
  font-size: 20px;
  color: #ccc;
}

ul {
  position: relative;
  margin: 1em 1em 1.5em -0.5em;
}

li:not(.select2-results__option) {
  margin-top: 0.5em;
}

input, select {
  padding: 10px;
  border-radius: 4px;
  border: none;
  background: #222222;
  color: #fff;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease-in-out;
}

select {
  width: 90%;
}

select:disabled {
  opacity: 0.5;
}

input:focus, select:focus {
  outline: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

label {
  font-weight: bold;
  margin-top: 30px;
  text-align: center;
}

button {
  padding: 12px;
  background: rgba(100, 92, 88, 1);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: rgba(244, 108, 59, 0.8);
}

button:disabled,
button.disabled {
  background: dimgrey;
  opacity: 0.5;
  cursor: auto;
}

button[data-active="active"] {
  background: var(--main2);
}

footer {
  background: rgba(0, 0, 0, .4);
  height: 50px;
  width: 100%;
  position: relative;
  margin-top: auto;
}

footer p {
  color: var(--text);
	font-size: 16px;
	text-align: center;
}

footer a {
  font-weight: normal;
}

table {
  width: 100%;
  table-layout: fixed;
}

th, td {
  padding: 8px;
  text-align: left;
}

th {
  background: var(--main3);
  color: var(--text);
  top: 0;
  position: sticky;
}

th:hover:not(:last-child) {
  /* Set cursor to pointer for sorting columns except copy */
  cursor: pointer;
  background: rgba(232, 158, 68, 0.9);
}

td {
  word-break: break-word;
}

tbody tr:hover, tbody tr:nth-child(odd):hover {
  background: var(--main4);
}

tbody tr:nth-child(odd) {
  background: rgba(0, 0, 0, 0.3);
}

svg {
  display: flex;
}

mark {
  background: var(--main);
}

a {
  color: var(--main);
  font-weight: 600;
}

a:hover {
  color: var(--main2);
}

.no-margin {
  margin: 0;
}

.donators-list li {
  list-style-type: none;
  text-align: left;
}

#hamburger-container {
  display: none;
}

#logo-title {
  font-weight: bold;
}

#logo-subtitle {
  font-size: 20px;
  font-weight: normal;
  margin: 0 auto;
}

#header-link {
  font-weight: normal;
  color: var(--text);
  text-decoration: none;
}

#header-link:hover {
  color: inherit;
}

.normal-link {
  font-weight: normal;
  color: var(--text);
}

.edoyen-link {
  font-weight: normal;
  color: var(--text);
  text-decoration-color: white;
}

.edoyen-link:hover {
  color: white;
}

.short-text,
.very-short-text {
  display: none;
}

#toast-container {
  display: none;
  z-index: 999;
  position: fixed;
  bottom: 0px;
  left: calc(50% - 40px);
  max-width: 300px;
}

#toast {
  background: #1e1e1e;
  color: #fff;
  padding: 10px 15px;
  border-radius: 4px;
  margin-top: 0.5rem;
  opacity: 1;
}

#tip-tap {
  display: none;
  border-radius: 3px;
  margin-top: 1em;
  font-size: 1.2em;
  padding: 7px;
  background: rgba(155, 106, 57, 0.7);
  text-align: center;
}

.home-btn {
  width: 100px;
  margin: 0 auto;
}

/* ----------------- SEARCH FORM AND SEARCH OPTIONS ----------------- */

#search-form-container {
  display: flex;
  justify-content: center;
  z-index: 1;
  position: relative;
  text-align: center;
  position: relative;
  bottom: 4em;
}

#search-form {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  justify-content: space-between;
  width: 100%;
  max-width: 800px;
  padding: 20px 0 0 0;
  background: #393d46;
  border-radius: 20px;
  border: var(--main) 1px solid;
  box-shadow: 0 0 15px var(--main3);
}

#search-bar {
  background: #393d46;
  max-width: 50%;
  margin: 0 auto;
}

#term {
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  padding: 10px;
  margin-left: -40%;
  margin-bottom: 1em;
  width: 173%;
  height: 20px;
}

#term:hover, #term:focus {
  border: 1px solid var(--main);
}

#search-langs-container {
  display: flex;
  align-items: flex-start; /* unstretch swap lang button */
  justify-content: center;
  margin: 0 auto;
  gap: 2em;
}

#target-lang, #source-lang {
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
  margin-right: 10px;
  padding: 10px;
}

#swap-btn {
  margin-top: 2em;
  padding-left: 2em;
  padding-right: 2em;
}

#swap-btn .fa-solid {
  font-size: 1.3em;
}

.toggle {
  height: 0;
  width: 0;
  visibility: hidden;
}

label[for="toggle-glossary"],
label[for="toggle-tm"] {
  margin: 0 auto;
  margin-top: 12px;
  cursor: pointer;
  text-indent: -9999px;
  width: 60px;
  height: 31px;
  background: grey;
  display: block;
  border-radius: 100px;
  position: relative;
}

label[for="toggle-glossary"]:after,
label[for="toggle-tm"]:after {
  content: "";
  position: absolute;
  top: 3px;
  left: 2px;
  width: 25px;
  height: 25px;
  background: #fff;
  border-radius: 90px;
  transition: 0.3s;
}

.toggle:checked + label[for="toggle-glossary"],
.toggle:checked + label[for="toggle-tm"] {
  background: var(--main);
}

.toggle:checked + label[for="toggle-glossary"]:after,
.toggle:checked + label[for="toggle-tm"]:after {
  left: calc(100% - 2px);
  transform: translateX(-100%);
}

#result-count-tm,
#result-count-glossary {
  margin-left: auto;
}

#result-filter {
  display: flex;
  flex-wrap: wrap;
  margin-top: 10px;
  width: 100%;
  background: #393d46;
  border-radius: 20px;
}

#result-filter > * {
  flex: 1 1 80px;
}

#result-filter h3 {
  margin-bottom: 0;
}

#result-filter > div {
  background: var(--bg2);
}

#result-filter-glossary,
#result-filter-tm {
  border-radius: 10px 0 0 0;
  flex-basis: 49%;
  display: flex;
  flex-wrap: wrap;
}

#result-filter-glossary {
  border-right: 1px solid #ccc;
  border-radius: 10px 0 0 0;
}

#result-filter-tm {
  border-radius: 0 10px 0 0;
}

#result-filter select, #target-lang, #source-lang, #term {
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s ease-in-out;
  margin-top: 0.5em;
  padding: 10px;
  font-size: 16px;
}

#result-filter select:hover, #result-filter select:focus,
#target-lang:hover, #target-lang:focus,
#source-lang:hover, #source-lang:focus {
  border-color: var(--main);
}

#result-count-glossary {
  margin-right: 10%;
  width: 20%;
  height: 40px;
}

#result-count-tm {
  margin-right: 10%;
  width: 20%;
}

label[for="result-count-glossary"], label[for="result-count-tm"] {
  margin-right: 0;
}

label[for="exact-match-glossary"], label[for="exact-match-tm"] {
  position: relative;
  left: 10px;
}

#period-container {
  display: flex;
  gap: 100px;
  margin: 10px auto 10px auto;
}

.period-description {
  flex-basis: 100%;
  margin: 0.2em 0 0.5em 0;
}

.polygon {
  margin-right: 0.5em;
  vertical-align: middle;
}

#mark-results-container {
  display: none;
  margin-bottom: 10px;
}

#exact-match-container {
  padding-bottom: 10%;
}

#search-btn {
  flex-wrap: wrap;
  flex: 0 0 100%;
  border-radius: 0 0 20px 20px;
}

#search-btn:hover > .fa-fire-flame-curved {
  color: orange;
}

#search-options-container, #search-filters-container {
  width: 100%;
  border-top: 2px solid #ccc;
  padding-bottom: 10px;
}

#search-options-container {
  display: flex;
  flex-direction: column;
}

#search-options-title {
  text-align: center;
  font-size: 18px;
  margin: 15px;
  width: 100%;
}

.search-options-subtitle {
  font-weight: bold;
}

#search-buttons-container {
  display: flex;
  justify-content: center;
}

.search-buttons {
  flex-grow: 1;
}

.search-option, .search-filter, .additional-match-option {
  padding: 0;
  margin: 0;
  background: rgba(0, 0, 0, .3);
  padding: 3px;
}

#search-filters-container {
  display: none;
  flex-wrap: wrap;
  flex: 0 0 100%;
  justify-content: center;
}

/* ----------------- SEARCH RESULTS AND LOADER ----------------- */

#no-results {
  display: none;
  flex-direction: column;
  align-items: center;
  font-weight: bold;
  background: #b85656;
  color: #fff;
  padding: 10px;
  border-radius: 7px;
  width: 50%;
  margin: 0px auto;
}

#glossary-title {
  margin-top: 0.5em;
}

#glossary-title, #tm-title {
  text-transform: none;
}

.hidden {
  display: none;
}

.block {
  display: block;
}

#tm-results, #glossary-results {
  display: none;
}

#tm, #glossary {
  border-collapse: collapse;
  width: 70%;
  margin-top: 20px;
  margin: 0 auto;
  overflow-y: scroll;
  max-height: 400px;
}

#tm {
  margin-bottom: 60px;
}

#glossary th:nth-child(1), #glossary th:nth-child(2) {
  width: 20%;
}

#loader {
  display: none;
  margin: 0 auto;
  border: 10px solid #f3f3f3;
  border-top: 10px solid var(--main);
  border-radius: 50%;
  width: 4em;
  height: 4em;
  animation: spin 1.5s linear infinite;
}

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

.source-lang-label, .target-lang-label {
  font-size: 14px;
}

/* This is ugly, but FA won't let me do otherwise... */
/* todo: replace this with custom SVG icons */
.fa-caret-down, .fa-caret-up {
  display: none !important;
}

.caret-force-visible {
  display: inline-block !important;
}

.fa-copy {
  cursor: pointer;
  float: right;
  font-size: 20px;
  margin-right: 20px;
}

.copied {
  color: var(--main);
}

.vscode-icon {
  height: 30px;
  width: 30px;
  vertical-align: middle;
  margin-right: 0.8em;
}

/* ----------------- SEARCH RESULTS TWO-COLUMN LAYOUT ----------------- */

#results.two-col {
  display: flex;
}

#glossary-results.two-col {
  border-right: 0.25em solid rgba(255, 255, 255, 0.1);
  border-top: 0.25em solid #3e434c;
}

#tm-results.two-col {
  border-top: 0.25em solid #3e434c;
}

#tm-title.two-col,
#glossary-title.two-col {
  margin: 0;
}

#tm.two-col,
#glossary.two-col {
  width: 100%;
  margin: initial;
}

#tm.two-col thead,
#glossary.two-col thead {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* ----------------- ERROR/WARNING MESSAGES ----------------- */

.banner {
  position: relative;
  display: none;
  align-items: center;
  color: #fff;
  padding: 5px 10px;
  font-size: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
}

#error-banner {
  background: #e14d4d;
}

#info-banner {
  background: #4d4de1;
}

#success-banner {
  background: #469846;
}

#error-banner .fa, #info-banner .fa,
#success-banner .fa {
  margin-right: 10px;
}

#error-banner p, #info-banner p,
#success-banner p {
  margin: auto;
  text-align: center;
}

#error-banner a, #info-banner a,
#success-banner a {
  color: rgba(255, 255, 255, .95);
}

#error-banner a:hover, #info-banner a:hover,
#success-banner a:hover {
  color: white;
}

#close-error, #close-info {
  cursor: pointer;
  font-size: 30px;
  position: relative;
  left: 1em;
}

/* ----------------- CHANGELOG ----------------- */

#changelog-title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 0.5em;
  margin-bottom: 0.4em;
}

.clock {
  margin-right: 0.6em;
}

#contact {
  text-align: center;
  display: flex;
  justify-content: center;
}

#contact p {
  font-size: 1.1em;
  border: 1px solid white;
  border-radius: 20px;
  width: 50%;
  padding: 1em;
  background: rgba(68, 72, 80, 0.5);
  color: var(--text);
  margin: 0;
}

.blog-post {
  text-align: center;
  font-size: 17px;
}

.changelog-container {
  margin: 0 auto;
}

.changelog-version {
  display: flex;
  flex-direction: column;
  max-width: 100vh;
}

.changelog-version h3, .changelog-version span {
  text-align: center;
}

.contact {
  padding: 10px;
  background: var(--bg2);
}

.important {
  color: var(--main);
}

.date {
  color: #a4a4a4;
  position: relative;
  top: -10px;
}

.changelog-content {
  position: relative;
  bottom: 0.3em;
}

span.fire:before {
  content: url('images/new.png');
  position: relative;
  top: 7px;
  left: -5px;
}

.changelog-label {
  display: inline-block;
  color: white;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(244, 108, 59, 0.8);
  padding: 0.4em 0.5em;
  position: relative;
  left: -15px;
  top: -3px;
}

span.feature {
  background: rgba(244, 108, 59, 0.8);
}

span.data {
  background: rgba(26, 117, 156, 0.8);
}

span.languages {
  background: #3f713f;
}

b.new-title {
  color: var(--main);
}

b.data-title {
  color: rgba(78, 202, 255, 0.9);
}

ul li:not(ul ul li) {
  list-style-type: disc;
}

ul ul:before {
  content:'';
  border-left: 1px solid white;
  position: absolute;
  height: 100%;
  left: 0;
}

li {
  list-style: square;
}

/* ----------------- ABOUT ----------------- */

#contact-form, #about-content, #faq-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#about-title {
  margin-top: 0.5em;
}

#about-title, #contact-title {
  margin-bottom: 0;
}

#about-title .fa-circle-info {
  color: var(--main);
  margin-right: 0.3em;
}

#about-subtitle {
  font-size: 24px;
  width: 55%;
  text-align: center;
  padding-top: 2em;
}

#about-content {
  background-image: linear-gradient(to right bottom, #ea6756, #8B3125, #30324e, #1a2c3c, #152328, #171818, #131414, #0e0e0f, #080708, #000000);
}

#core-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
  gap: 40px;
  padding-bottom: 2em;
}

.core-features-text {
  text-align: center;
  flex-basis: 20%;
}

.core-features-text h3 {
  text-transform: uppercase;
  text-shadow: 0px 0px 23px orange;
  font-size: 18px;
  color: var(--main);
  border-bottom: 1px solid orange;
  padding-bottom: 1em;
}

.core-features-text p {
  font-size: 18px;
  color: var(--text);
}

#faq-content {
  display: flex;
  margin: 0 auto;
  max-width: 50%;
  text-align: center;
  font-size: 17px;
  line-height: 1.5em;
}

#faq-content h3 {
  margin-bottom: 0.3em;
}

.bmc-btn {
  height: 45px !important;
}

.bmc-btn:hover {
  color: white;
}

.bmc-btn-text {
  width: auto !important;
}

#contact-form input,
#contact-form textarea {
  border: 2px solid grey;
  border-radius: 4px;
  transition: 180ms box-shadow ease-in-out;
  background: linear-gradient(107deg, rgba(34,28,28,1) 59%, rgba(19,25,23,1) 100%);
  color: white;
  text-align: center;
}

#contact-form input:focus,
#contact-form textarea:focus {
  border: 3px solid var(--main);
  outline: 3px solid transparent;
}

#contact-form textarea {
  text-align: left;
  font-size: 16px;
  padding: 0 0.25em 0 0.25em;
  width: 600px;
  height: 200px;
  max-width: 90%;
}

#send-btn {
  padding: 10px 40px 10px 40px;
  font-size: 16px;
  margin: 1em 0 2em 0;
}

/* ----------------- MEDIA QUERIES ----------------- */

@media (max-width: 1700px) {

  #search-form-container {
    bottom: 0;
  }

}

@media (max-width: 768px) {

  input, select {
    margin-right: 0;
  }

  header h1 {
    margin-top: 0;
  }

  header #links {
    display: none;
  }

  h1 {
    left: 0;
    top: 0;
  }

  h2 {
    margin: 0.3em 0 0.3em 0;
  }

  #hamburger-container {
    display: flex;
    justify-content: space-between;
  }

  #hamburger.inactive {
    transition: all 0.4s linear;
  }

  #hamburger.inactive > * {
    display: none;
  }

  #hamburger.active {
    transition: background 0.4s linear;
    margin: auto;
    background: var(--bg2);
    width: 100%;
    height: 100%;
    padding-top: 1em;
    padding-bottom: 1em;
    text-align: center;
    margin-bottom: 1em;
  }

  #hamburger #vertical-line {
    position: relative;
    top: 0.2em;
  }

  #hamburger a {
    text-transform: uppercase;
    text-decoration: none;
    color: white;
  }

  #hamburger-btn {
    cursor: pointer;
    position: absolute;
    right: 0.7em;
    color: white;
    font-size: 35px;
    margin-top: 0.3em;
    z-index: 9999;
  }

  #tm, #glossary {
    width: 100%;
  }

  #faq-content {
    max-width: 100%;
  }

  .short-text {
    display: inline-block;
  }

  .full-text {
    display: none;
  }

}

@media (max-width: 480px) {

  header {
    display: flex;
    justify-content: center;
  }

  header #links {
    display: none;
  }

  input, select {
    font-size: 12px;
    padding: 6px;
  }

  button {
    margin-right: auto;
    margin-left: auto;
  }

  h1 span {
    display: inline;
  }

  #close-error, #close-info {
    left: 0;
  }

  #search-langs-container {
    gap: 0;
  }

  #source-lang, #target-lang {
    margin-left: 0;
    margin-right: 0;
  }

  #swap-btn {
    padding-left: 1em;
    padding-right: 1em;
    margin-top: 1.8em;
  }

  label[for="toggle-glossary"], label[for="toggle-tm"] {
    margin-right: 1em;
    margin-left: 0;
  }

  #result-count-tm,
  #result-count-glossary {
    width: 30%;
  }

  #result-count-tm {
    margin-right: 5%;
  }

  #period-container {
    gap: 5px;
  }

  #search-form {
    padding: 10px;
    width: 80%;
  }

  .search-options-subtitle {
    padding-top: 1em;
  }

  .caret-force-visible {
    /* Show caret below table heading */
    display: block !important;
  }

  .search-buttons:nth-child(2),
  .search-buttons:nth-child(3) {
    position: relative;
    bottom: 17px;
  }

  .short-text {
    display: none;
  }

  .very-short-text {
    display: inline-block;
  }

@media (max-width: 320px) {

  #hamburger.active {
    text-align: left !important;
  }

  #hamburger a:first-child {
    margin-left: 1em;
  }

}

}