* {
  box-sizing: border-box;
  font-family: var(--text-font);
  line-height: 1.3em;
}

h1,
h2,
h3,
h4,
h5,
h6,
h1 *,
h2 *,
h3 *,
h4 *,
h5 *,
h6 * {
  font-family: var(--title-font);
  font-weight: 600;
}

h1 {
  font-size: 4rem;
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

h2 {
  font-size: 2rem;
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 1000px) {
  h1 {
    font-size: 2.5em;
  }
}

/* --- Main Login ---*/

.loading-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  color: var(--text-color);

  display: flex;
  justify-content: center;
  align-items: center;
}

.loading-panel.hidden {
  display: none;
}

/* --- Main layout --- */

.main-header {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--secondary-color);
  color: var(--on-secondary-color);
  z-index: 1000;
  padding: 20px 25px;
  line-height: 1.5em;

  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: stretch;
}

.main-title {
  margin: 0;
  font-size: 2rem;
  flex: 1;
}

@media (max-width: 600px) {
  .main-title-text {
    display: none;
  }
}

.main-title a {
  color: var(--on-secondary-color);
  text-decoration: none;
}

.main-title .logo {
  height: 1em;
  display: inline-block;
  vertical-align: top;
  position: relative;
  top: 4px;
  margin-right: 0.2em;
}

.page-section {
  width: 100%;
  max-width: 1200px;
  padding: 25px;
  margin-left: auto;
  margin-right: auto;
}

.main-content {
  padding-bottom: 25vh;
}

.hidden {
  display: none;
}

.heading {
  display: flex;
  justify-content: center;
  align-items: stretch;
}

.heading .back {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  padding: 0.5em;
  color: var(--primary-color);
}

.heading .page-title {
  flex: 1;
}

.main-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 25px;
  margin-bottom: 80px;
  font-size: 0.8rem;
}

.main-footer ul {
  display: flex;
  justify-content: center;
  align-items: center;

  list-style-type: none;
}

.main-footer ul li {
  margin-right: 15px;
  color: rgba(0, 0, 0, 0.5);
}

.main-footer a {
  color: inherit;
  text-decoration: none;
}

.main-footer a:hover {
  text-decoration: underline;
}

/* ----- Homepage ----- */

.info-section {
  display: flex;
  justify-content: stretch;
  align-items: flex-start;
}

.info-section .content {
  flex: 1;
}

.info-section .toolbox {
  margin-top: 20px;
  text-align: right;
}

@media (max-width: 600px) {
  .info-section {
    flex-direction: column;
    align-items: stretch;
  }

  .info-section .toolbox {
    order: -1;
  }
}

/* ----- Edit page ----- */

.edit-page {
  overflow: hidden;
}

.edit-page .target-field {
  color: var(--primary-color);
}

.edit-page .edit-form {
  flex: 1;
}

.edit-page .edit-form .form-control {
  display: flex;
  align-items: center;

  margin-bottom: 10px;
}

.edit-page .form-control > * {
  margin-right: 5px;
}

.edit-page .form-control input,
.edit-page .form-control > .input-wrapper {
  flex: 1;
  min-width: 50px;
}

.edit-page .edit-form > * > input:first-child {
  margin-left: 0;
}

.edit-page input {
  color: inherit;
  border: none;
  outline: none;
  border-bottom: solid 2px var(--primary-color);
  background: transparent;
  padding: 5px 0;

  border-color: transparent;
}

.edit-page input:hover,
.edit-page input:focus {
  border-color: var(--primary-color);
}

.edit-page input:invalid {
  border-color: var(--danger-color);
}

.edit-page .advanced {
  display: none;
}

.edit-page .form-wrapper {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.edit-page .qrcode-wrapper {
  width: 50%;
  max-width: 300px;
  margin-right: 25px;
}

.edit-page .qrcode {
  width: 100%;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}

.edit-page .toolbar {
  margin-top: 25px;
  text-align: right;
}

.edit-page .svg-download-link {
  position: absolute;
  bottom: -200px;
  left: -300px;
  opacity: 0;
}

@media (max-width: 1000px) {
  .edit-page .form-wrapper {
    flex-direction: column;
  }

  .edit-page .form-wrapper > * {
    margin-bottom: 25px;
    width: 100%;
  }

  .edit-page .qrcode-wrapper {
    margin-left: auto;
    margin-right: auto;
  }

  .edit-page .toolbar {
    text-align: center;
    line-height: 3em;
  }
}

.edit-page .alertbox {
  margin-top: 25px;
}

/* ----- Modal ----- */

.dialog-content {
}

.dialog-danger .dialog-header *,
.dialog-danger .dialog-body * {
  --primary-color: var(--danger-color);
}

.dialog-header {
  display: flex;
  justify-content: stretch;
  align-items: center;
  padding: 10px;

  border-bottom: solid 1px rgba(0, 0, 0, 0.3);
}

.dialog-body {
  padding: 25px;
}

.dialog-header .dialog-title {
  flex: 1;
}

.dialog-header .dialog-icon {
  margin-right: 10px;
  margin-left: 10px;
  font-size: 1.5em;
  color: var(--primary-color);
}

.dialog-title {
  color: var(--primary-color);
}

.dialog-body strong {
  color: var(--primary-color);
}

.dialog-toolbar {
  padding: 10px;
  text-align: right;
}

/* ----- Alert box ----- */

.alertbox {
  width: 100%;

  background: var(--primary-color);
  color: var(--on-primary-color);

  padding: 15px;
  border-radius: 10px;
}

.alertbox.inspection,
.alertbox.inspection * {
  --primary-color: var(--inspect-color);
  --on-primary-color: var(--on-inspect-color);
}

.alertbox.loop,
.alertbox.loop * {
  --primary-color: var(--danger-color);
  --on-primary-color: var(--on-danger-color);
}

.alertbox .alert-header {
  display: flex;
  align-items: center;
  font-size: 1.3em;
  margin-bottom: 10px;
}

.alertbox .alert-header .alert-title {
  flex: 1;
}

.alertbox .alert-title {
  margin: 0;
  margin-left: 15px;
}

/* ----- About Page ----- */

.about-page .page-title {
  font-size: 4em;
  color: var(--text-color);
  padding-right: 50px;
}

.about-page .heading-section {
  text-align: center;
}

.about-page .about-section {
  text-align: center;
}

.about-page .company-logo img {
  max-height: 50vh;
}

.about-page .tech-list {
  width: 100%;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0;
}

.about-page .tech-list li {
  display: inline-block;
  margin-right: 5px;
  margin-left: 5px;
}

@media (max-width: 600px) {
  .about-page .page-title {
    font-size: 2em;
  }

  .about-page .page-title .logo {
    display: block;
    margin-left: auto;
    margin-right: auto;
    height: 1.5em;
  }
}
