@import 'github-markdown-css/github-markdown.css';
@import 'highlight.js/scss/github.scss';
@import './themes/default.scss';
@import './themes/dark.scss';

// theme
:root {
  @each $prop, $val in $theme-default {
    --#{$prop}: #{$val};
  }
}

// theme dark
@media (prefers-color-scheme: dark) {
  :root {
    @each $prop, $val in $theme-dark {
      --#{$prop}: #{$val};
    }
  }

  @import './markdown-dark.scss';
  @import 'highlight.js/scss/agate.scss';
}

.full-width {
  width: 100%;
}

img,
picture,
video,
canvas,
svg {
  max-width: 100%;
}

.iconfont {
  font-size: inherit;
}

.icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.15em;
  fill: currentColor;
  overflow: hidden;
}

.plain-button {
  font-size: 28px;
  outline: none;
  border: none;
  background-color: transparent;
  color: var(--primary-text-color);
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  text-decoration: none;
  margin: 0;
  padding: 0;

  &.small {
    font-size: 16px;
  }
}

.flex-align-self-end {
  align-self: flex-end;
}

.simple-table-wrapper {
  overflow: auto hidden;

  .simple-table {
    width: 100%;
  }
}

.simple-table {
  border: none;
  border-spacing: 0;
  table-layout: fixed;

  th,
  td {
    border: none;
    padding: 8px;
  }

  th {
    font-weight: normal;
    text-align: center;
    -webkit-user-select: none;
    user-select: none;
    background-color: var(--thead-bg-color);
  }

  tr {
    &:not(:last-child) td {
      border-bottom: solid 1px;
      border-color: var(--border-color);
    }

    &:hover {
      background-color: var(--hover-bg-color);
    }

    td:first-child {
      border-left: solid 1px;
      border-color: var(--border-color);
    }

    td:last-child {
      border-right: solid 1px;
      border-color: var(--border-color);
    }

    td {
      border-bottom: solid 1px;
      border-color: var(--border-color);
      overflow-wrap: break-word;
    }
  }

  .line {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .center {
    text-align: center;
  }

  .right {
    text-align: right;
  }
}

.form-item {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  margin-bottom: 16px;
  padding-right: 16px;

  &.inline {
    display: inline-flex;
  }

  .label {
    -webkit-user-select: none;
    user-select: none;
    display: block;
    margin-bottom: 6px;
  }

  .description {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 6px;
    white-space: pre-wrap;
  }

  input[type='text'].value,
  input[type='password'].value,
  textarea.value {
    box-sizing: border-box;
  }

  input.value,
  select.value,
  textarea.value {
    background-color: var(--form-value-bg-color);
    border: var(--form-value-border);
    color: var(--primary-text-color);
    font-size: 16px;
    outline: none;
    padding: 6px 8px;

    &:disabled {
      background-color: var(--form-value-bg-color-disabled);
    }
  }

  textarea.value {
    resize: vertical;
  }
}

.loading-icon {
  animation: spinning 1.5s linear infinite;
}

// animations
@keyframes fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.fade-enter-active {
  animation: fade-in 0.3s ease-in;
}

.fade-leave-active {
  animation: fade-in 0.3s ease-out reverse;
}

@keyframes scale-in {
  from {
    transform: scale(0);
  }

  to {
    transform: scale(1);
  }
}

@keyframes spinning {
  from {
    transform: rotate(0);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ----------------------------------------------
 * Generated by Animista on 2020-5-10 20:37:53
 * Licensed under FreeBSD License.
 * See http://animista.net/license for more info. 
 * w: http://animista.net, t: @cssanimista
 * ---------------------------------------------- */

/**
 * ----------------------------------------
 * animation text-flicker-in-glow
 * ----------------------------------------
 */
@keyframes text-flicker-in-glow {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 0;
    text-shadow: none;
  }

  10.1% {
    opacity: 1;
    text-shadow: none;
  }

  10.2% {
    opacity: 0;
    text-shadow: none;
  }

  20% {
    opacity: 0;
    text-shadow: none;
  }

  20.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.25);
  }

  20.6% {
    opacity: 0;
    text-shadow: none;
  }

  30% {
    opacity: 0;
    text-shadow: none;
  }

  30.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45),
      0 0 60px rgba(255, 255, 255, 0.25);
  }

  30.5% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45),
      0 0 60px rgba(255, 255, 255, 0.25);
  }

  30.6% {
    opacity: 0;
    text-shadow: none;
  }

  45% {
    opacity: 0;
    text-shadow: none;
  }

  45.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45),
      0 0 60px rgba(255, 255, 255, 0.25);
  }

  50% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45),
      0 0 60px rgba(255, 255, 255, 0.25);
  }

  55% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.45),
      0 0 60px rgba(255, 255, 255, 0.25);
  }

  55.1% {
    opacity: 0;
    text-shadow: none;
  }

  57% {
    opacity: 0;
    text-shadow: none;
  }

  57.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55),
      0 0 60px rgba(255, 255, 255, 0.35);
  }

  60% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55),
      0 0 60px rgba(255, 255, 255, 0.35);
  }

  60.1% {
    opacity: 0;
    text-shadow: none;
  }

  65% {
    opacity: 0;
    text-shadow: none;
  }

  65.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55),
      0 0 60px rgba(255, 255, 255, 0.35), 0 0 100px rgba(255, 255, 255, 0.1);
  }

  75% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55),
      0 0 60px rgba(255, 255, 255, 0.35), 0 0 100px rgba(255, 255, 255, 0.1);
  }

  75.1% {
    opacity: 0;
    text-shadow: none;
  }

  77% {
    opacity: 0;
    text-shadow: none;
  }

  77.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55),
      0 0 60px rgba(255, 255, 255, 0.4), 0 0 110px rgba(255, 255, 255, 0.2),
      0 0 100px rgba(255, 255, 255, 0.1);
  }

  85% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.55),
      0 0 60px rgba(255, 255, 255, 0.4), 0 0 110px rgba(255, 255, 255, 0.2),
      0 0 100px rgba(255, 255, 255, 0.1);
  }

  85.1% {
    opacity: 0;
    text-shadow: none;
  }

  86% {
    opacity: 0;
    text-shadow: none;
  }

  86.1% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6),
      0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25),
      0 0 100px rgba(255, 255, 255, 0.1);
  }

  100% {
    opacity: 1;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.6),
      0 0 60px rgba(255, 255, 255, 0.45), 0 0 110px rgba(255, 255, 255, 0.25),
      0 0 100px rgba(255, 255, 255, 0.1);
  }
}

@keyframes bottom-fade-in {
  from {
    opacity: 0;
    transform: translateY(50%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.bottom-fade-enter-active {
  animation: bottom-fade-in 0.3s ease-in;
}

.bottom-fade-leave-active {
  animation: bottom-fade-in 0.3s ease-out reverse;
}

@keyframes top-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.top-fade-enter-active {
  animation: top-fade-in 0.3s ease-in;
}

.top-fade-leave-active {
  animation: top-fade-in 0.3s ease-out reverse;
}

@keyframes scale-fade-in {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-fade-enter-active {
  animation: scale-fade-in 0.3s cubic-bezier(0, 0.01, 0.77, 1.79);
}

.scale-fade-leave-active {
  animation: scale-fade-in 0.3s reverse;
}

@keyframes scale-opacity-in {
  from {
    opacity: 0;
    transform: scale(1.1);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.scale-opacity-enter-active {
  animation: scale-opacity-in 0.3s;
}

.scale-opacity-leave-active {
  animation: scale-opacity-in 0.3s reverse;
}
