@use './tokens' as blog;

html {
  min-width: 320px;
  background: transparent;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--argon-page, rgb(40, 38, 42));
}

* {
  box-sizing: border-box;
}

html.darkmode body.wp-theme-argon::before {
  position: fixed;
  inset: 0;
  z-index: 999999999;
  pointer-events: none;
  content: '';
  background: rgba(0, 0, 0, 0.2);
  transition: var(--kt-blog-motion-background-ease, background 0.3s ease);
}

html.filter-sunset {
  filter: sepia(30%);
}

html.filter-grayscale {
  filter: grayscale(1);
}

html.filter-darkness .kt-blog__primary::after {
  position: fixed;
  inset: 0;
  z-index: 999999999;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  content: '';
  background: rgba(0, 0, 0, 0.4);
}

@include blog.block {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  color: var(--argon-text);
  background: var(--argon-page);
  font-family: var(--argon-font-family);
  font-size: 16px;

  &::before,
  &::after {
    content: '';
    display: none;
  }

  &__content::before,
  &__content::after {
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    content: '';
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
    background-repeat: no-repeat;
    transition: var(--kt-blog-motion-background-image-opacity, opacity 0.5s ease);
  }

  &__content::before {
    background-image: var(--argon-background-light-image, var(--argon-background-image));
    filter: var(--argon-background-filter, none);
    opacity: 0;
  }

  &__content::after {
    background-image: var(--argon-background-dark-image, var(--argon-background-image));
    opacity: var(--argon-background-opacity, 1);
  }

  &--light &__content::before {
    filter: none;
    opacity: var(--argon-background-light-opacity, 1);
  }

  &--light &__content::after {
    opacity: 0;
  }

  &--no-banner &__content::before,
  &--no-banner &__content::after {
    background: var(--argon-page);
  }

  &--shadow-big &__card {
    box-shadow:
      0 15px 35px rgba(50, 50, 93, 0.1),
      0 5px 15px rgba(0, 0, 0, 0.07);
  }

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

  img {
    display: block;
    max-width: 100%;
  }

  button,
  input,
  textarea {
    font: inherit;
  }

  &__card {
    position: relative;
    border: 0;
    border-radius: var(--card-radius);
    background: var(--argon-card);
    animation: kt-blog-card-show 0.25s ease-out;
    box-shadow: var(--argon-shadow);
    transform-origin: center top;

    .kt-blog__card {
      animation: none;
    }
  }

  &__card:not(.border-0) {
    border: 1px solid rgba(0, 0, 0, 0.05);
  }

  &__card-body {
    padding: 0;
  }

  &__card--gradient-secondary {
    background: var(--argon-card-deep);
  }

  &__card--large-shadow {
    box-shadow: 0 18px 45px rgba(15, 13, 18, 0.16);
  }

  &__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--card-radius);
    cursor: pointer;
    box-shadow: none;

    &:hover,
    &:focus {
      color: #fff;
    }
  }

  &__button--primary,
  &__button--secondary {
    color: #fff;
    background: var(--themecolor);
  }

  &__button--outline-primary {
    color: var(--themecolor);
    border: 1px solid var(--themecolor);
    background: transparent;

    &:hover,
    &:focus {
      color: #fff;
      background: var(--themecolor);
    }
  }

  &__button--success {
    color: #fff;
    background: #2dce89;
  }

  &__button--warning {
    color: #fff;
    background: #fb6340;
  }

  &__button--default,
  &__button--neutral {
    color: var(--argon-text);
    background: var(--argon-control-soft);
  }

  &__button--icon {
    width: 38px;
    height: 38px;
  }

  &__button--small {
    min-height: 32px;
    padding: 0 12px;
  }

  &__button--block {
    width: 100%;
  }

  &__button-icon-inner {
    display: inline-flex;
  }

  &__tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 2px 10px;
    border-radius: var(--card-radius);
    font-size: 13px;
    line-height: 1.2;
  }

  &__tag--secondary {
    color: var(--argon-text);
    background: var(--argon-pill);
  }

  &__hidden {
    display: none !important;
  }

  &__input-group {
    display: flex;
    min-height: 36px;
    align-items: center;
    overflow: hidden;
    border-radius: var(--card-radius);
    background: var(--argon-control-soft);
  }

  &__input-group--spaced {
    margin-bottom: 1.5rem;
  }

  &__input-addon {
    display: inline-flex;
    padding: 0 10px;
    color: var(--argon-muted);
  }

  &__input {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--argon-text);
    background: transparent;

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

  &__form-group--spaced {
    margin-bottom: 1rem;
  }

  &__live2d-canvas {
    position: fixed;
    right: 16px;
    bottom: 76px;
    z-index: 30;
    width: 220px;
    height: 320px;
    pointer-events: auto;
    transform-origin: 50% 82%;
    will-change: transform;
  }

}

@media (max-width: 1199px) {
  @include blog.block {
    &__live2d-canvas {
      display: none;
    }
  }
}

@keyframes kt-blog-card-show {
  0% {
    opacity: 0;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: none;
  }
}
