/* vx-fields.js: every field a person can touch, in VeditX's glass. */
:root { --vxf-bg: rgba(16, 18, 30, .72); --vxf-ring: linear-gradient(135deg, rgba(255, 138, 216, .38), rgba(124, 196, 255, .38));
        --vxf-ring-on: linear-gradient(135deg, #ff8ad8, #c99bff 45%, #7cc4ff); --vxf-ink: #eef1fb; --vxf-dim: #8f97ad; }

/* the speech-bubble skin, for fields that were still the browser's default */
.vxf-skin { -webkit-appearance: none; appearance: none; box-sizing: border-box; min-height: 40px; padding: 9px 14px; border-radius: 16px;
  border: 1.5px solid transparent !important; color: var(--vxf-ink) !important; font: 500 14px/1.4 var(--sans, system-ui, sans-serif);
  background: linear-gradient(var(--vxf-bg), var(--vxf-bg)) padding-box, var(--vxf-ring) border-box !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 22px -14px rgba(0, 0, 0, .7); transition: box-shadow .2s, background .2s; }
textarea.vxf-skin { border-radius: 18px; padding: 11px 14px; resize: vertical; }
.vxf-skin::placeholder { color: var(--vxf-dim); }
.vxf-skin:hover { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 10px 26px -14px rgba(120, 140, 255, .45); }
.vxf-skin:focus { outline: none; background: linear-gradient(rgba(18, 20, 34, .86), rgba(18, 20, 34, .86)) padding-box, var(--vxf-ring-on) border-box !important;
  box-shadow: 0 0 0 4px rgba(124, 196, 255, .12), 0 0 28px -8px rgba(201, 155, 255, .6); }
select.vxf-sel, select.vxf-skin { padding-right: 38px; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23cfd8ff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px,
    linear-gradient(var(--vxf-bg), var(--vxf-bg)) padding-box, var(--vxf-ring) border-box !important; }
select.vxf-skin:focus, select.vxs-open { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23ffffff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 12px,
    linear-gradient(rgba(18, 20, 34, .9), rgba(18, 20, 34, .9)) padding-box, var(--vxf-ring-on) border-box !important; }
select.vxf-skin option { background: #141726; color: var(--vxf-ink); }
/* every field glows the same way on keyboard focus, whatever its own style */
:where(input, textarea, select):focus-visible { outline: 2px solid rgba(160, 175, 255, .55); outline-offset: 2px; }

/* the floating pill: microphone, V, and the live meter while speaking */
.vxf-tools { position: fixed; left: 0; top: 0; z-index: 2147483000; display: inline-flex; align-items: center; gap: 4px; padding: 0;
  border-radius: 999px; background: none; border: 0; box-shadow: none;
  transition: opacity .15s; animation: vxf-pop .18s cubic-bezier(.2, .9, .3, 1.3); will-change: transform; }
.vxf-tools[hidden] { display: none; }
/* the dock: the same V and mic, always on the field's corner */
.vxf-dock { position: fixed; left: 0; top: 0; z-index: 2147482000; display: inline-flex; align-items: center; gap: 4px; padding: 0;
  border-radius: 999px; background: none; border: 0; box-shadow: none; transition: opacity .15s; }
.vxf-dock.off { opacity: 0; pointer-events: none; }
.vxf-dock button { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #e9edff; background: rgba(255, 255, 255, .08); }
.vxf-dock button:hover { background: rgba(255, 255, 255, .18); }
.vxf-dock button[hidden] { display: none; }
.vxf-dock .vxf-mic svg { width: 14px; height: 14px; }
@keyframes vxf-pop { from { opacity: 0; scale: .85; } to { opacity: 1; scale: 1; } }
.vxf-tools button { width: 28px; height: 28px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  color: #e9edff; background: rgba(255, 255, 255, .08); transition: background .15s, transform .15s; }
.vxf-tools button:hover { background: rgba(255, 255, 255, .18); transform: translateY(-1px); }
.vxf-tools button[hidden] { display: none; }
.vxf-v b { font: 900 15px/1 var(--sans, system-ui); background: linear-gradient(135deg, #7cc4ff, #c99bff 55%, #ff8ad8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vxf-meter { display: none; width: 132px; height: 26px; margin: 0 2px 0 6px; }
.vxf-tools.rec .vxf-meter { display: block; }
.vxf-tools.rec .vxf-mic { color: #fff; background: linear-gradient(135deg, #ff5f8a, #c99bff); box-shadow: 0 0 0 4px rgba(255, 95, 138, .2); animation: vxf-live 1.4s ease-in-out infinite; }
@keyframes vxf-live { 50% { box-shadow: 0 0 0 7px rgba(255, 95, 138, .08); } }
.vxf-tools.busy .vxf-v, .vxf-tools.busy .vxf-mic { pointer-events: none; animation: vxf-spin 1s linear infinite; }
@keyframes vxf-spin { to { rotate: 1turn; } }

/* the glass list a dropdown opens */
.vxs-pop { position: fixed; z-index: 2147483001; overflow: auto; padding: 6px; border-radius: 18px; background: rgba(18, 20, 34, .9);
  -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 22px 50px -16px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .1); animation: vxf-pop .16s cubic-bezier(.2, .9, .3, 1.2);
  font: 500 14px/1.3 var(--sans, system-ui, sans-serif); color: var(--vxf-ink); }
.vxs-opt { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border: 0; border-radius: 12px;
  background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vxs-opt:hover, .vxs-opt.hl { background: rgba(255, 255, 255, .09); }
.vxs-opt.on { background: linear-gradient(135deg, rgba(124, 196, 255, .22), rgba(201, 155, 255, .22)); }
.vxs-opt i { font-style: normal; color: #9fd0ff; }
.vxs-opt:disabled { opacity: .4; cursor: default; }
.vxs-group { padding: 8px 12px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--vxf-dim); }

/* checkboxes, radios and sliders */
.vxf-check, .vxf-radio { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; margin: 0; flex: none; cursor: pointer; vertical-align: middle;
  border: 1.5px solid rgba(255, 255, 255, .28); background: rgba(16, 18, 30, .6); border-radius: 7px; display: inline-grid; place-items: center;
  transition: background .15s, border-color .15s, box-shadow .15s; }
.vxf-radio { border-radius: 50%; }
.vxf-check:checked, .vxf-radio:checked { border-color: transparent; background: linear-gradient(135deg, #7cc4ff, #c99bff); box-shadow: 0 0 14px -2px rgba(150, 170, 255, .6); }
.vxf-check:checked::after { content: ''; width: 10px; height: 6px; border: solid #0b0c14; border-width: 0 0 2.4px 2.4px; rotate: -45deg; translate: 0 -1px; }
.vxf-radio:checked::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #0b0c14; }
.vxf-check:focus-visible, .vxf-radio:focus-visible { outline: 2px solid rgba(160, 175, 255, .6); outline-offset: 2px; }
.vxf-range { -webkit-appearance: none; appearance: none; height: 22px; background: transparent; cursor: pointer; }
.vxf-range::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgba(124, 196, 255, .55), rgba(201, 155, 255, .55)); }
.vxf-range::-moz-range-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, rgba(124, 196, 255, .55), rgba(201, 155, 255, .55)); }
.vxf-range::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .5), 0 0 0 4px rgba(124, 196, 255, .25); }
.vxf-range::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 2px 10px rgba(0, 0, 0, .5), 0 0 0 4px rgba(124, 196, 255, .25); }
@media (prefers-reduced-motion: reduce) { .vxf-tools, .vxs-pop, .vxf-tools.rec .vxf-mic { animation: none; } }
