/* -------------------------------------------
	Base
  - Main Tags
  - Other Tags
  - Animation
  - Fitvids
  - Scrollable
  - Lazyload
  - Sticky Content
  - Loading Icon
  - Disable Mobile Animation
  - Parallax Effect
  - Global Info Styles
---------------------------------------------- */

// Main Tags
*,
::after,
::before {
  box-sizing: inherit;
}

:root {
  font-size: 62.5%;
  font-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  font-weight: 400;
  box-sizing: border-box;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

  @media (prefers-reduced-motion: no-preference) {
    scroll-behavior: smooth;
  }
}

@include mq(xs, max) {
  :root {
    font-size: 9px;
  }
}

body {
  --alpha-gap: 15px;
  --alpha-mmenu-width: 29.6rem;
  --alpha-scroll-w: 0px;
  --alpha-top-sticky-h: 0px;
  --alpha-bottom-sticky-h: 0px;
  --alpha-corner-sm: 3px;
  --alpha-corner-md: 5px;
  --alpha-corner-lg: 10px;

  overflow-x: hidden;
  max-width: var(--alpha-site-width);
  margin: side-values(var(--alpha-site-margin));
  padding: var(--alpha-site-gap);
  background-color: var(--alpha-site-bg-color);
  background-image: var(--alpha-site-bg-image);
  background-repeat: var(--alpha-site-bg-repeat);
  background-position: var(--alpha-site-bg-position);
  background-size: var(--alpha-site-bg-size);
  background-attachment: var(--alpha-site-bg-attachment);

  &:not(.loaded) * {
    transition: all 0s !important;
  }

  &.pre-loaded {
    opacity: 1;
    transition: opacity 0.1s;
  }

  @include mq(lg, max) {
    --alpha-corner-lg: 7px
  }
}

.os-Windows {
  --alpha-scroll-w: 17px;
}

.os-Windows.browser-Opera,
.os-Mac {
  --alpha-scroll-w: 15px;
}

main {
  display: block;
  position: relative;
  padding-top: 8rem;
  padding-bottom: 11rem;
  flex: 1 1 auto;

  .archive:not(.breadcrumb-divider-active) .breadcrumb-container+& {
    padding-top: 0;
  }
}

.page-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin 0.4s, opacity 0.4s;

  background-color: var(--alpha-page-wrapper-bg-color);
  background-image: var(--alpha-page-wrapper-bg-image);
  background-repeat: var(--alpha-page-wrapper-bg-repeat);
  background-position: var(--alpha-page-wrapper-bg-position);
  background-size: var(--alpha-page-wrapper-bg-size);
  background-attachment: var(--alpha-page-wrapper-bg-attachment);

  --alpha-side-header-width: 0px;
}

.main-content {
  &::after {
    content: "";
    display: block;
    clear: both;
  }
}

.site-boxed .page-wrapper {
  box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.16), 0 3px 6px rgba(0, 0, 0, 0.23);
}

// Other Tags
[tabindex="-1"]:focus:not(:focus-visible) {
  outline: 0 !important;
}

abbr[title],
abbr[data-bs-original-title] {
  text-decoration: underline;
  text-decoration: underline dotted;
  cursor: help;
  text-decoration-skip-ink: none;
}

address {
  margin-bottom: 1rem;
  font-style: normal;
  line-height: inherit;
}

sub,
sup {
  position: relative;
  line-height: 0;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

pre,
code,
kbd,
samp {
  direction: ltr #{"/* rtl:ignore */"};
  unicode-bidi: bidi-override;
}

pre {
  display: block;
  margin-top: 0;
  margin-bottom: 1rem;
  overflow: auto;

  code {
    word-break: normal;
  }
}

code {
  word-wrap: break-word;
}

table {
  margin-bottom: 2rem;
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;

  td,
  th {
    padding: 10px;
    text-align: $left;
    vertical-align: top;
    border-bottom: 1px solid var(--alpha-change-border-color);
  }
}

dd {
  margin-left: 1rem;
}

dl {
  dt {
    font-weight: 700;
    font-size: 1.1em;
  }

  dd {
    margin-bottom: 0.5rem;
  }
}

ul {
  padding-inline-start: 20px;

  @include only-for-edge() {
    padding-#{$left}: 20px;
  }
}

ul,
ol {
  margin-bottom: 2rem;

  li & {
    margin-bottom: 0;
  }
}

ol ol {
  list-style: upper-alpha;

  ol {
    list-style: lower-roman;
  }
}

.comment-text {
  >ul {
    list-style: disc;

    ul {
      list-style: circle;

      ul {
        list-style: square;
      }
    }
  }

  >ol {
    list-style: decimal;

    ol {
      list-style: upper-alpha;

      ol {
        list-style: lower-roman;
      }
    }
  }
}

.menu,
.menu ul,
.mobile-menu,
.mobile-menu ul,
.nav,
.nav ul,
.tabs,
.widget ul,
ol.wp-block-latest-comments,
.list,
.breadcrumb,
.dropdown-box,
.pagination,
.commentlist,
.comments>ol,
.comment>ol,
.nav-filters,
.product-category ul,
.products,
.products ul,
.product-nav,
.product-tabs>div ul,
.woocommerce-error,
.image-gallery,
.image-gallery ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.dynamic-image-gallery {
  list-style: none;
}

.breadcrumb,
.post-meta,
.post-cats,
.post-title,
.tagcloud,
.menu li>,
header,
.product-category,
.product_meta,
.product-cat,
.product .woocommerce-loop-product__title,
.widget_product_categories,
.yith-woocommerce-ajax-product-filter,
.alpha-price-filter,
.pagination,
.mobile-icon-bar,
.mobile-menu-wrapper,
.card-header,
.cart_item,
.nav-filters {
  a {
    color: inherit;
  }
}

a {
  text-decoration: none;
  color: var(--alpha-primary-color);
  transition: color 0.3s;

  &:hover {
    color: var(--alpha-primary-color-hover);
  }
}

.vendor-widget,
.brand-name {
  a {
    color: inherit;

    &:hover,
    &:focus {
      color: var(--alpha-primary-color-hover);
    }
  }
}

.single-attachment .attachment>a {
  display: inline-block;
}

:focus {
  outline: 0;
}

figure {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
  object-fit: cover;
}

svg {
  vertical-align: middle;
}

hr {
  margin-bottom: 2rem; // updated(925)
  border: 0;
  border-top: 1px solid var(--alpha-change-border-color);
}

input {
  padding: 0;
  font-family: inherit;
  background: transparent;

  &:focus {
    outline: 0;
  }
}

// Remove the inheritance of text transform in Firefox
button,
select {
  text-transform: none;
}

// Remove the inheritance of word-wrap in Safari.
// See https://github.com/twbs/bootstrap/issues/24990

select {
  word-wrap: normal;
}

// Remove inner border and padding from Firefox, but don't restore the outline like Normalize.

::-moz-focus-inner {
  padding: 0;
  border-style: none;
}

// Textareas should really only resize vertically so they don't break their (horizontal) containers.
textarea {
  resize: vertical;
}

// 1. Browsers set a default `min-width: min-content;` on fieldsets,
//    unlike e.g. `<div>`s, which have `min-width: 0;` by default.
//    So we reset that to ensure fieldsets behave more like a standard block element.
//    See https://github.com/twbs/bootstrap/issues/12359
//    and https://html.spec.whatwg.org/multipage/#the-fieldset-and-legend-elements
// 2. Reset the default outline behavior of fieldsets so they don't affect page layout.

fieldset {
  min-width: 0; // 1
  padding: 0; // 2
  margin: 0; // 2
  border: 0; // 2
}

// Remove the inner padding in Chrome and Safari on macOS.
::-webkit-search-decoration {
  -webkit-appearance: none;
}

// Remove padding around color pickers in webkit browsers
::-webkit-color-swatch-wrapper {
  padding: 0;
}

// stylelint-disable-next-line selector-pseudo-element-no-unknown
::file-selector-button {
  font: inherit;
}

// 1. Change font properties to `inherit`
// 2. Correct the inability to style clickable types in iOS and Safari.
::-webkit-file-upload-button {
  font: inherit; // 1
  -webkit-appearance: button; // 2
}

output {
  display: inline-block;
}

iframe {
  border: 0;
}

summary {
  display: list-item; // 1
  cursor: pointer;
}

progress {
  vertical-align: baseline;
}

[hidden] {
  display: none;
}

ins {
  text-decoration: none;
}

i {
  position: relative;
  font-style: normal;
}

button {
  &:focus {
    outline: none !important;
  }
}

blockquote,
input,
textarea,
button,
select,
optgroup {
  font-family: inherit;
  margin: 0;
}

blockquote {
  margin: 0 0 20px;
  padding: 20px;
  border-#{$left}: 2px solid var(--alpha-primary-color);
  background: var(--alpha-change-color-light-2);
}

code {
  display: inline-block;
  border-radius: var(--alpha-corner-sm);
  padding: 2px 5px;
  font-size: 1.4rem;
  color: var(--alpha-primary-color);
}

pre {
  margin: 20px 0;
  padding: 20px;
  color: var(--alpha-primary-color);
  background-color: var(--alpha-change-color-light-2);
  overflow: auto;
  font-size: 1.6rem;
}

legend {
  padding-left: 0;
  padding-right: 0;
}

.screen-reader-text,
script {
  display: none !important;
}

// Animation
.appear-animate {
  transform: translate3d(0, 0, 0) scale(1);
  will-change: transform, filter, opacity;
}

// Fitvids
.fit-video .wp-video {
  width: 100% !important;
}

// Scrollable
.scrollable,
.sidebar-content {
  -webkit-overflow-scrolling: touch;

  &::-webkit-scrollbar {
    height: 7px;
    width: 4px;
  }

  &::-webkit-scrollbar-thumb {
    margin-#{$right}: 2px;
    background: rgba(#000, 0);
    border-radius: var(--alpha-corner-md);
    cursor: pointer;
    transition: background 0.3s;
  }

  &:hover::-webkit-scrollbar-thumb {
    background: rgba(#000, 0.25);
  }
}

.scrollable-light:hover::-webkit-scrollbar-thumb {
  background: rgba(#fff, 0.2);
}

// Lazyload
.d-lazyload {
  background: var(--alpha-lazy-load-bg);

  &.lazy-fade {
    opacity: 0;
  }

  &.lazy-blur {
    filter: blur(2vw);
  }
}

.lazy-fade,
.lazy-blur {
  transition: .3s;
}

img.d-lazyload[data-lazy$=".png"] {
  opacity: 0;
}

.alpha-dark .d-lazyload {
  background: var(--alpha-change-color-light-2);
}

[data-lazy]:not(img) {
  background-image: none !important;
}

// Sticky Content
@keyframes fixedTop {
  from {
    transform: translateY(-70px);
    transform-origin: center top 0px;
  }

  to {
    transform: translateY(0);
  }
}

@keyframes fixedBottom {
  from {
    transform: translateY(100%);
    transform-origin: center top 0px;
  }

  to {
    transform: translateY(0);
  }
}

.sticky-content {
  transition: opacity .3s,
    transform .3s;

  &.fix-top {
    top: 0;

    &.fixed {
      animation: fixedTop 0.4s;

      &.fixed-hide {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-70px);
        transition: opacity .3s, visibility .3s, transform .3s;
      }
    }

    &.hide {
      transform: translate3d(0, -25px, 0);
      opacity: 0;
      pointer-events: none;
    }
  }

  &.fix-bottom {
    bottom: 0;

    &.fixed {
      animation: fixedBottom 0.4s;

      &.fixed-hide {
        opacity: 0;
        visibility: hidden;
        transform: translateY(70px);
        transition: opacity .3s, visibility .3s, transform .3s;
      }
    }

    &.hide {
      transform: translate3d(0, 25px, 0);
      opacity: 0;
      pointer-events: none;
    }
  }

  &.fixed {
    position: fixed;
    left: 0;
    right: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: var(--alpha-change-color-light-1);
    box-shadow: 0 0 10px 1px rgba(0, 0, 0, 0.1);
  }
}

// .fixed.fix-top {
// 	animation: fixedTop .4s;
// }
.fixed.fix-bottom {
  animation: fixedBottom 0.4s;
}

.sticky-content.animated:not(.wrapped) {
  animation: none;
  opacity: 0;
  visibility: hidden;
}

.sticky-content.fixed.revealInDown:after,
.sticky-content.fixed.revealInLeft:after,
.sticky-content.fixed.revealInRight:after,
.sticky-content.fixed.revealInUp:after {
  content: none;
}

// Loading Icon
form.d-loading {
  opacity: 0.3;
}

.d-loading {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  z-index: 1;
  border-radius: inherit;

  &.small i {
    left: calc(50% - 10px);
    top: calc(50% - 10px);
    width: 20px;
    height: 20px;
  }

  i {
    position: absolute;
    left: calc(50% - 17px);
    top: calc(50% - 17px);
    width: 34px;
    height: 34px;
    border: 2px solid transparent;
    border-top-color: var(--alpha-primary-color);
    border-radius: 50%;
    animation: spin 0.75s infinite linear;

    &:before {
      content: "";
      top: -2px;
      left: -2px;
      position: absolute;
      width: inherit;
      height: inherit;
      border: inherit;
      border-radius: inherit;
      animation: spin 1.5s infinite ease;
    }
  }

  &:before {
    --alpha-change-color-light-1: inherit;
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: var(--alpha-change-color-light-1);
    opacity: 0.6;
    border-radius: inherit;
  }
}

.d-loading-stick {
  text-align: center;

  &.is-stick .d-loading {
    text-align: center;

    i {
      position: fixed;
      left: auto;
      margin-#{$left}: -17px;
    }
  }

  &.is-top .d-loading i {
    top: 80px;
    bottom: auto;
  }

  &.is-bottom .d-loading i {
    top: auto;
    bottom: 120px;
  }
}

.customize-loading-icon {
  display: none;
  position: fixed;

  i {
    border-top-color: #fd7800;
  }

  .wp-customizer-unloading & {
    display: block;
  }
}

@keyframes spin {
  0% {
    transform: none;
  }

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

// Disable Mobile Animation
@media (max-width: 767px) {
  .alpha-disable-mobile-animation {

    .elementor-invisible,
    .appear-animate,
    [data-vce-animate] {
      opacity: 1;
      visibility: visible;
    }
  }
}

// Parallax effects
.parallax-vertical .parallax-background {
  #{$left}: 0;
}

.parallax-horizontal .parallax-background {
  top: 0;
}

// Global Info Styles
.woocommerce-info {
  position: relative;
  display: block;
  margin-bottom: 2rem;
  padding: side-values(1.3rem 3rem 1.3rem 5.5rem) !important;
  text-align: start;
  border: none;
  border-radius: var(--alpha-border-radius);

  &,
  &.alert {
    color: #fff;
  }

  .woocommerce & .button,
  .woocommerce & .wc-backward {
    text-decoration: none;
    min-height: unset;
    margin-#{$left}: 7px;
    padding: 0;
    border-radius: 0;
    border-bottom: 2px solid;
    border-width: 0 0 2px 0;
    background-color: transparent;
    border-color: rgba(255, 255, 255, .3);
    color: #fff;

    &:hover {
      border-color: rgba(255, 255, 255, 1);
      background: transparent;
    }
  }

  &:before {
    position: absolute;
    top: calc(1.3rem + (var(--alpha-body-font-size) * var(--alpha-body-line-height) - var(--alpha-body-font-size) * 1.29) / 2);
    #{$left}: calc((5.5rem - var(--alpha-body-font-size) * 1.29) / 2 + .1em);
    font-size: 1.29em;
    line-height: 1.1;
    font-family: $framework-font;
  }
}

.woocommerce-info {
  &:before {
    content: '\e961';
  }
}

.woocommerce-info {
  background-color: var(--alpha-info-color);
}