/* FIXME: refactor this stylesheet with Sass */

html, body {
  background: hsl(0, 0%, 97%);
  font-size: 12px;
  font-family: "Helvetica Neue", Arial, "Microsoft Jhenghei", sans-serif;
  margin: 0;
  min-width: 300px;
  min-height: 600px;
  padding: 0;
  outline: 0;
  user-select: none;
  padding-top: 25px;
  padding-bottom: 25px;
  overscroll-behavior: none;
}

.wrapper {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 200px;
  text-align: center;
}

p {
  line-height: 1;
  margin: 0;
}

hr {
  display: block;
  height: 0;
  border: 0;
  border-top: 1px solid hsl(0, 0%, 90%);
  border-bottom: 1px solid hsl(0, 0%, 100%);
  margin: 8px 0;
  padding: 0;
}

h1 {
  color: #db3b26;
  font-weight: bolder;
  font-size: 20px;
  margin: 16px 0 0 0;
  padding: 0;
}

header {
  font-size: 16px;
  font-weight: bold;
  color: hsl(0, 50%, 50%);
  letter-spacing: -0.5px;
  position: fixed;
  top: 0px;
  width: 100%;
  padding-top: 10px;
  padding-bottom: 6px;
  background: linear-gradient(0deg, hsla(0, 0%, 97%, 0) 0%, hsla(0, 0%, 97%, 1) 15%, hsla(0, 0%, 97%, 1.0) 100%);
}

header img {
  width: auto;
  height: 18px;
  vertical-align: text-bottom;
}

section {
  margin: 8px 0;
}

section h2 {
  color: hsl(0, 0%, 50%);
  font-size: 14px;
  margin: 0 0 12px 0;
  padding: 6px 0;
  background: hsl(0, 0%, 92%);
}

section h2.active:after {
  display: inline-block;
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 10px;
  background: hsl(120, 60%, 80%);
  margin-left: 5px;
}

a {
  color: inherit;
  text-decoration: none;
}

footer a, a#btnReset {
  color: hsl(10, 80%, 38%);
  font-weight: bold;
  outline: 0;
  transition: color .33s;
  text-decoration: none;
}

footer a:hover, a#btnReset:hover {
  color: hsl(10, 80%, 50%);
  cursor: pointer;
  text-decoration: underline;
}

footer {
  position: fixed;
  color: hsl(0, 0%, 50%);
  width: 100%;
  background: linear-gradient(180deg, hsla(0, 0%, 97%, 0) 0%, hsla(0, 0%, 97%, 1) 15%, hsla(0, 0%, 97%, 1.0) 100%);
  bottom: 0;
  padding-bottom: 10px;
  padding-top: 6px;
}

.settings-secondary-lang {
  filter: blur(6px) grayscale(100%);
  transition: all 1s;
}

.settings-secondary-lang:hover {
  cursor: not-allowed !important;
  filter: blur(0);
}

.settings-layout div,
.settings-secondary-lang div {
  color: hsl(0, 0%, 30%);
  display: inline-block;
  text-align: center;
}

.settings-layout div+div,
.settings-secondary-lang div+div {
  margin-left: 20px;
}

.settings-layout div:hover,
.settings-layout div.active
/*
.settings-secondary-lang div:hover,
.settings-secondary-lang div.active
*/
{
  color: hsl(0, 70%, 50%);
  cursor: pointer;
}

.settings-layout svg,
.settings-secondary-lang svg {
  width: 60px;
}

.settings-layout svg:hover rect,
.settings-layout div.active svg rect
/*
.settings-secondary-lang svg:hover rect,
.settings-secondary-lang svg:hover rect
*/
{
  stroke: hsl(0, 70%, 50%);
}

.settings-layout svg:hover line,
.settings-layout div.active svg line
/*
.settings-secondary-lang svg:hover line,
.settings-secondary-lang div.active svg line
*/
{
  stroke: hsl(0, 80%, 50%);
}

.font-size-list {
  display: flex;
  justify-content: center;
  align-items: center;
}

.font-size {
  position: relative;
  height: 30px;
  width: 30px;
  border: 2px solid hsl(0, 0%, 70%);
  color: hsl(0, 0%, 40%);
  border-radius: 21px;
  font-weight: normal;
  align-items: stretch;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}
.font-size + .font-size {
  margin-left: 10px;
}

.font-size:hover,
.font-size.active {
  border-color: hsl(0, 70%, 50%);
  color: hsl(0, 70%, 50%);
  cursor: pointer;
}

.font-size-xs { font-size:  8px; }
.font-size-s  { font-size: 12px; }
.font-size-m  { font-size: 15px; }
.font-size-l  { font-size: 17px; }
.font-size-xl { font-size: 20px; }

.settings-tencent-translation,
.settings-deepl-translation {
  font-size: 14px;
  color: hsl(0, 0%, 50%);
}

.tmt-setting-field,
.dmt-setting-field {
  display: flex;
  /* justify-content: space-between; */
  justify-content: flex-end;
  align-items: center;
  margin: 10px 20px;
}

.tmt-setting-field label,
.dmt-setting-field label {
  margin-right: 6px;
}

.tmt-setting-field input,
.dmt-setting-field input {
  width: 150px;
  font-size: 12px;
  font-family: monospace;
  border: 1px solid hsl(0, 0%, 90%);
  padding: 2px 6px;
  background: hsl(0, 0%, 98%);
}

.tmt-setting-field input:focus,
.dmt-setting-field input:focus {
  outline: none;
  border: 1px solid hsl(210, 90%, 50%);
  background: white;
}