* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  outline: none;
}

body {
  height: 100vh;
  margin: 0;
  padding: 0;
  font-size: var(--font-size);
  font-family: var(--font-family);
  overflow: hidden;
  background: var(--color-background);
  color: var(--color);
}

input {
  font-size: var(--font-size);
}

img {
  max-width: 100%;
  max-height: 100%;
}

#app {
  min-height: 100%;
}

.title,
h1,
h2,
h3,
h4 {
  color: var(--color-title);
  font-weight: 700;
  line-height: 2;
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 28px;
}

h3 {
  font-size: 24px;
}

h4 {
  font-size: 20px;
}

h5 {
  font-size: 16px;
}

.small {
  font-size: 10px;
}

.bland {
  color: var(--color-bland);
}

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

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

.desc {
  color: var(--color-desc);
}

.gray {
  color: var(--color-gray);
}

.warning {
  color: var(--color-warning);
}

.success {
  color: var(--color-success);
}

.error {
  color: var(--color-error);
}

.hover:hover {
  color: var(--color-primary) !important;
  cursor: pointer !important;
}

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

  &.item {
    position: relative;
    line-height: 1.5;
    padding: 8px 20px 8px 8px;
    border-radius: 2px;
    & > .del {
      font-size: 14px;
      position: absolute;
      right: 4px;
      top: calc(50% - 12px);

      &:hover {
        color: var(--color-error);
      }
    }
  }
}

.ellipsis {
  text-overflow: ellipsis;
  overflow: hidden;
}

a {
  color: var(--color-primary);
  cursor: pointer;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a.hover {
  text-decoration: none;
}

a.hover:hover {
  color: var(--color-primary-hover) !important;
}

.inline {
  display: inline-block;
}

.button {
  display: inline-block !important;
  padding: 0 16px;
  line-height: 2;
  color: var(--color);
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: var(--font-size);
  text-align: center;
}

.button.solid {
  background-color: var(--color-background);
  border-color: var(--color-background);

  &.bland {
    color: #ffffff !important;
    background-color: var(--color-bland);
    border-color: var(--color-bland);

    &:hover {
      color: #ffffff !important;
      text-decoration: none;
      background-color: var(--color-bland-hover);
      border-color: var(--color-bland-hover);
    }
  }
}

.button.solid:hover {
  background-color: var(--color-border);
  border-color: var(--color-border);
}

.button.solid.primary {
  color: #ffffff !important;
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.button.solid.primary:hover {
  color: #ffffff !important;
  text-decoration: none;
  background-color: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
}

.button.primary {
  color: var(--color-primary) !important;
}

.button.primary:hover {
  color: var(--color-primary-hover) !important;
}

.button.bland {
  color: var(--color-bland) !important;
}

.button.bland:hover {
  color: var(--color-bland-hover) !important;
}

.visible {
  visibility: visible;
}

.hidden {
  visibility: hidden;
}

.hover-icons {
  .icon {
    visibility: hidden;
  }

  &:hover {
    .icon {
      visibility: visible;
    }
  }
}

.flex {
  display: flex;
  &.column {
    flex-direction: column;
  }
  &.middle {
    align-items: center;
  }
  &.center {
    justify-content: center;
  }

  &.between {
    justify-content: space-between;
  }

  .shrink-0 {
    flex-shrink: 0;
  }
}

.flex-grow {
  flex: 1;
}

.grid {
  display: grid;
}

.left {
  text-align: left;
}

.center {
  text-align: center;
}

.right {
  text-align: right;
}

.w-full {
  width: 100%;
}

.mt-4 {
  margin-top: 4px;
}

.ml-4 {
  margin-left: 4px;
}

.mr-4 {
  margin-right: 4px;
}

.mt-8 {
  margin-top: 8px;
}

.mr-8 {
  margin-right: 8px;
}

.ml-8 {
  margin-left: 8px;
}

.-ml-8 {
  margin-left: -8px;
}

.mb-8 {
  margin-bottom: 8px;
}

.ml-12 {
  margin-left: 12px;
}

.mt-12 {
  margin-top: 12px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mr-12 {
  margin-right: 12px;
}

.mx-12 {
  margin-left: 12px;
  margin-right: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.ml-16 {
  margin-left: 16px;
}

.mr-16 {
  margin-right: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mt-20 {
  margin-top: 20px;
}

.mt-24 {
  margin-top: 24px;
}

.ml-24 {
  margin-left: 24px;
}

.mr-25 {
  margin-right: 25px;
}

.px-4 {
  padding-left: 4px;
  padding-right: 4px;
}

.py-4 {
  padding-top: 4px;
  padding-bottom: 4px;
}

.pl-8 {
  padding-left: 8px;
}

.px-8 {
  padding-left: 8px;
  padding-right: 8px;
}

.py-8 {
  padding-top: 8px;
  padding-bottom: 8px;
}

.px-12 {
  padding-left: 12px;
  padding-right: 12px;
}

.py-12 {
  padding-top: 12px;
  padding-bottom: 12px;
}

.p-12 {
  padding: 12px;
}

.pb-16 {
  padding-bottom: 16px;
}

.px-16 {
  padding-left: 16px;
  padding-right: 16px;
}

.py-16 {
  padding-top: 16px;
  padding-bottom: 16px;
}

.px-16 {
  padding-left: 16px;
  padding-right: 16px;
}

.p-16 {
  padding: 16px;
}

.nowrap {
  white-space: nowrap;
}

.border {
  border: 1px solid var(--color-sub-border);
}

.transparent {
  background-color: transparent;
  background-image: linear-gradient(
      45deg,
      #c5c5c5 25%,
      transparent 0,
      transparent 75%,
      #c5c5c5 0,
      #c5c5c5
    ),
    linear-gradient(
      45deg,
      #c5c5c5 25%,
      transparent 0,
      transparent 75%,
      #c5c5c5 0,
      #c5c5c5
    );
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
}

.vip-label {
  font-size: 10px;
  background-color: #ff400030;
  color: var(--color-bland);
  padding: 0 6px;
  border-radius: 2px;
}

.form-item {
  display: flex;

  & > label {
    width: 76px;
    font-size: 12px;
    line-height: 30px;
    flex-shrink: 0;
    color: var(--color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .t-input-number {
    width: 100%;
    line-height: 30px;
    height: 30px;

    .t-input__wrap {
      height: 100%;

      .t-input {
        height: 100%;
        background: none;
        color: var(--color-title);
        box-shadow: none;

        /* &:hover,
        &.t-is-focused {
          border-color: var(--color-primary);
        } */
      }
    }

    .t-input-number__increase,
    .t-input-number__decrease {
      width: 20px;
    }
  }

  .t-input,
  .t-textarea textarea {
    .t-input__inner {
      text-overflow: unset;
      &::placeholder {
        color: var(--color-gray);
      }
    }

    &.t-is-disabled {
      border-color: var(--color-border-input) !important;

      .t-input__inner {
        color: var(--color-desc);
      }
    }
  }

  & > input {
    background: none;
    outline: none;
    color: var(--color-desc);

    &::placeholder {
      color: var(--color-gray);
    }
  }

  .t-icon {
    font-size: 16px;
    height: 30px;
  }

  .t-tag {
    line-height: 24px;
    .t-icon {
      height: 23px;
      margin-left: 4px;
      margin-right: -4px;
    }
  }
}

*::placeholder {
  color: var(--color-gray);
}

/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar {
  width: 3px;
  height: 3px;
  background: transparent;
}

::-webkit-scrollbar-corner {
  background-color: transparent;
}

/*滚动条里面小方块*/
::-webkit-scrollbar-thumb {
  background-color: var(--color-scrollbar) !important;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--color-scrollbar-hover);
}

::-webkit-scrollbar-track {
  background-color: transparent !important;
}

/*
火狐兼容
*/
@-moz-document url-prefix() {
  * {
    scrollbar-width: thin;
  }
  .t-radio-button {
    padding: 6px !important;
  }
}

input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
}

html::view-transition-new(root){
  animation: clip .3s linear;
  height: 100%;
  overflow: clip;
  object-fit: contain;
}
html::view-transition-old(root) {
  animation: none;
  height: 100%;
  overflow: clip;
  object-fit: cover;
}

@keyframes clip {
  from{
    clip-path: circle(0% at 0 0);
  }
  to{
    clip-path: circle(150% at 0 0);
  }
}