.sft-tester {
    border: 1px solid #ccc;
    padding: 1rem;
}

/* --- Controls layout (default / desktop) --- */

.sft-controls-wrapper {
    margin-bottom: 1rem;
}

.sft-controls {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.sft-controls label {
    font-size: 14px;
    display: flex;
    flex-direction: column;
}

.sft-controls label span {
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 5px;
}

.sft-download {
    margin-left: auto;
    text-decoration: none;
    border: 1px solid #555;
    padding: 6px 12px;
    font-size: 14px;
}

.sft-download:hover {
    background: #444;
    color: white;
}

/* Hide toggle button on larger screens */
.sft-controls-toggle {
    display: none;
}

/* --- Preview --- */

.sft-preview {
    border: 1px dashed #aaa;
    padding: 1rem;
    min-height: fit-content;
    outline: none;
}

/* Mobile behavior */
@media (max-width: 768px) {

    .sft-controls-toggle {
        display: inline-block;
        margin-bottom: 0.5rem;
        background: transparent;
        border: 1px solid #222;
        color: #222;
        padding: 6px 12px;
        font-size: 14px;
        cursor: pointer;
        transition: .25s;
    }

    .sft-controls-toggle:hover {
        background-color: #222;
        color: white;
    }

    .sft-controls {
        display: none;
        flex-direction: column;
        gap: 0.75rem;
        margin-top: 0.5rem;
        animation: sft-slide 200ms ease-out;
    }

    .sft-controls.is-open {
        display: flex;
        align-items: flex-start;
        gap: 20px;
    }

    .sft-download {
        margin-left: 0;
        align-self: flex-start;
    }

    @keyframes sft-slide {
        from {
            opacity: 0;
            transform: translateY(-4px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* This is the CSS for the bar on the range slider */
.sft-controls input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 5px;  
  background: #d3d3d3;
  outline: none;
  opacity: 0.7;
  -webkit-transition: .2s;
  transition: opacity .2s;
}

/* The following two pieces of code are for the same thing – the "handle" on the range slider – but gives more browser support. I've added some extra CSS so they are pulling from the same content – you just need to change the values in the CSS variables, and it will affect both spots. */

.sft-controls input[type="range"] {
    --width : 15px;
    --height: 15px;
    --b-radius: 50%;
    --bg: tomato;
}

.sft-controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--width);
  height: var(--height);
  border-radius: var(--b-radius); 
  background: var(--bg);
  cursor: pointer;
}

.sft-controls input[type="range"]::-moz-range-thumb {
  width: var(--width);
  height: var(--height);
  border-radius: var(--b-radius); 
  background: var(--bg);
  cursor: pointer;
}