﻿/* angle slider demo styles - plain CSS section. The library ships zero CSS. */

/* The dial (inline: position: relative; touch-action: none; user-select: none; --bit-bh-angle) */
.dial {
    width: 8rem;
    aspect-ratio: 1;
    border: 1px solid var(--color-border-strong);
    border-radius: 50%;
    background: var(--color-surface);
    cursor: pointer;
}
.dial::after {                       /* the hub */
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: var(--color-primary);
    transform: translate(-50%, -50%);
}
.dial[data-dragging] { cursor: grabbing; }
.dial[data-disabled] { opacity: 0.5; cursor: not-allowed; }

/* Thumb and markers (inline: position: absolute; inset: 0; transform: rotate(angle)): draw at the top center. */
.dial-thumb { border-radius: 50%; outline: none; }
.dial-thumb::before {                /* the needle */
    content: "";
    position: absolute;
    left: calc(50% - 1.5px);
    top: 0.75rem;
    width: 3px;
    height: calc(50% - 0.75rem);
    border-radius: 2px;
    background: var(--color-primary);
}
.dial-thumb::after {                 /* the knob */
    content: "";
    position: absolute;
    left: 50%;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    background: #fff;
    transform: translateX(-50%);
}
.dial-thumb[data-focus-visible]::after { box-shadow: 0 0 0 3px var(--color-focus); }

.dial-mark::before {                 /* the tick */
    content: "";
    position: absolute;
    left: calc(50% - 1px);
    top: 2px;
    width: 2px;
    height: 0.375rem;
    background: var(--color-border-strong);
}
.dial-mark-labelled::before { display: none; }
.dial-mark-label {                   /* turned upright */
    position: absolute;
    left: 50%;
    top: -1.375rem;
    width: 1.5rem;
    margin-left: -0.75rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    transform: rotate(calc(-1 * var(--bit-bh-marker-angle)));
}
.dial-mark-labelled[data-state="at-value"] .dial-mark-label { color: var(--color-text); font-weight: 600; }

.dial-field { display: grid; justify-items: start; gap: 0.5rem; }
.dial-field .dial { margin: 1.75rem; }
.dial-label { font-size: 0.875rem; font-weight: 500; }
