/*
  入口main.js中引入的全局样式
*/


@font-face {
  font-family: led;
  src: url(../fonts/led.ttf);
}

@font-face {
  font-family: num;
  src: url(../fonts/num.ttf);
}

@layer {

  :root,
  .w-var {
    --w-step: #{$w-step};
    --w-z-index: #{$w-z-index};
    --w-z-index-top: #{$w-z-index-top};
    --w-size: #{$w-size};
    @include varColor($colors, $w-step);
  }

  .dark {
    --w-step: #{-$w-step};
    @include varColor($dark-colors, -$w-step);
  }

  * {
    font-family: Segoe UI, Segoe UI Midlevel, Segoe WP, Arial, sans-serif;
    box-sizing: border-box;
    padding: 0;
    margin: 0;
    border: none;
    outline: none;
    color: inherit;
  }

  html {
    font-size: var(--w-size);
    color: var(--w-text);
    background-color: var(--w-bg);
  }



  .w-abs {
    position: absolute;
  }


  .w-lines {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .w-flex {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    position: relative;
  }

  .w-flex-column {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
  }



  /* 印章效果 */
  .w-seal {
    position: absolute;
    display: flex;
    line-height: 1;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    width: 6em;
    height: 6em;
    border-radius: 10em;
    border: .25em solid currentColor;
    background-color: #FFF;
    z-index: 1;
    transform: rotate(-25deg);
    padding: 0;

    &>div {
      border: .13em solid currentColor;
      padding: .3em 0;
      width: 4.3em;
      text-align: center;
      font-weight: bold;
    }

    &::before {
      content: "";
      position: absolute;
      width: 5em;
      height: 5em;
      border: .15em solid currentColor;
      border-radius: 10em;

    }

    &::after {
      content: "";
      position: absolute;
      width: 3.5em;
      height: 3.5em;
      border: .15em solid currentColor;
      border-color: currentColor #0000 currentColor #0000;
      border-radius: 10em;

    }
  }


  .w-loading {
    display: inline-block;
    width: 1em;
    height: 1em;
    border-radius: 1em;
    border: .2em solid currentColor;
    border-top-color: #0000;
    animation: w-am-loading 1s infinite;
  }

  @keyframes w-am-loading {
    from {
      transform: rotate(0deg);
    }

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

  .w-radio,
  .w-checkbox {
    --btn-color-inner: var(--btn-color, currentColor);
    --opacity: .6;
    transition: all .3s;
    cursor: pointer;


    &::before {
      content: '';
      font-size: var(--btn-size, inherit);
      width: 1em;
      height: 1em;
      opacity: var(--opacity);
      box-sizing: border-box;
      border: solid 1px var(--btn-color-inner);
      margin-right: .2em;
      border-radius: .2em;
      background-color: var(--btn-bg-color-inner, #0000);
      background-image: url("data:image/svg+xml;base64,PHN2ZyB0PSIxNzA5NzA3MjQ5OTg3IiBjbGFzcz0iaWNvbiIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHAtaWQ9IjQyODUiIHdpZHRoPSIzMiIgaGVpZ2h0PSIzMiI+PHBhdGggZD0iTTg0My42OTM5NTkgMjkzLjYwOTA2MSA0MjUuMjU1ODY5IDcxMi4wNTYzNjIgMTg2LjE0NTAyNiA0NzIuOTQ3NTY2IDY2LjU3OTg4MyA1OTIuNTA0NTIyIDQyNS4yNTU4NjkgOTUxLjE2NTE1OCA5NjMuMjYwMTI2IDQxMy4xNzQyMDRaIiBwLWlkPSI0Mjg2IiBmaWxsPSIjZmZmZmZmIj48L3BhdGg+PC9zdmc+");
      background-size: .65em .65em;
      background-repeat: no-repeat;
      background-position: var(--background-position-inner, center -1em);
      transition: all .3s;
      overflow: hidden;
    }

    &.selected {
      --btn-color-inner: var(--selected-btn-color, var(--w-main));
      --opacity: 1;
      --btn-bg-color-inner: var(--selected-btn-color, var(--w-main));
      --background-position-inner: center .1em;
      color: var(--selected-text-color, currentColor);
    }

  }

  .w-radio::before {
    border-radius: 1em;
  }


}