/* ==========================================================================
   Volt - assistant S2E
   ========================================================================== */
.volt { position: fixed; right: 20px; bottom: 20px; z-index: 400; font-family: var(--f-body); }
.volt__fab {
  position: relative; width: 62px; height: 62px; border-radius: 50%;
  background: var(--grad); color: #0B0F1E; display: grid; place-items: center;
  box-shadow: 0 14px 34px -10px rgba(247,148,29,.65), 0 0 0 0 rgba(247,148,29,.5);
  animation: voltPulse 2.8s infinite; transition: transform .4s var(--ease);
}
.volt__fab:hover { transform: scale(1.07) rotate(-6deg); }
.volt.is-open .volt__fab { animation: none; }
@keyframes voltPulse { 0% { box-shadow: 0 14px 34px -10px rgba(247,148,29,.65), 0 0 0 0 rgba(247,148,29,.45); } 70%, 100% { box-shadow: 0 14px 34px -10px rgba(247,148,29,.65), 0 0 0 16px rgba(247,148,29,0); } }
.volt__ico { width: 26px; height: 26px; position: absolute; transition: transform .45s var(--ease), opacity .3s; }
.volt__ico--bolt { fill: currentColor; }
.volt__ico--close { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; opacity: 0; transform: rotate(-90deg) scale(.5); }
.volt.is-open .volt__ico--bolt { opacity: 0; transform: rotate(90deg) scale(.5); }
.volt.is-open .volt__ico--close { opacity: 1; transform: none; }
.volt__badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; border-radius: 10px; background: #E8332A; color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--bg); }
.volt__badge[hidden] { display: none; }

.volt__teaser {
  position: absolute; right: 74px; bottom: 12px; width: max-content; max-width: 230px;
  padding: 12px 16px; border-radius: 16px 16px 4px 16px; background: var(--surface); color: var(--text);
  border: 1px solid var(--line); font-size: 14px; line-height: 1.4; cursor: pointer;
  box-shadow: 0 18px 40px -16px rgba(0,0,0,.45);
  opacity: 0; transform: translateX(12px) scale(.95); pointer-events: none; transition: opacity .4s var(--ease), transform .5s var(--ease);
}
.volt__teaser.is-shown { opacity: 1; transform: none; pointer-events: auto; }

.volt__panel {
  position: absolute; right: 0; bottom: 78px; width: min(390px, calc(100vw - 32px)); height: min(620px, calc(100vh - 130px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: 0 40px 90px -30px rgba(0,0,0,.6);
  transform-origin: 100% 100%; opacity: 0; transform: translateY(16px) scale(.92);
  transition: opacity .3s var(--ease), transform .45s var(--ease);
}
.volt.is-open .volt__panel { opacity: 1; transform: none; }
.volt__panel[hidden] { display: none; }

.volt__head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: relative; }
.volt__head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--grad); }
.volt__avatar { width: 40px; height: 40px; border-radius: 12px; background: var(--grad); display: grid; place-items: center; flex: none; }
.volt__avatar svg { width: 20px; height: 20px; fill: #0B0F1E; }
.volt__head div { flex: 1; min-width: 0; line-height: 1.25; }
.volt__head strong { font-family: var(--f-head); font-size: 18px; display: block; }
.volt__head small { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.volt__head small i { width: 7px; height: 7px; border-radius: 50%; background: #2BD96B; box-shadow: 0 0 6px #2BD96B; }
.volt__reset, .volt__x { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .3s, color .3s; }
.volt__reset:hover, .volt__x:hover { background: var(--bg-2); color: var(--text); }
.volt__reset svg, .volt__x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.volt__log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 10px; scroll-behavior: smooth; overscroll-behavior: contain; }
.volt__msg { max-width: 88%; padding: 11px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.5; animation: voltIn .45s var(--ease) both; overflow-wrap: anywhere; }
@keyframes voltIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.volt__msg--bot { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.volt__msg--user { align-self: flex-end; background: var(--grad); color: #0B0F1E; border-bottom-right-radius: 6px; font-weight: 600; }
.volt__msg a { color: var(--sun-2); text-decoration: underline; text-underline-offset: 2px; }
.volt__msg b { color: var(--text); }
.volt__msg--user b { color: inherit; }
.volt__dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.volt__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: voltDot 1s infinite; }
.volt__dots i:nth-child(2) { animation-delay: .15s; } .volt__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes voltDot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-5px); opacity: 1; } }

.volt__card { display: grid; gap: 6px; margin: 10px 0; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); border: 1px solid var(--line); font-size: 14px; }
.volt__card a { text-decoration: none; color: var(--text); font-weight: 600; }
.volt__card a:hover { color: var(--sun-2); }
.volt__refs { list-style: none; margin: 10px 0 4px; padding: 0; display: grid; gap: 8px; }
.volt__refs li { padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border-left: 3px solid var(--sun-2); display: grid; gap: 3px; }
.volt__refs strong { font-family: var(--f-head); font-size: 15px; }
.volt__refs em { font-style: normal; font-size: 11px; padding: 1px 8px; border-radius: 999px; background: var(--grad); color: #0B0F1E; font-weight: 600; justify-self: start; }
.volt__refs span { font-size: 13px; color: var(--muted); }
.volt__refs small, .volt__more { font-size: 11.5px; color: var(--muted); letter-spacing: .02em; }

.volt__chips { display: flex; gap: 8px; padding: 6px 16px 10px; overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.volt__chips::-webkit-scrollbar { display: none; }
.volt__chips:empty { padding: 0; }
.volt__chip { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); font-size: 13px; color: var(--text); background: var(--surface); transition: all .3s var(--ease); white-space: nowrap; animation: voltIn .4s var(--ease) both; }
.volt__chip:hover { border-color: var(--sun-2); color: var(--sun-2); transform: translateY(-2px); }
.volt__chip--link { border-style: dashed; }

.volt__form { display: flex; gap: 8px; padding: 10px 12px 8px; border-top: 1px solid var(--line); background: var(--surface); }
.volt__input { flex: 1; min-width: 0; height: 46px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color .3s; }
.volt__input:focus { border-color: var(--sun-2); }
.volt__input::placeholder { color: var(--muted); }
.volt__send { width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #0B0F1E; display: grid; place-items: center; flex: none; transition: transform .3s var(--ease); }
.volt__send:hover { transform: rotate(-12deg) scale(1.06); }
.volt__send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.volt__legal { margin: 0; padding: 0 16px 10px; font-size: 11px; color: var(--muted); background: var(--surface); text-align: center; }

@media (max-width: 640px) {
  .volt { right: 14px; bottom: 14px; }
  .volt__fab { width: 56px; height: 56px; }
  .volt.is-open .volt__fab { opacity: 0; pointer-events: none; }
  .volt__panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
  .volt__teaser { right: 66px; }
  .admin-bar .volt__panel { top: 46px; height: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .volt__fab { animation: none; }
}
