@use "./../vars";

$slider-component-height: 98px;

.codap-component.codap-slider.minimized {
  .slider-wrapper {
    height: 0
  }
}

.slider-wrapper {
  position: relative;
  overflow: clip;
  height: calc($slider-component-height - vars.$title-bar-height);
  transition: vars.$minimize-transition;
  background: #fff;
  border-radius: vars.$border-radius-bottom-corners;

  .slider {
    position: absolute;
    margin: 0 15px;
    bottom: -8px;

    .slider-thumb-icon {
      position: relative;
      bottom: 12px;
      cursor: grab;

      &.dragging {
        filter: drop-shadow(3px 1px 1px #555);
        cursor: grabbing;
      }
    }
    .slider-axis-wrapper {
      position: relative;
      display: flex;
      flex-direction: row;
      bottom: 12px;
      left: 0;
      height: 17px;

      .axis {
        font-size: 11px;
        fill: black;
      }

      .axis-end {
        position: relative;
        top: -7px;
        height: 15px;
        width: 2px;
        background-color: #888;

        &.min {
          left: 0;
        }
        &.max {
          right: 0;
        }
      }

      .slider-axis {
        width: 100%;
      }

    }
    .two-lines {
      height: 37px;
    }
  }

  .slider-control {
    align-items: center;
    line-height: 1;
    display: flex;
    flex-wrap: nowrap;

    .play-pause {
      border: none;
      padding: 0;
      line-height: 1;
      background-color: transparent;
      height: 24px;
      width: 24px;
      min-width: 0;

      &.paused svg {
        stroke: white;
        fill: rgb(10, 167, 10);
        height: 24px;
        width: 24px;
      }

      &.running svg {
        stroke-width: 4px;
        stroke: rgb(226, 61, 61);
        padding:3px;
        height: 24px;
        width: 24px;
      }
    }

    .slider-inputs {
      height: inherit;
      align-items: center;
      display: flex;
      flex-wrap: nowrap;

      .name-input {
        border-radius: 3px;
        border: none;
        max-height: 40px;
        white-space: nowrap;
        font-family: "museo-sans", sans-serif !important;
        font-size: 14px !important;

        .text-input {
          padding-inline-start: 0 !important;
          padding-inline-end: 0 !important;
          border: none !important;
        }
      }

      .value-input {
        overflow-wrap: normal;
        border-radius: 3px;
        border: none;
        font-size: 14px;
        .text-input {
          font-family: "museo-sans", sans-serif !important;
          font-size: 14px !important;
          padding-inline-start: 0 !important;
          padding-inline-end: 0 !important;
          border: none !important;
          height: inherit !important;
        }
      }

      .equals-sign {
        padding-bottom: 2px;
      }
    }
  }
}

.slider-input {
  input {
    padding-right: 8px;
  }
}
