@tailwind base;
@tailwind components;
@tailwind utilities;

@layer utilities {
    .custom-scrollbar::-webkit-scrollbar {
        width: 4px;
    }

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

    .custom-scrollbar::-webkit-scrollbar-thumb {
        @apply bg-border rounded-full hover:bg-textMuted;
    }
}

/* Custom Range Input */
.custom-range {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    @apply bg-bg ring-1 ring-border/50;
    border-radius: 9999px;
    outline: none;
    transition: all 0.2s;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    @apply bg-primary;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
    border: 2px solid #1E293B;
    transition: transform 0.1s;
}

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

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

/* Custom Toggle Checkbox */
.toggle-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 32px;
    height: 16px;
    @apply bg-bg ring-1 ring-border;
    border-radius: 9999px;
    position: relative;
    cursor: pointer;
    outline: none;
    transition: background-color 0.2s;
}

.toggle-checkbox::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    @apply bg-textMuted;
    border-radius: 50%;
    transition: transform 0.2s, background-color 0.2s;
}

.toggle-checkbox:checked {
    @apply bg-primary/20 ring-primary/50;
}

.toggle-checkbox:checked::after {
    transform: translateX(16px);
    @apply bg-primary shadow-[0_0_5px_rgba(56, 189, 248, 0.5)];
}

/* Ensure no text selection on UI */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}