/*
 * LiquidUI web — estructura de las piezas de cristal (liquidui.js). Requiere liquidbar.css antes.
 * Colores, cristal y muelles se pasan por opciones; aquí solo tamaños y disposición.
 */
.lui-seg, .lui-toggle, .lui-slider, .lui-search { -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none; }

/* 1 · Selector segmentado */
.lui-seg { position: relative; display: block; width: 100%; height: 40px; color: rgba(255,255,255,.78); font: inherit; }
.lui-seg-glass { position: absolute; inset: 0 auto auto 0; }
.lui-seg-row { position: absolute; top: 0; left: 0; display: flex; align-items: stretch; }
.lui-seg-item { flex: 1 1 0; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 0 6px; border: 0; background: none; color: inherit; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; border-radius: 999px; }
.lui-seg-item .lbw-ico { width: 18px; height: 18px; }
.lui-seg-item .lbw-ico > svg { width: 16px; height: 16px; }
.lui-seg-item:focus-visible { outline: 2px solid currentColor; outline-offset: -3px; }
.lui-seg-lab { overflow: hidden; text-overflow: ellipsis; }
.lui-seg-lens { z-index: 1; pointer-events: none; }
.lui-seg-clone { pointer-events: none; }
.lui-seg-clone .lui-seg-item { cursor: inherit; }
.lui-seg-hit { position: absolute; top: 0; left: 0; z-index: 2; border-radius: 999px; touch-action: none; cursor: grab; }

/* 2 · Interruptor */
.lui-toggle { position: relative; display: inline-block; flex: none; width: 64px; height: 28px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; touch-action: pan-y; vertical-align: middle; }
.lui-toggle:focus-visible { outline: 2px solid #0A84FF; outline-offset: 3px; border-radius: 999px; }
.lui-tg-track { position: absolute; inset: 0; border-radius: 999px; }
.lui-tg-thumb { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; --lbw-rim-w: .6px; }

/* 3 · Deslizador */
.lui-slider { position: relative; display: block; width: 100%; height: 44px; touch-action: pan-y; cursor: pointer; }
.lui-slider:focus-visible { outline: 2px solid #0A84FF; outline-offset: 2px; border-radius: 12px; }
.lui-sl-track { position: absolute; top: 19px; height: 6px; border-radius: 3px; overflow: hidden; }
.lui-sl-fill { height: 100%; border-radius: inherit; }
.lui-sl-ticks { position: absolute; top: 28px; height: 14px; pointer-events: none; }
.lui-sl-tick { position: absolute; top: 0; width: 2px; height: 5px; margin-left: -1px; border-radius: 1px; background: currentColor; opacity: .45; }
.lui-sl-tick em { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 10px; white-space: nowrap; opacity: .9; }
.lui-sl-thumb { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none; --lbw-rim-w: .6px; }
.lui-sl-bubble { position: absolute; top: 0; left: 0; z-index: 2; padding: 5px 10px; font-size: 13px; font-weight: 700; color: #fff; white-space: nowrap; pointer-events: none; border-radius: 999px; }

/* 4 · Botón de cristal */
.lui-gbtn { position: relative; isolation: isolate; transform-origin: center; touch-action: manipulation; }
.lui-gbtn > :not(.lbw-glow) { position: relative; z-index: 1; }

/* 5 · Chips */
.lui-chip { transform-origin: center; }

/* 6 · Insignia */
.lui-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; transform-origin: center; box-shadow: 0 0 0 2px rgba(0,0,0,.15); }
.lui-badge-dot { min-width: 10px; width: 10px; height: 10px; padding: 0; }
.lui-badge-drop { position: absolute; top: 0; left: 0; width: 8px; height: 8px; border-radius: 50%; pointer-events: none; z-index: 5; }

/* 7 · Isla líquida */
.lui-island { position: fixed !important; left: 50%; z-index: 1000; display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer; transform-origin: 50% 0; }
.lui-island-c { display: flex; align-items: center; gap: 10px; padding: 0 14px; white-space: nowrap; }
.lui-island-meter { position: fixed; top: -999px; left: 0; visibility: hidden; pointer-events: none; }
.lui-island-ico { display: inline-flex; }
.lui-island-ico .lbw-ico { width: 26px; height: 26px; }
.lui-island-t { display: flex; flex-direction: column; line-height: 1.2; }
.lui-island-t strong { font-size: 14px; font-weight: 700; }
.lui-island-t span { font-size: 12px; opacity: .75; }
.lui-island-t span:empty { display: none; }

/* 8 · Abanico de burbujas */
.lui-fan-layer { position: fixed; inset: 0; z-index: 900; pointer-events: none; }
.lui-fan-dim { position: absolute; inset: 0; background: #000; opacity: 0; }
.lui-fan-bubble { position: absolute; top: 0; left: 0; display: grid; place-items: center; color: #fff; pointer-events: none; cursor: default; --lbw-rim-w: .8px; }
.lui-fan-bubble .lbw-ico { width: 26px; height: 26px; }
.lui-fan-label { position: absolute; top: 0; left: 0; padding: 4px 10px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; border-radius: 999px; }

/* 9 · Lupa de gráficas */
.lui-chart { touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.lui-chart-lens { position: fixed !important; top: 0; left: 0; z-index: 950; pointer-events: none; --lbw-rim-w: .8px; }
.lui-chart-bubble { position: fixed !important; top: 0; left: 0; z-index: 951; display: flex; flex-direction: column; align-items: center; padding: 6px 12px; color: #fff; white-space: nowrap; pointer-events: none; border-radius: 16px !important; }
.lui-chart-bubble strong { font-size: 15px; }
.lui-chart-bubble span { font-size: 11px; opacity: .75; }

/* 10 · Buscar que se transforma */
.lui-search { position: relative; display: block; flex: none; color: #fff; }
.lui-search-glass { position: absolute; top: 0; left: 0; transform-origin: center; }
.lui-search-btn { position: absolute; top: 0; left: 0; z-index: 1; width: var(--lui-sz, 56px); height: 100%; display: grid; place-items: center; margin: 0; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 999px; aspect-ratio: 1; }
.lui-search-btn .lbw-ico { width: 26px; height: 26px; }
.lui-search-input { position: absolute; top: 50%; left: 50px; z-index: 1; height: 36px; margin-top: -18px; border: 0; outline: 0; background: none; color: inherit; font: inherit; font-size: 16px; }
.lui-search-input::placeholder { color: currentColor; opacity: .55; }
.lui-search-input::-webkit-search-cancel-button { display: none; }
.lui-search-x { position: absolute; top: 50%; right: 10px; z-index: 1; width: 32px; height: 32px; margin-top: -16px; display: grid; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: inherit; cursor: pointer; padding: 0; }
.lui-search-x .lbw-ico { width: 18px; height: 18px; }

/* 11 · Menú de pulsación larga */
.lui-cm-layer { position: fixed; inset: 0; z-index: 980; }
.lui-cm-back { position: absolute; inset: 0; background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2); opacity: 0; }
.lui-cm-ghost { position: fixed !important; z-index: 1; pointer-events: auto; transform-origin: center; }
.lui-cm-menu { position: fixed; z-index: 2; display: flex; flex-direction: column; gap: 8px; width: 220px; }
.lui-cm-item { position: relative !important; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 0; color: #fff; font: inherit; font-size: 15px; font-weight: 600; text-align: left; cursor: pointer; border-radius: 999px; transform-origin: 30% 50%; }
.lui-cm-item .lbw-ico { width: 20px; height: 20px; }
.lui-cm-item.is-danger { color: #FF6B60; }
.lui-cm-item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 12 · Tirar para recargar */
.lui-pull { position: fixed !important; left: 50%; top: 8px; z-index: 970; width: 40px; height: 40px; display: grid; place-items: center; color: #fff; pointer-events: none; transform-origin: 50% 0; --lbw-rim-w: .8px; }
.lui-pull-ico { display: grid; place-items: center; }
.lui-pull-ico .lbw-ico { width: 20px; height: 20px; }
.lui-pull-ico.is-busy svg path { stroke-dasharray: 18 6; }

/* 13 · Hoja inferior */
.lui-sheet-layer { position: fixed; inset: 0; z-index: 990; }
.lui-sheet-back { position: absolute; inset: 0; background: #000; opacity: 0; }
.lui-sheet { position: absolute !important; left: 8px !important; right: 8px; width: auto; border-radius: 28px !important; color: #fff; display: flex; flex-direction: column; }
.lui-sheet-head { position: relative; z-index: 1; flex: none; display: flex; flex-direction: column; align-items: center; padding: 8px 20px 6px; touch-action: none; cursor: grab; }
.lui-sheet-grab { display: block; width: 36px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.4); }
.lui-sheet-title { margin-top: 10px; font-size: 17px; font-weight: 700; }
.lui-sheet-body { position: relative; z-index: 1; overflow: auto; overscroll-behavior: contain; padding: 4px 20px 24px; }

/* Filos de cristal para elementos propios (botones): sin cambiar su posición */
.lui-gbtn { overflow: hidden; }
.lui-gbtn::before, .lui-gbtn::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 3;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.lui-gbtn::before { padding: var(--lbw-rim-w, .8px); background: linear-gradient(135deg, var(--lbw-rim, transparent) 0%, transparent 42%, transparent 58%, var(--lbw-rim-end, transparent) 100%); }
.lui-gbtn::after { padding: var(--lbw-drim-w, 1.6px); background: linear-gradient(225deg, var(--lbw-drim, transparent) 0%, transparent 35%, transparent 65%, var(--lbw-drim, transparent) 100%); }
.lui-gbtn > .lbw-glow { z-index: 0; }
