/* Native ColorRow uses a radius-9 swatch and a 244px, 11px-rounded popup. */
.th-color-swatch{--th-color-opacity:1;position:relative;display:block;flex:0 0 18px;width:18px;height:18px;min-width:18px;padding:0;border:1px solid rgb(233 236 231 / .1);border-radius:50%;background:conic-gradient(#5c605a 0deg 90deg,#767a74 90deg 180deg,#5c605a 180deg 270deg,#767a74 270deg);box-shadow:0 0 14px rgb(var(--th-color-rgb) / calc(var(--th-color-opacity) * .22));cursor:pointer;overflow:visible}
.th-color-swatch-fill{display:block;width:100%;height:100%;border-radius:inherit;background:rgb(var(--th-color-rgb) / var(--th-color-opacity));pointer-events:none}
.th-color-swatch:hover,.th-color-swatch[aria-expanded=true]{border-color:rgb(233 236 231 / .55);box-shadow:0 0 18px rgb(var(--th-color-rgb) / calc(var(--th-color-opacity) * .4))}
.th-color-swatch:focus-visible{outline:2px solid var(--accent,#7c4dff);outline-offset:3px}
.th-color-swatch:disabled{cursor:not-allowed;opacity:.38}
.th-color-popup{position:fixed;inset:auto;margin:0;padding:5px;width:244px;box-sizing:border-box;border:0;border-radius:11px;background:var(--raised,#181818);color:var(--text,#e9ece7);font-family:Inter,Arial,sans-serif;font-size:11px;line-height:1.25;transform-origin:top left;overflow:visible;z-index:1000;box-shadow:inset 0 0 0 1px var(--border,rgb(255 255 255 / .063)),0 8px 24px #0008;color-scheme:dark}
.th-color-popup[hidden]{display:none!important}
.th-color-popup::backdrop{background:transparent;pointer-events:none}
.th-color-heading{display:flex;align-items:center;justify-content:space-between;height:14px;margin-bottom:7px;padding-left:2px;color:var(--muted,#6e756a);font-size:9px;font-weight:600;letter-spacing:.8px}
.th-color-modes{display:flex;gap:3px;letter-spacing:0}
.th-color-mode{margin:0;padding:1px 4px;border:0;border-radius:4px;background:transparent;color:var(--muted,#6e756a);font:inherit;font-size:9px;line-height:12px;cursor:pointer}
.th-color-mode:hover,.th-color-mode[aria-pressed=true]{background:var(--control,#1d1d1d);color:var(--text,#e9ece7)}
.th-color-picker{display:grid;grid-template-columns:minmax(0,1fr) 25.5px 25.5px;gap:6px;height:171px}
.th-color-sv{position:relative;min-width:0;height:171px;box-sizing:border-box;background:linear-gradient(to top,#000,transparent),linear-gradient(to right,#fff,hsl(var(--th-color-hue) 100% 50%));cursor:crosshair;touch-action:none;border:1px solid #0004;outline:none}
.th-color-sv-marker{position:absolute;width:11px;height:11px;border:1px solid white;border-radius:50%;background:linear-gradient(rgb(var(--th-color-rgb) / var(--th-color-opacity)),rgb(var(--th-color-rgb) / var(--th-color-opacity))),conic-gradient(#808080 0deg 90deg,#ccc 90deg 180deg,#808080 180deg 270deg,#ccc 270deg);box-shadow:0 0 0 1px #808080;transform:translate(-50%,-50%);pointer-events:none}
.th-color-sv:focus-visible{outline:2px solid var(--accent,#7c4dff);outline-offset:2px}
.th-color-rail{position:relative;height:171px;min-width:0}
.th-color-bar{display:block;appearance:none;-webkit-appearance:none;writing-mode:vertical-lr;width:25.5px;height:171px;margin:0;padding:0;box-sizing:border-box;border:1px solid #0004;border-radius:0;outline:none;cursor:ns-resize;touch-action:none}
.th-color-hue{direction:ltr;background:linear-gradient(to bottom,#f00,#ff0,#0f0,#0ff,#00f,#f0f,#f00)}
.th-color-alpha{direction:rtl;background:linear-gradient(to bottom,rgb(var(--th-color-rgb)),rgb(var(--th-color-rgb) / 0)),repeating-conic-gradient(#ccc 0% 25%,#808080 0% 50%) 0 0/25.5px 25.5px}
.th-color-bar::-webkit-slider-thumb{appearance:none;-webkit-appearance:none;width:1px;height:1px;border:0;background:transparent}
.th-color-bar::-moz-range-thumb{width:1px;height:1px;border:0;background:transparent}
.th-color-bar-marker{position:absolute;left:-1px;right:-1px;height:0;pointer-events:none;filter:drop-shadow(0 0 1px #000)}
.th-color-bar-marker::before,.th-color-bar-marker::after{content:"";position:absolute;top:-5px;width:0;height:0;border-top:5px solid transparent;border-bottom:5px solid transparent}
.th-color-bar-marker::before{left:-1px;border-left:6px solid white}
.th-color-bar-marker::after{right:-1px;border-right:6px solid white}
.th-color-bar:focus-visible{outline:2px solid var(--accent,#7c4dff);outline-offset:2px}
.th-color-hex-row,.th-color-channel-row{margin-top:7px;height:27px}
.th-color-text,.th-color-channel{border:0;border-radius:7px;background:var(--control,#1d1d1d);color:var(--text,#e9ece7);box-sizing:border-box;height:27px;min-width:0;font:inherit}
.th-color-text{width:100%;padding:5px 8px;outline:none}
.th-color-text[aria-invalid=true]{outline:1px solid #f05b57}
.th-color-text:focus-visible,.th-color-channel:focus-within{outline:1px solid var(--accent,#7c4dff);outline-offset:0}
.th-color-channel-row{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.th-color-channel{display:flex;align-items:center;gap:2px;padding:0 3px;overflow:hidden}
.th-color-channel>span{flex:0 0 auto;color:var(--muted,#6e756a);font-size:9px}
.th-color-channel>input{display:block;width:100%;min-width:0;border:0;padding:0;background:transparent;color:inherit;font:inherit;font-size:10px;outline:none;appearance:textfield;-moz-appearance:textfield}
.th-color-channel>input::-webkit-inner-spin-button,.th-color-channel>input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
.th-color-popup button:focus-visible{outline:1px solid var(--accent,#7c4dff);outline-offset:1px}
.th-color-popup [hidden]{display:none!important}
.th-color-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
