/* stylelint-disable */

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
  border-radius: 10px;
  background-color: #f3f3fe;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #dadef3;
}

::-webkit-scrollbar-track {
  background-color: #f3f3fe;
  border-radius: 10px;
}

aside {
  ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
    border-radius: 10px;
    background-color: var(--jfv-gray-600);
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background-color: var(--jfv-gray-400);
  }

  ::-webkit-scrollbar-track {
    background-color: var(--jfv-gray-600);
    border-radius: 10px;
  }
}

.aside-opener {
  &:before, &:after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    background-color: inherit;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    animation: 2s asidePulseAnim infinite;
    z-index: -1;
  }
  &:after {
    animation-delay: .5s;
  }
}

.jf-wizard {
  &:after {
    content: "";
    pointer-events: none;
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 21, 81, 0.8);
    opacity: 0;
  }
}

html.is-widget-fullscreen {
  overflow: hidden !important;
  .jf-wizard {
    &:after {
      opacity: 1;
    }
  }
}
.jfOnboarding {
  min-height: unset !important;
}

// Range Slider
.range-slider {
  $range-handle-size: 22px !default;
  $range-track-height: 10px !default;
  width: 100%;
  .range-slider__range {
    -webkit-appearance: none;
    width: 100%;
    height: $range-track-height;
    border-radius: 5px;
    background: #f3f3fe;
    outline: none;
    padding: 0;
    margin: 0;

    // Range Handle
    &::-webkit-slider-thumb {
      appearance: none;
      width: $range-handle-size;
      height: $range-handle-size;
      border-radius: 50%;
      background: #fff;
      border: 1px solid #09f;
      cursor: pointer;
      transition: background 0.15s ease-in-out;

      &:hover {
        background: #09f;
      }
    }

    &:active::-webkit-slider-thumb {
      background: #09f;
    }

    &::-moz-range-thumb {
      width: $range-handle-size;
      height: $range-handle-size;
      border: 0;
      border-radius: 50%;
      background: #fff;
      border: 1px solid #09f;
      cursor: pointer;
      transition: background 0.15s ease-in-out;

      &:hover {
        background: #09f;
      }
    }

    &:active::-moz-range-thumb {
      background: #09f;
    }

    // Focus state
    &:focus {
      &::-webkit-slider-thumb {
        box-shadow:
          0 0 0 3px #fff,
          0 0 0 6px #09f;
      }
    }
    // Firefox Overrides
    ::-moz-range-track {
      background: #f3f3fe;
      border: 0;
    }

    input::-moz-focus-inner,
    input::-moz-focus-outer {
      border: 0;
    }
  }
}

.step-1-section {
  position: relative;
  &:before {
    content: '';
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-image: url('../../../assets/img-min/step1-left.svg');
    background-repeat: no-repeat;
    html[dir="rtl"] & {
      transform: rotateY(180deg);
    }
  }
  &:after {
    content: '';
    position: absolute;
    z-index: -1;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-image: url('../../../assets/img-min/step1-right.svg');
    background-position: right top;
    background-size: auto 90%;
    background-repeat: no-repeat;
    html[dir="rtl"] & {
      transform: rotateY(180deg);
    }
    @media screen and (max-width: 768px) {
      display: none;
    }
  }
}

@keyframes asidePulseAnim {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    transform: scale(1.5);
    opacity: 0;
  }
}

//rds floating toolbox
.floating-toolbox {
  display: none !important;
}

// WebsiteWidgetWizard - semantic styles (replaces utility classes)
@import '../../../styles/UI/variables';

.wizard {
  width: 100%;
  transition-duration: 300ms;

  &--initializing {
    height: 0;
    opacity: 0;
  }

  &--ready {
    min-height: 90vh;
    max-height: 448px;
    opacity: 1;
    padding: 16px;
  }

  &--fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100dvh;
    padding: 8px;
  }

  &__main {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    background: var(--jfv-white);
    box-shadow: 0 16px 24px 0 rgba(84, 95, 111, 0.16), 0 2px 8px 0 rgba(37, 45, 91, 0.04);
    overflow: hidden;

    &--fullscreen {
      border-radius: 8px;
    }

    &--normal {
      border-radius: 16px;
    }
  }

  &__header {
    width: 100%;
    padding: 16px;
    min-height: 64px;
    border-bottom: 1px solid var(--jfv-navy-50);
    display: flex;
    align-items: center;
    justify-content: center;

    @media (min-width: 768px) {
      min-height: 72px;
    }
  }

  &__back-button {
    position: absolute;
    left: 16px;

    html[dir="rtl"] & {
      left: auto;
      right: 16px;
    }
  }

  &__fullscreen-button {
    position: absolute;
    right: 16px;

    html[dir="rtl"] & {
      right: auto;
      left: 16px;
    }
  }

  &__title-area {
    color: var(--jfv-gray-400);
    font-size: 16px;
    text-align: center;
    font-weight: 400;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    margin: 0 auto;

    @media (min-width: 640px) {
      padding: 0 112px;
    }

    @media (min-width: 768px) {
      font-size: 20px;
    }

    &--editable {
      cursor: pointer;
    }

    &--full-width {
      width: 100%;
    }
  }

  &__title-text {
    color: var(--jfv-gray-400);
    font-size: 16px;
    text-align: center;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;

    @media (min-width: 768px) {
      font-size: 20px;
    }
  }

  &__title-input-wrapper {
    width: 100%;
  }

  &__title-input {
    color: var(--jfv-gray-400);
    font-size: 16px;
    text-align: center;
    font-weight: 400;
    width: 100%;
    overflow: hidden;
    border: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;

    &:focus {
      border: 0;
      outline: 0;
      box-shadow: none;
    }

    &:hover {
      border: 0;
    }

    @media (min-width: 768px) {
      font-size: 20px;
    }
  }

  &__title-edit-icon {
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    color: var(--jfv-gray-300);
    cursor: pointer;
    flex-shrink: 0;
  }

  &__content-area {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    margin: 0 auto;
  }

  &__aside-opener {
    position: absolute;
    z-index: 1;
    top: 16px;
    left: 16px;
    transition-duration: 200ms;

    html[dir="rtl"] & {
      left: auto;
      right: 16px;
    }

    &--visible {
      opacity: 1;
    }

    &--hidden {
      opacity: 0;
      pointer-events: none;
    }
  }

  &__step-1 {
    position: absolute;
    z-index: 5;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
  }

  &__step-1-inner {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    background-repeat: no-repeat;
    background-size: cover;
  }

  &__step-1-content {
    width: 100%;
    max-width: 614px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
    padding: 16px 32px;
    margin: 0 auto;

    @media (min-width: 1024px) {
      width: 50%;
      padding: 0 0 0 112px;
      margin: 0;

      html[dir="rtl"] & {
        padding: 0 112px 0 0;
      }
    }
  }

  &__step-1-heading {
    font-weight: 700;
    color: var(--jfv-gray-400);
    font-size: 24px;

    @media (min-width: 1024px) {
      font-size: 36px;
    }
  }

  &__step-1-description {
    color: var(--jfv-gray-300);
    font-size: 18px;
    line-height: 1.5;
  }

  &__step-1-actions {
    position: relative;
    width: 100%;
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;

    @media (min-width: 1024px) {
      flex-direction: row;
    }
  }

  &__step-1-button {
    width: 100%;

    @media (min-width: 1024px) {
      width: 50%;
    }
  }

  &__step-1-image {
    display: none;
    width: 50%;

    @media (min-width: 768px) {
      display: inline-flex;
    }

    img {
      max-width: 90%;
    }
  }

  &__my-widgets {
    position: absolute;
    z-index: 5;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
  }

  &__my-widgets-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  &__my-widgets-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-direction: column;
    gap: 16px;

    @media (min-width: 768px) {
      flex-direction: row;
      align-items: center;
    }
  }

  &__my-widgets-title {
    font-weight: 700;
    color: var(--jfv-gray-400);
    font-size: 32px;
  }

  &__my-widgets-actions {
    display: inline-flex;
    gap: 8px;
  }

  &__widgets-list {
    width: 100%;
    height: 100%;
    max-height: 480px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    overflow: auto;
    border-radius: 4px;
  }

  &__widgets-table {
    table-layout: auto;
    text-align: left;
    width: 100%;
    min-width: 448px;
    background: var(--jfv-white);
    font-size: 14px;
  }

  &__widgets-thead {
    background: var(--jfv-white);
    position: sticky;
    top: 0;
    z-index: 1;
  }

  &__widgets-th {
    font-weight: 700;
    padding: 16px 12px;
    color: var(--jfv-gray-500);
    background: var(--jfv-navy-25);
    opacity: 0.5;
    cursor: pointer;
    transition: background-color 0.3s;

    &:hover {
      background: var(--jfv-navy-50);
    }

    &--name {
      width: 100%;
    }

    &--date {
      width: 240px;
    }

    &--visibility {
      width: 240px;
    }

    &--actions {
      width: 112px;
      text-align: center;
    }
  }

  &__widgets-th-content {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding-left: 8px;
  }

  &__widgets-th-icons {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
  }

  &__sort-icon {
    transition: opacity 0.3s;
    transform: translateY(4px);

    &--asc {
      opacity: 1;
    }

    &--asc-inactive {
      opacity: 0.3;
    }

    &--desc {
      opacity: 1;
      transform: translateY(-4px);
    }

    &--desc-inactive {
      opacity: 0.3;
      transform: translateY(-4px);
    }
  }

  &__widgets-row {
    &--active {
      color: var(--jfv-gray-400);
    }

    &--inactive {
      color: var(--jfv-gray-300);
    }
  }

  &__widgets-td {
    border-top: 1px solid var(--jfv-navy-75);
    padding: 16px 12px;
  }

  &__widgets-td--actions {
    text-align: center;
  }

  &__widgets-cell-content {
    display: inline-flex;
    align-items: center;
  }

  &__widgets-cell-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  &__widget-icon {
    width: 32px;
    height: 32px;
    margin-right: 8px;

    &--inactive {
      opacity: 0.6;
    }
  }

  &__widget-name {
    word-break: break-all;

    &--inactive {
      opacity: 0.6;
    }
  }

  &__widget-visibility {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  &__empty-state {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    box-shadow: 0 16px 24px 0 rgba(84, 95, 111, 0.16);
  }

  &__empty-state-inner {
    width: 100%;
    max-width: 512px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px;

    @media (min-width: 768px) {
      padding: 48px;
    }
  }

  &__empty-state-image {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  &__empty-state-img {
    object-fit: contain;
    max-width: 272px;
    max-height: 142px;
  }

  &__empty-state-title {
    font-weight: 700;
    color: var(--jfv-gray-400);
    font-size: 24px;
    text-align: center;

    @media (min-width: 768px) {
      font-size: 30px;
    }
  }

  &__empty-state-description {
    color: var(--jfv-gray-300);
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
    max-width: 448px;
  }

  &__empty-state-button {
    width: 100%;

    @media (min-width: 768px) {
      width: auto;
      min-width: 192px;
    }
  }

  &__aside {
    background: #292D3C;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    position: absolute;
    z-index: 4;
    transition-duration: 200ms;
    max-width: 25rem;

    html[dir="rtl"] & {
      transform: translateX(100%);
    }

    &--collapsed {
      transform: translateX(-100%);

      html[dir="rtl"] & {
        transform: translateX(100%);
      }
    }

    &--expanded {
      transform: translateX(0);

      html[dir="rtl"] & {
        transform: translateX(0);
      }
    }

    &--hidden {
      opacity: 0;
    } 
  }

  &__aside-header {
    min-height: 48px;
    position: relative;
    padding: 16px;
    padding-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--jfv-gray-500);
  }

  &__aside-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--jfv-white);

    @media (min-width: 768px) {
      font-size: 20px;
    }
  }

  &__aside-tabs {
    min-height: 48px;
  }

  &__aside-content {
    height: 100%;
    overflow-y: auto;
    flex-grow: 1;
    padding: 16px 16px 0;
  }

  &__aside-fields {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
  }

  &__aside-actions {
    padding: 16px 20px;

    &-button {
      width: 100%;
    }
  }

  &__preview-section {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-duration: 200ms;

    &--mobile-padding {
      padding: 24px;
    }

    &--aside-expanded {
      @media (min-width: 768px) {
        padding-left: 400px;

        html[dir="rtl"] & {
          padding-left: 0;
          padding-right: 400px;
        }
      }
    }

    &--hidden {
      opacity: 0;
    }
  }

  &__device-toggle {
    position: absolute;
    top: 24px;
    right: 24px;
    border-radius: 4px;
    overflow: visible;
    display: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    color: var(--jfv-navy-500);

    html[dir="rtl"] & {
      right: auto;
      left: 24px;
    }

    @media (min-width: 640px) {
      display: flex;
    }

    .jfButton--icon {
      color: var(--jfv-navy-500);
      
      svg {
        fill: currentColor;
        color: var(--jfv-navy-500);
      }
    }

    &:hover .jfButton--icon {
      color: var(--jfv-navy-600);
      
      svg {
        fill: currentColor;
        color: var(--jfv-navy-600);
      }
    }
  }

  &__iframe-wrapper {
    width: 100%;
    height: 100%;
    overflow: hidden;

    &--mobile {
      max-width: 352px;
      min-height: 320px;
      border: 1px solid var(--jfv-navy-50);
      margin: 0 auto;
    }
  }

  &__iframe-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
  }

  &__iframe {
    width: 100%;
    height: 100%;
    border: 0;
  }

  &__embed-code-block {
    border-radius: 4px;
    background: var(--jfv-navy-700);
    color: var(--jfv-white);
    padding: 16px;
  }

  &__embed-code {
    word-break: break-word;
  }

  &__embed-platform-title {
    font-weight: 500;
    margin-top: 20px;
    padding-bottom: 8px;
  }

  &__embed-instructions {
    height: 240px;
    min-height: 240px;
    padding: 12px;
    border-radius: 4px;
    background: var(--jfv-navy-25);
    overflow: auto;
  }

  &__embed-instructions-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  &__embed-instruction-item {
    display: flex;
    align-items: flex-start;
    font-size: 14px;
    gap: 8px;
  }

  &__embed-instruction-number {
    width: 24px;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  &__embed-instruction-text {
    text-align: left;
    width: fit-content;
    line-height: 1.45;

    .wizard__embed-instruction-strong {
      font-weight: 600;
    }
  }

  &__dialog-body {
    padding-top: 32px;
    padding-left: 32px;
    padding-right: 32px;
  }

  &__dialog-description {
    line-height: 1.5;
    word-break: break-word;
  }
}
