/* V-Vision site extras: service status, latest version + file check, preset try-on, help window, my devices, review prompt.
   Everything is prefixed vvx- so it cannot collide with page styles. Colours come from the theme tokens in vv-theme.css. */

.vvx-hidden { display: none !important; }

/* ---------- service status pill (footer) ---------- */
.vvx-status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-soft); background: rgba(255,255,255,0.03); color: var(--muted); font-size: 0.78rem; line-height: 1; }
.vvx-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #3fdc8c; box-shadow: 0 0 0 0 rgba(63,220,140,0.5); animation: vvx-pulse 2.4s ease-out infinite; }
.vvx-status.is-bad .vvx-status-dot { background: #ffb547; box-shadow: none; animation: none; }
.vvx-status.is-loading .vvx-status-dot { background: var(--ghost); box-shadow: none; animation: none; }
@keyframes vvx-pulse { 0% { box-shadow: 0 0 0 0 rgba(63,220,140,0.45); } 70% { box-shadow: 0 0 0 8px rgba(63,220,140,0); } 100% { box-shadow: 0 0 0 0 rgba(63,220,140,0); } }
@media (prefers-reduced-motion: reduce) { .vvx-status-dot { animation: none; } }

/* ---------- footer help link ---------- */
.vvx-help-link { display: block; text-align: left; font: inherit; font-size: 0.86rem; color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; }
.vvx-help-link:hover { color: var(--text); }

/* ---------- latest version + file check ---------- */
.vvx-dl-card { max-width: 920px; margin: 0 auto; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(155deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)); padding: 28px; display: grid; gap: 22px; }
.vvx-dl-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.vvx-dl-ver { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vvx-dl-ver b { font-family: var(--font-display); font-size: 2rem; letter-spacing: -0.02em; }
.vvx-dl-badge { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; padding: 4px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(74,158,255,0.3); }
.vvx-dl-meta { color: var(--muted); font-size: 0.9rem; display: flex; gap: 18px; flex-wrap: wrap; }
.vvx-dl-notes { color: var(--muted); font-size: 0.92rem; line-height: 1.6; margin: 0; white-space: pre-line; }
.vvx-dl-notes-wrap { display: grid; gap: 6px; }
.vvx-dl-notes-wrap > b { font-size: 0.74rem; letter-spacing: 0.1em; color: var(--muted-2); text-transform: uppercase; }
.vvx-clamp { display: -webkit-box; -webkit-line-clamp: 6; line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.vvx-hash { display: grid; gap: 8px; }
.vvx-hash-label { font-size: 0.74rem; letter-spacing: 0.1em; color: var(--muted-2); font-weight: 600; }
.vvx-hash-row { display: flex; gap: 10px; align-items: stretch; }
.vvx-hash code { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(0,0,0,0.28); color: var(--text); font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.5; word-break: break-all; }
.vvx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,0.05); color: var(--text); font: inherit; font-size: 0.88rem; font-weight: 600; padding: 11px 18px; cursor: pointer; text-decoration: none; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.vvx-btn:hover { background: rgba(255,255,255,0.09); border-color: rgba(157,207,255,0.3); }
.vvx-btn:active { transform: translateY(1px); }
.vvx-btn-primary { background: var(--text); color: var(--bg); border-color: transparent; }
.vvx-btn-primary:hover { background: #fff; }
.vvx-btn-danger { color: #ff8a8a; border-color: rgba(255,138,138,0.3); }
.vvx-btn-danger:hover { background: rgba(255,138,138,0.1); border-color: rgba(255,138,138,0.5); }
.vvx-btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.vvx-verify { border-top: 1px solid var(--line-soft); padding-top: 16px; }
.vvx-verify summary { cursor: pointer; color: var(--accent-2); font-size: 0.9rem; font-weight: 600; list-style: none; }
.vvx-verify summary::-webkit-details-marker { display: none; }
.vvx-verify ol { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 0.88rem; line-height: 1.7; }
.vvx-verify pre { margin: 8px 0 0; padding: 12px 14px; border-radius: 10px; background: rgba(0,0,0,0.3); border: 1px solid var(--line-soft); color: var(--text); font-size: 0.8rem; overflow-x: auto; }
.vvx-warn { display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: rgba(255,181,71,0.07); border: 1px solid rgba(255,181,71,0.22); color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.vvx-warn b { color: var(--text); }
.vvx-skel { height: 120px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,255,255,0.03), rgba(255,255,255,0.07), rgba(255,255,255,0.03)); background-size: 200% 100%; animation: vvx-shimmer 1.4s linear infinite; }
@keyframes vvx-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---------- preset try-on (demo section) ---------- */
#lpAfterImg { transition: filter .35s ease; }
.vvx-presets { display: grid; gap: 10px; justify-items: center; margin-top: 14px; }
.vvx-presets-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.vvx-chip { font: inherit; font-size: 0.84rem; font-weight: 600; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.04); color: var(--muted); cursor: pointer; transition: all .15s ease; }
.vvx-chip:hover { color: var(--text); border-color: rgba(157,207,255,0.3); }
.vvx-chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: transparent; }
.vvx-presets small { color: var(--muted-2); font-size: 0.76rem; text-align: center; max-width: 520px; line-height: 1.5; }

/* ---------- modal ---------- */
.vvx-overlay { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(3,6,12,0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: vvx-fade .18s ease; }
@keyframes vvx-fade { from { opacity: 0; } to { opacity: 1; } }
.vvx-modal { width: min(600px, 100%); max-height: min(86vh, 720px); overflow: auto; border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(160deg, #0f1827, #0a111c); box-shadow: 0 30px 80px rgba(0,0,0,0.55); padding: 28px; animation: vvx-pop .2s ease; scrollbar-width: thin; }
@keyframes vvx-pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .vvx-overlay, .vvx-modal { animation: none; } }
.vvx-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.vvx-modal h3 { margin: 0; font-size: 1.25rem; }
.vvx-modal p { color: var(--muted); font-size: 0.92rem; line-height: 1.6; margin: 0 0 14px; }
.vvx-x { flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); font-size: 1.1rem; cursor: pointer; line-height: 1; }
.vvx-x:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.vvx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.vvx-faq details { border-top: 1px solid var(--line-soft); padding: 12px 0; }
.vvx-faq details:last-of-type { border-bottom: 1px solid var(--line-soft); }
.vvx-faq summary { cursor: pointer; font-weight: 600; font-size: 0.94rem; color: var(--text); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.vvx-faq summary::-webkit-details-marker { display: none; }
.vvx-faq summary::after { content: '+'; color: var(--muted-2); font-weight: 400; }
.vvx-faq details[open] summary::after { content: '–'; }
.vvx-faq details p { margin: 10px 0 0; font-size: 0.88rem; }
.vvx-faq a { color: var(--accent-2); }

/* ---------- review prompt ---------- */
.vvx-review { border-radius: 18px; border: 1px solid rgba(88,101,242,0.35); background: linear-gradient(155deg, rgba(88,101,242,0.14), rgba(88,101,242,0.04)); padding: 20px 22px; margin: 18px 0; display: grid; gap: 12px; }
.vvx-review h4 { margin: 0; font-size: 1.05rem; font-family: var(--font-display); }
.vvx-review p { margin: 0; color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.vvx-review-link { padding: 12px 14px; border-radius: 12px; background: rgba(0,0,0,0.22); border: 1px solid var(--line-soft); color: var(--muted); font-size: 0.86rem; line-height: 1.55; }
.vvx-review-link b { color: var(--text); }
.vvx-btn-discord { background: #5865f2; color: #fff; border-color: transparent; }
.vvx-btn-discord:hover { background: #6d79f5; }

/* ---------- my devices ---------- */
/* inside the account's two-column settings grid the card belongs under the content column, not the sidebar column */
.settings-layout > .vvx-devices { grid-column: 2; margin-top: 0; }
@media (max-width: 860px) { .settings-layout > .vvx-devices { grid-column: auto; } }
.vvx-devices { margin-top: 18px; border-radius: 20px; border: 1px solid var(--line); background: linear-gradient(155deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012)); padding: 24px 28px; }
.vvx-devices h3 { margin: 0 0 4px; font-size: 1.1rem; }
.vvx-devices-sub { color: var(--muted); font-size: 0.88rem; margin: 0 0 14px; line-height: 1.55; }
.vvx-device { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.vvx-device-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); }
.vvx-device-main { flex: 1; min-width: 0; }
.vvx-device-name { font-weight: 600; font-size: 0.94rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vvx-device-meta { color: var(--muted-2); font-size: 0.8rem; margin-top: 3px; display: flex; gap: 12px; flex-wrap: wrap; }
.vvx-tag { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.06em; padding: 3px 8px; border-radius: 999px; background: rgba(63,220,140,0.12); color: #3fdc8c; }
.vvx-online { display: inline-flex; align-items: center; gap: 6px; }
.vvx-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ghost); }
.vvx-online.is-on { color: #3fdc8c; }
.vvx-online.is-on::before { background: #3fdc8c; }
.vvx-devices-empty { color: var(--muted); font-size: 0.9rem; padding: 10px 0; }
.vvx-note { color: var(--muted-2); font-size: 0.8rem; margin-top: 12px; line-height: 1.55; }

@media (max-width: 640px) {
  .vvx-dl-card, .vvx-devices { padding: 20px 18px; }
  .vvx-hash-row { flex-direction: column; }
  .vvx-modal { padding: 22px 18px; border-radius: 18px; }
  .vvx-device { align-items: flex-start; flex-wrap: wrap; }
}

/* ======================================================================================================================
   Button motion (all .vvx-btn: review card and window, help window, devices, download).
   Rules that keep it from "breaking" under the cursor:
   - hover only SCALES the button (it grows around its centre, so the pointer can never fall off an edge and flicker);
   - nothing changes the button's size or the layout around it on hover (the arrow has reserved space);
   - entrance animations use fill-mode `backwards`, so they never freeze a transform over the hover/press states;
   - the breathing glow is a separate custom property, so hover glow and breathing combine instead of fighting.
   Hover effects live behind (hover: hover); everything is switched off for prefers-reduced-motion.
   ==================================================================================================================== */
@property --vvx-ring { syntax: '<length>'; inherits: false; initial-value: 0px; }

.vvx-btn { position: relative; overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
  transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .25s ease, background-color .2s ease, border-color .2s ease, color .2s ease, opacity .2s ease; }
/* light streak that sweeps across on hover */
.vvx-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255,255,255,0.24) 50%, transparent 68%); transform: translateX(-130%); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.vvx-btn:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
.vvx-btn:active { transform: scale(.97); transition-duration: .09s; }

@media (hover: hover) {
  .vvx-btn:hover { transform: scale(1.035); box-shadow: 0 10px 26px -10px rgba(74,158,255,0.55); }
  .vvx-btn:hover::before { transform: translateX(130%); }
  .vvx-btn:active { transform: scale(.97); }
  .vvx-btn-primary:hover { box-shadow: 0 10px 26px -10px rgba(255,255,255,0.5); }
  .vvx-btn-discord:hover { background: #6a76f6; box-shadow: 0 12px 30px -10px rgba(88,101,242,0.85), 0 0 0 var(--vvx-ring) rgba(88,101,242,0.18); }
  .vvx-btn-danger:hover { box-shadow: 0 10px 26px -12px rgba(255,138,138,0.6); }
}

/* the Discord call to action breathes softly so the eye finds it; the ring is a custom property, so hover never snaps it off */
.vvx-btn-discord { box-shadow: 0 0 0 var(--vvx-ring) rgba(88,101,242,0.18); animation: vvx-breathe 3.4s ease-in-out infinite; }
@keyframes vvx-breathe { 0%, 100% { --vvx-ring: 0px; } 50% { --vvx-ring: 7px; } }
.vvx-btn-discord.is-loading, .vvx-btn-discord[disabled] { animation: none; --vvx-ring: 0px; }

/* links that open Discord: a small arrow sits in reserved room on the right (so nothing changes size on hover); it is dimly visible
   at rest as an "opens another site" hint and slides up and to the right when hovered */
.vvx-btn-ext { padding-left: 18px; padding-right: 36px; }
.vvx-btn-ext::after { content: ''; position: absolute; right: 13px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; opacity: .5; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7M8 7h9v9'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: opacity .25s ease, transform .28s cubic-bezier(.2,.8,.2,1); }
@media (hover: hover) { .vvx-btn-ext:hover::after { opacity: 1; transform: translate(2px, -2px); } }
.vvx-btn-ext:focus-visible::after { opacity: 1; transform: translate(2px, -2px); }

/* click ripple (added by vv-extras.js) */
.vvx-ripple { position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; background: rgba(255,255,255,0.32); transform: scale(0); opacity: 1; animation: vvx-ripple .6s ease-out forwards; }
@keyframes vvx-ripple { to { transform: scale(1); opacity: 0; } }

/* loading state: a spinner after the label, no change of size beyond its own room */
.vvx-btn.is-loading { pointer-events: none; opacity: .9; }
.vvx-btn.is-loading::after { content: ''; position: static; display: inline-block; width: 14px; height: 14px; margin: 0 0 0 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff; opacity: 1; transform: none; animation: vvx-spin .7s linear infinite; }
@keyframes vvx-spin { to { transform: rotate(360deg); } }

/* the buttons of a window or card pop in one after another (backwards: the state before the delay only, nothing is held afterwards) */
.vvx-actions > .vvx-btn { animation: vvx-btn-in .5s cubic-bezier(.2,.8,.2,1) backwards; }
.vvx-actions > .vvx-btn:nth-child(1) { animation-delay: .10s; }
.vvx-actions > .vvx-btn:nth-child(2) { animation-delay: .18s; }
.vvx-actions > .vvx-btn:nth-child(3) { animation-delay: .26s; }
.vvx-actions > .vvx-btn:nth-child(4) { animation-delay: .34s; }
.vvx-actions > .vvx-btn-discord { animation: vvx-btn-in .5s cubic-bezier(.2,.8,.2,1) .10s backwards, vvx-breathe 3.4s ease-in-out 1s infinite; }
.vvx-actions > .vvx-btn-discord.is-loading, .vvx-actions > .vvx-btn-discord[disabled] { animation: none; }
@keyframes vvx-btn-in { from { opacity: 0; transform: translateY(12px) scale(.94); } }

@media (prefers-reduced-motion: reduce) {
  .vvx-btn, .vvx-btn::before, .vvx-btn-ext::after { transition: none; }
  .vvx-btn-discord, .vvx-actions > .vvx-btn, .vvx-actions > .vvx-btn-discord, .vvx-ripple { animation: none; }
  .vvx-btn:hover, .vvx-btn:active { transform: none; }
  .vvx-btn.is-loading::after { animation-duration: 1.6s; }
}
