/* LinkVault polish layer — motion, feedback and layout fixes. Loaded last so it can refine earlier stylesheets. */
:root{--ease-out:cubic-bezier(.2,.8,.2,1);--ease-spring:cubic-bezier(.34,1.56,.64,1)}

/* ---------- Intro reveal (driven by splash.js) ---------- */
@keyframes lv-up{from{opacity:0;translate:0 18px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
@keyframes lv-drop{from{opacity:0;translate:0 -14px}to{opacity:1;translate:0 0}}
@keyframes lv-nav-in{from{opacity:0;translate:0 80px}to{opacity:1;translate:0 0}}
body.intro .topbar{animation:lv-drop .6s var(--ease-out) var(--intro-delay,0ms) both}
body.intro .collections-section .section-heading,
body.intro .hero{animation:lv-up .55s var(--ease-out) calc(var(--intro-delay,0ms) + 80ms) both}
body.intro .collection-vault-heading{animation:lv-up .55s var(--ease-out) calc(var(--intro-delay,0ms) + 140ms) both}
body.intro .collection-card{animation:lv-up .6s var(--ease-spring) calc(var(--intro-delay,0ms) + 200ms) both}
body.intro .collection-card:nth-child(2){animation-delay:calc(var(--intro-delay,0ms) + 260ms)}
body.intro .collection-card:nth-child(3){animation-delay:calc(var(--intro-delay,0ms) + 320ms)}
body.intro .collection-card:nth-child(4){animation-delay:calc(var(--intro-delay,0ms) + 380ms)}
body.intro .collection-card:nth-child(5){animation-delay:calc(var(--intro-delay,0ms) + 440ms)}
body.intro .collection-card:nth-child(n+6){animation-delay:calc(var(--intro-delay,0ms) + 500ms)}
body.intro .bottom-nav{animation:lv-nav-in .65s var(--ease-spring) calc(var(--intro-delay,0ms) + 120ms) both}

/* ---------- Dialogs & toasts ---------- */
@keyframes lv-sheet{from{opacity:0;translate:0 22px;scale:.97}to{opacity:1;translate:0 0;scale:1}}
@keyframes lv-backdrop{from{opacity:0}to{opacity:1}}
@keyframes lv-toast{from{opacity:0;translate:0 12px;scale:.96}to{opacity:1;translate:0 0;scale:1}}
dialog.modal[open]{animation:lv-sheet .34s var(--ease-out)}
dialog.modal[open]::backdrop{animation:lv-backdrop .25s ease}
.toast:not(.hidden){animation:lv-toast .3s var(--ease-spring)}

/* ---------- Touch feedback ---------- */
.primary-button,.secondary-button,.danger-button,.small-button,.icon-button,.filter-pill,.nav-item,.collection-card,.bookmark-card,.theme-option,.navigation-style-option,.sync-chip,.detail-square-button,.folder-chip{transition:scale .14s var(--ease-out),translate .14s var(--ease-out),background-color .2s ease,box-shadow .2s ease}
.primary-button:active,.secondary-button:active,.danger-button:active,.small-button:active,.icon-button:active,.filter-pill:active,.nav-item:active,.theme-option:active,.navigation-style-option:active,.sync-chip:active,.detail-square-button:active,.folder-chip:active{scale:.95}
.collection-card:active,.bookmark-card:active{scale:.98}
@media (hover:hover){.collection-card:hover,.bookmark-card:hover{translate:0 -3px}}
:focus-visible{outline:3px solid #f97316;outline-offset:2px;border-radius:10px}
input:focus-visible,textarea:focus-visible,select:focus-visible{outline-offset:0}

/* ---------- Living details ---------- */
@keyframes lv-pulse{0%,100%{opacity:1;scale:1}50%{opacity:.45;scale:1.5}}
.sync-chip.busy .sync-dot{animation:lv-pulse 1s ease-in-out infinite}
@keyframes lv-float{0%,100%{translate:0 0}50%{translate:0 -6px}}
.empty-state .empty-icon{display:inline-block;animation:lv-float 3.2s ease-in-out infinite}
.bookmark-card{animation:lv-up .42s var(--ease-out) both}
.collection-detail-card{animation:lv-up .42s var(--ease-out) both}

/* ---------- Layout fixes ---------- */
.collection-vault-heading h3{white-space:nowrap}
.collection-vault-heading{gap:10px;align-items:flex-end}
.modal-actions.split-actions{flex-wrap:wrap;gap:10px}
.modal-actions .right-actions{margin-left:auto;flex-wrap:wrap;justify-content:flex-end}
.modal-card{max-width:100%;box-sizing:border-box}
.modal-card select,.modal-card input,.modal-card textarea{max-width:100%;box-sizing:border-box}
.bottom-nav .nav-item small{white-space:nowrap}

@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
}
