/* Parent block alignment */
.block-apple-donation-slider {
  display: flex;
  justify-content: flex-start;
}

.block-apple-donation-slider.aligncenter {
  justify-content: center;
}

.block-apple-donation-slider.alignright {
  justify-content: flex-end;
}

/* Slider wrapper */
.apple-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  flex-shrink: 0;
}

.apple-slider-wrapper .field-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 25%;
}

.apple-slider-wrapper .input-container {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--wp--preset--color--white) !important;
}

.apple-slider-wrapper .left-label {
  font-size: 40px;
}

.apple-slider-wrapper input[type="number"] {
  width: 105px;
  padding: 8px;
  font-size: 40px;
  text-align: center;
  border: 0 !important;
  background: transparent;
  font-weight: bold;
  color: var(--wp--preset--color--white);
  -moz-appearance: textfield;
  appearance: textfield;
}

.apple-slider-wrapper input:focus {
  outline: transparent;
}

.apple-slider-wrapper input#rightOutput {
  cursor: default;
  padding: 8px;
}

/* Chrome, Safari, Edge */
#leftInput::-webkit-outer-spin-button,
#leftInput::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
#leftInput[type=number] {
  appearance: testfield;
  -moz-appearance: textfield;
}

.apple-slider-wrapper label {
  margin-top: 6px;
  text-align: center;
}

/* Slider section */
.apple-slider-wrapper .slider-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  width: 70%;
  /* ⬅️ wider slider */
}

.apple-slider-wrapper .arrow-wrapper {
  margin-top: 15px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 30px;
  font-size: 20px;
}

.apple-slider-wrapper .arrow-middle {
  font-size: inherit;
}

.apple-slider-wrapper {
  input[type="range"] {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin-top: -20px;

    &::-webkit-slider-runnable-track {
      height: 20px;
      background: #eee;
      border-radius: 10px;
      box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    }

    &::-moz-range-track {
      height: 20px;
      background: #eee;
      border-radius: 10px;
      box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    }

    &::-webkit-slider-thumb {
      appearance: none;
      -webkit-appearance: none;
      height: 60px;
      width: 60px;
      border-radius: 50%;
      background: url(/wp-content/mu-plugins/acf-blocks/blocks/apple-donation-slider/red-apple.png) center/cover no-repeat;
      cursor: pointer;
      border: none;
      margin-top: -25px;
      transform: rotate(var(--thumb-rotate, 0deg));
      transition: transform 0.05s linear;
    }

    &::-moz-range-thumb {
      height: 60px;
      width: 60px;
      border-radius: 50%;
      background: url(/wp-content/mu-plugins/acf-blocks/blocks/apple-donation-slider/red-apple.png) center/cover no-repeat;
      cursor: pointer;
      border: none;
      transform: translateY(-5px) rotate(var(--thumb-rotate, 0deg));
      transition: transform 0.05s linear;
    }
  }
}

.block-apple-donation-slider {
  display: inherit;
}

@media (max-width: 999px) {
  .block-apple-donation-slider {
    display: none;
  }
}
