@use './tokens' as blog;

@include blog.block {
  &__float-actions {
    position: fixed;
    right: 20px;
    bottom: 35px;
    z-index: 1000;
    display: block;
    height: max-content;
    pointer-events: auto;
    transition: all 0.3s ease;
  }

  &__float-actions--left {
    right: auto;
    left: 20px;
  }

  &__float-action {
    position: relative;
    display: block;
    width: 42px;
    height: 42px;
    margin-top: 8px;
    overflow: visible;
    color: var(--argon-text) !important;
    border: none !important;
    background: var(--argon-control-soft) !important;
    padding: 0 !important;
    pointer-events: auto;
    transition:
      color 0.3s ease,
      background-color 0.3s ease,
      height 0.3s ease,
      margin 0.3s ease,
      opacity 0.3s ease,
      transform 0.3s ease,
      box-shadow 0.3s ease;

    &:hover {
      color: #fff !important;
      background-color: var(--themecolor) !important;
    }

    &::before {
      position: absolute;
      top: 7px;
      right: 50px;
      width: max-content;
      padding: 3px 10px;
      color: #fff;
      border-radius: 3px;
      background: #32325d;
      content: attr(tooltip);
      font-size: 12px;
      font-weight: 400;
      line-height: 22px;
      opacity: 0;
      pointer-events: none;
      text-transform: none;
      transform: translateX(5px);
      transition: all 0.3s ease;
    }

    &:hover::before {
      opacity: 0.7;
      transform: translateX(0);
    }
  }

  &__float-action--hidden {
    height: 0 !important;
    margin-top: 0;
    opacity: 0;
    pointer-events: none;
    box-shadow: none !important;
  }

  &__float-actions--left &__float-action::before {
    right: unset;
    left: 50px;
    transform: translateX(-5px);
  }

  &__float-actions--left &__float-action:hover::before {
    transform: translateX(0);
  }

  &__float-action--toggle-side {
    height: 30px !important;
    opacity: 0;
    transform: translateY(8px);

    &::before {
      top: 1px;
      content: attr(tooltip-move-to-left);
    }
  }

  &__float-actions:hover &__float-action--toggle-side {
    height: 30px !important;
    opacity: 1;
    transform: translateY(0);
  }

  &__float-actions--left &__float-action--toggle-side::before {
    content: attr(tooltip-move-to-right);
  }

  &__float-actions--settings-open &__float-action {
    overflow: hidden;
    opacity: 0.25;
    pointer-events: none;
  }

  &__float-actions--settings-open &__float-action--settings {
    color: #fff !important;
    opacity: 1 !important;
    pointer-events: unset !important;
    background-color: var(--themecolor-dark2) !important;
  }

  &__settings-panel {
    position: fixed;
    right: 85px;
    bottom: 35px;
    display: flex;
    width: max-content;
    min-width: 350px;
    max-width: calc(100vw - 170px);
    max-height: calc(100vh - 70px);
    flex-direction: column;
    gap: 14px;
    padding: 10px 25px;
    color: var(--argon-text);
    background: var(--argon-card) !important;
    pointer-events: auto;
    transform-origin: right bottom;
    z-index: 150;
  }

  &__float-actions--left &__settings-panel {
    right: unset;
    left: 85px;
    transform-origin: left bottom;
  }

  &__settings-close {
    margin-right: -12px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    text-align: right;
  }

  &__settings-item {
    display: flex;
    align-items: center;
    gap: 8px;

    > span:first-child {
      min-width: 62px;
      color: var(--argon-title);
      font-weight: 700;
    }
  }

  &__settings-button--font,
  &__settings-button--shadow {
    padding: 3px 10px;
    text-transform: none;
  }

  &__settings-button--active {
    color: #fff !important;
    background: var(--themecolor) !important;
  }

  &__settings-button--left {
    margin-right: 0 !important;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  &__settings-button--right {
    margin-left: 0 !important;
    border-left: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
  }

  &__settings-filter-row {
    align-items: center;
  }

  &__settings-filter-button {
    width: 50px !important;
    height: 50px !important;
    margin-left: 5px;
    border: 0 !important;
    border-radius: 50% !important;
    padding: 0 !important;
    font-size: 14px;
    white-space: nowrap;
    transition: all 0.3s ease;

    &:hover {
      box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
    }
  }

  &__settings-filter-button--active {
    border: 1px solid currentcolor !important;
  }

  &__settings-filter-button--off {
    color: var(--themecolor);
    background: rgba(var(--themecolor-rgbstr), 0.05) !important;

    &.kt-blog__settings-filter-button--active {
      border-color: var(--themecolor) !important;
    }
  }

  &__settings-filter-button--sunset {
    color: #6e5a00;
    background: rgb(255, 255, 200) !important;

    &.kt-blog__settings-filter-button--active {
      border-color: #6e5a00 !important;
    }
  }

  &__settings-filter-button--darkness {
    color: #eee;
    background: rgba(80, 80, 80, 0.7) !important;

    &.kt-blog__settings-filter-button--active {
      border-color: #111 !important;
    }
  }

  &__settings-filter-button--grayscale {
    color: #333;
    background: rgba(200, 200, 200, 0.8) !important;

    &.kt-blog__settings-filter-button--active {
      border-color: #333 !important;
    }
  }

  &__settings-color {
    width: 28px !important;
    height: 28px !important;
    border: 2px solid transparent !important;
  }

  &__settings-color--active {
    border-color: #fff !important;
    box-shadow: 0 0 0 2px var(--themecolor);
  }

  &__settings-color-picker {
    min-width: 132px;

    .ant-color-picker-trigger {
      width: 100%;
      color: var(--argon-text);
      border-color: var(--argon-border);
      background: var(--argon-control-soft);
    }
  }

  &__settings-color-presets {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }

  &__float-action--progress {
    height: 30px;
  }

  &__float-action-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: var(--card-radius);
    background: var(--themecolor);
    opacity: 0.08;
  }

  &__float-action-progress-text {
    position: relative;
    z-index: 1;
    font-size: 12px;
  }
}
