/* Range Slider */
.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--color-border);
    border-radius: 6px;
    outline: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--color-primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
    transition: transform 0.1s;
}

.custom-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.custom-range::-webkit-slider-thumb:active {
    transform: scale(0.95);
}

/* Device Buttons */
.device-btn.active {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: var(--color-primary);
}

.device-btn.active .btn-icon {
    color: var(--color-primary);
}

/* Frame Style Buttons */
.frame-style-btn.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px var(--color-primary);
}

/* Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* Background Patterns */
.pattern-dots {
    background-image: radial-gradient(#334155 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Canvas Wrapper display scaling */
.canvas-wrapper {
    /* Limit the logical display size of the wrapper while letting the internal canvas be high-res */
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#render-canvas {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
    /* Checkerboard for transparent backgrounds */
    background-image: linear-gradient(45deg, #1e293b 25%, transparent 25%), linear-gradient(-45deg, #1e293b 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #1e293b 75%), linear-gradient(-45deg, transparent 75%, #1e293b 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border-radius: 8px;
    /* For the wrapper look */
    overflow: hidden;
}