html {
  background: $base-1;
  font-family: sans-serif;
}

body {
  background: $base-0;
  font-size: 1rem;
  min-height: 100%;
}

/* Style helpers */
.bg-base-0 {
  background-color: $base-0;
}

.bg-base-1 {
  background-color: $base-1;
}

.bg-base-2 {
  background-color: $base-2;
}

.fill-current {
  fill: currentColor !important;
}

.hr-text {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  margin: $spacer 0 $spacer 0;
}
.hr-text > span {
  position: relative;
  display: inline-block;
}
.hr-text > span:after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9999px;
  height: 1px;
  background: $hr-border-color;
  left: 100%;
  margin-left: $spacer;
}

.reset-after::after, .reset-before::before {
  content: none;
}

.bg-left-bottom {
  background-position: left bottom !important;
}

.bg-cover {
  background-size: cover !important;
}

.backdrop-blur {
  backdrop-filter: blur(10px) !important;
}

.text-white-important {
  color: #FFF !important;
}

.pointer-events-none {
  pointer-events: none !important;
}
.pointer-events-auto {
  pointer-events: auto !important;
}

/* Header Section */
.header {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  box-sizing: border-box;
}

.logo {
  height: 2.375rem;
  width: auto;
  opacity: 1;
}
.logo:hover {
  opacity: 0.85;
}
.logo img {
  border: 0;
  height: 100%;
  max-width: 12.625rem;
  max-height: 2.375rem;
  object-fit: contain;
}

/* Footer */

/* Menus */
.slide-menu {
  width: 250px;
  top: 0;
  bottom: 0;
  left: 0;
  position: fixed;
  transform: translateX(-113%);
  transition-duration: .2s;
  transition-timing-function: cubic-bezier(0,0,.2,1);
}
.slide-menu.active {
  transform: translateX(0);
}
@include media-breakpoint-up(lg) {
  .slide-menu {
    transform: translateX(0);
  }
  .content {
    margin-left: 250px;
  }
}

.sidebar .nav-link[aria-expanded=true] > .sidebar-expand svg {
  transform: rotate(180deg);
}

.sidebar .nav-link {
  padding: 0.75rem 1.25rem;
  color: $gray-800;
}

.sidebar .nav-link {
  border-right: 2px solid transparent;
}

.sidebar .nav-link[aria-expanded=true], .sub-menu {
  background: rgba($primary, 0.03);
}

.sidebar .nav-link:hover {
  background: rgba($primary, 0.05);
}

.sidebar .nav-link.active {
  color: $component-active-bg;
  background: rgba($primary, 0.07);
  border-right: 2px solid $component-active-bg;
}

.sidebar .nav-link.active > .sidebar-icon {
  color: $component-active-bg;
}

.sidebar-icon {
  color: $gray-600;
}

.sidebar .card-body {
  border-top: 1px solid $card-border-color;
}

.sidebar-footer {
  background: rgba($primary, 0.03);
}

.sidebar-section {
  min-height: 0;
}

.menu-underline .nav-link {
  color: $gray-600;
  border-bottom: 2px solid transparent;
}
.menu-underline .nav-link:hover {
  color: $gray-900;
  border-bottom: 2px solid $gray-600;
}
.menu-underline .nav-link.active {
  color: $primary;
  border-bottom: 2px solid $primary;
}
.menu-underline .nav-link.disabled {
  color: $navbar-light-disabled-color;
}
.menu-underline .nav-link svg {
  fill: $gray-600;
}
.menu-underline .nav-link:hover svg, .menu-underline .nav-link.active svg {
  fill: $gray-900;
}
.menu-underline .nav-link.active svg {
  fill: $primary;
}

/* Pricing Plans */
.plan-monthly, .plan-yearly {
  animation: fade-in .6s;
}

.plan-preload, .plan-no-animation {
  opacity: 1;
  animation: none;
}

#current-plan {
  height: add(1.75rem, $custom-range-thumb-focus-box-shadow-width * 2);

  &::-webkit-slider-thumb {
    width: 1.75rem;
    height: 1.75rem;
    margin-top: ($custom-range-track-height - 1.75rem) * .5; // Webkit specific
    background: $primary str-replace(url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%228%22%3E%3Cpath%20d%3D%22M10%2C4%2C6%2C0V8ZM0%2C4%2C4%2C0V8Z%22%20style%3D%22fill%3A%23fff%22%2F%3E%3C%2Fsvg%3E"), "#", "%23") no-repeat center;

    &:active {
      background: darken($primary, 7.5%) str-replace(url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%228%22%3E%3Cpath%20d%3D%22M10%2C4%2C6%2C0V8ZM0%2C4%2C4%2C0V8Z%22%20style%3D%22fill%3A%23fff%22%2F%3E%3C%2Fsvg%3E"), "#", "%23") no-repeat center;
    }
  }

  &::-moz-range-thumb {
    width: 1.75rem;
    height: 1.75rem;
    background: $primary str-replace(url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%228%22%3E%3Cpath%20d%3D%22M10%2C4%2C6%2C0V8ZM0%2C4%2C4%2C0V8Z%22%20style%3D%22fill%3A%23fff%22%2F%3E%3C%2Fsvg%3E"), "#", "%23") no-repeat center;

    &:active {
      background: darken($primary, 7.5%) str-replace(url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2210%22%20height%3D%228%22%3E%3Cpath%20d%3D%22M10%2C4%2C6%2C0V8ZM0%2C4%2C4%2C0V8Z%22%20style%3D%22fill%3A%23fff%22%2F%3E%3C%2Fsvg%3E"), "#", "%23") no-repeat center;
    }
  }

  &::-ms-thumb {
    width: 1.75rem;
    height: 1.75rem;
    background: $primary str-replace(url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%228%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8%20.5v7L12%204zM0%204l4%203.5v-7z%22%20fill%3D%22%23FFFFFF%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E"), "#", "%23") no-repeat center;

    &:active {
      background: darken($primary, 7.5%) str-replace(url("data:image/svg+xml,%3Csvg%20width%3D%2212%22%20height%3D%228%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M8%20.5v7L12%204zM0%204l4%203.5v-7z%22%20fill%3D%22%23FFFFFF%22%20fill-rule%3D%22nonzero%22%2F%3E%3C%2Fsvg%3E"), "#", "%23") no-repeat center;
    }
  }
}

/* Icons */
.pulsating-circle {
  left: 50%;
  top: 50%;
  transform: translateX(-50%) translateY(-50%);

  &:before {
    content: '';
    position: relative;
    display: block;
    width: 300%;
    height: 300%;
    box-sizing: border-box;
    margin-left: -100%;
    margin-top: -100%;
    border-radius: 50%;
    background-color: lighten($success, 0.5);
    animation: pulse-ring 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
  }

  &:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    display: block;
    width: 100%;
    height: 100%;
    background-color: $success;
    border-radius: 50%;
    animation: pulse-dot 2s cubic-bezier(0.455, 0.03, 0.515, 0.955) -.4s infinite;
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(.33);
  }
  80%, 100% {
    opacity: 0;
  }
}

@keyframes pulse-dot {
  0% {
    transform: scale(.8);
  }
  50% {
    transform: scale(1);
  }
  100% {
    transform: scale(.8);
  }
}

/* Toasts */
.toast {
  backdrop-filter: blur(10px);
}

/* Home */
.stat-card {
  transform: perspective(600px) rotateX(35deg);
  transition: transform .3s;
}

/* Charts */
.chart-progress {
  height: 0.3125rem;
}

/* Cookie Banner */
.cookie-banner {
  background: $toast-background-color;
  box-shadow: $toast-box-shadow;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

/* Animations */
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

::selection {
  background: $black;
  color: $white;
}

/* RTL Support */
[dir="rtl"] body {
  text-align: right;
}

[dir="rtl"] .sidebar .nav-link {
  border-right: 0;
  border-left: 2px solid transparent;
}

[dir="rtl"] .sidebar .nav-link.active {
  border-right: 0;
  border-left: 2px solid $component-active-bg;
}

/* Sidebar */
[dir="rtl"] .slide-menu {
  width: 250px;
  right: 0;
  left: auto;
  transform: translateX(113%);
}
[dir="rtl"] .slide-menu.active {
  transform: translateX(0);
}
@include media-breakpoint-up(lg) {
  [dir="rtl"] .slide-menu {
    transform: translateX(0);
  }
  [dir="rtl"] .content {
    margin-left: 0;
    margin-right: 250px;
  }
}

/* RTL BS Fixes */
[dir="rtl"] .was-validated .form-control:invalid,
[dir="rtl"] .form-control.is-invalid {
  padding-left: calc(1.5em + 0.75rem) !important; // !important fixes the icon padding for sm & lg inputs
}

/* Icons */
[dir="rtl"] .pulsating-circle {
  &:before {
    margin-left: auto;
    margin-right: -100%;
  }

  &:after {
    left: auto;
    right: 0;
  }
}