update-indicators.css 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. /* ==========================================================================
  2. SquidStats Update Indicators
  3. Professional animated badges and glows for available updates
  4. ========================================================================== */
  5. /* Base update badge */
  6. .update-badge {
  7. position: absolute;
  8. top: -6px;
  9. right: -6px;
  10. z-index: 10;
  11. align-items: center;
  12. justify-content: center;
  13. min-width: 18px;
  14. height: 18px;
  15. padding: 0 5px;
  16. font-size: 0.65rem;
  17. font-weight: 700;
  18. line-height: 1;
  19. color: #ffffff;
  20. border-radius: 9999px;
  21. border: 2px solid rgba(255, 255, 255, 0.9);
  22. box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  23. opacity: 0;
  24. transform: scale(0);
  25. visibility: hidden;
  26. transition: opacity 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
  27. transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
  28. visibility 0.35s ease;
  29. pointer-events: none;
  30. }
  31. .update-badge.is-visible {
  32. display: inline-flex !important;
  33. opacity: 1;
  34. transform: scale(1);
  35. visibility: visible;
  36. }
  37. /* Squid update badge */
  38. .update-badge--squid {
  39. background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  40. }
  41. /* Web update badge */
  42. .update-badge--web {
  43. background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  44. }
  45. /* Dot variant (compact mode) */
  46. .update-badge--dot {
  47. min-width: 10px;
  48. width: 10px;
  49. height: 10px;
  50. padding: 0;
  51. }
  52. /* Pulse ring around the button */
  53. .update-available::before {
  54. content: "";
  55. position: absolute;
  56. inset: -3px;
  57. z-index: 0;
  58. border-radius: inherit;
  59. opacity: 0;
  60. pointer-events: none;
  61. animation: update-pulse-ring 2.4s ease-out infinite;
  62. }
  63. .update-available--squid::before {
  64. box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  65. }
  66. .update-available--web::before {
  67. box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55);
  68. }
  69. @keyframes update-pulse-ring {
  70. 0% {
  71. opacity: 0.7;
  72. box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  73. }
  74. 50% {
  75. opacity: 0.35;
  76. }
  77. 100% {
  78. opacity: 0;
  79. box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
  80. }
  81. }
  82. .update-available--web.update-available::before {
  83. animation-name: update-pulse-ring-web;
  84. }
  85. @keyframes update-pulse-ring-web {
  86. 0% {
  87. opacity: 0.7;
  88. box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.55);
  89. }
  90. 50% {
  91. opacity: 0.35;
  92. }
  93. 100% {
  94. opacity: 0;
  95. box-shadow: 0 0 0 12px rgba(168, 85, 247, 0);
  96. }
  97. }
  98. /* Shimmer sweep across the button */
  99. .update-available::after {
  100. content: "";
  101. position: absolute;
  102. top: 0;
  103. left: -100%;
  104. width: 50%;
  105. height: 100%;
  106. background: linear-gradient(
  107. 90deg,
  108. rgba(255, 255, 255, 0) 0%,
  109. rgba(255, 255, 255, 0.25) 50%,
  110. rgba(255, 255, 255, 0) 100%
  111. );
  112. transform: skewX(-20deg);
  113. animation: update-shimmer 4s ease-in-out infinite;
  114. pointer-events: none;
  115. z-index: 1;
  116. border-radius: inherit;
  117. }
  118. @keyframes update-shimmer {
  119. 0%, 80%, 100% {
  120. left: -100%;
  121. }
  122. 90% {
  123. left: 150%;
  124. }
  125. }
  126. /* Icon attention animation */
  127. .update-icon-attention {
  128. animation: update-icon-wiggle 3s ease-in-out infinite;
  129. transform-origin: center;
  130. }
  131. @keyframes update-icon-wiggle {
  132. 0%, 85%, 100% {
  133. transform: rotate(0deg);
  134. }
  135. 88% {
  136. transform: rotate(-12deg);
  137. }
  138. 91% {
  139. transform: rotate(12deg);
  140. }
  141. 94% {
  142. transform: rotate(-8deg);
  143. }
  144. 97% {
  145. transform: rotate(0deg);
  146. }
  147. }
  148. /* Floating update tooltip */
  149. .update-tooltip {
  150. position: absolute;
  151. top: calc(100% + 8px);
  152. left: 50%;
  153. transform: translateX(-50%) translateY(4px);
  154. z-index: 50;
  155. min-width: max-content;
  156. max-width: 260px;
  157. padding: 6px 12px;
  158. font-size: 0.75rem;
  159. font-weight: 600;
  160. color: #ffffff;
  161. background: rgba(17, 24, 39, 0.95);
  162. border-radius: 8px;
  163. box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  164. opacity: 0;
  165. visibility: hidden;
  166. transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  167. pointer-events: none;
  168. white-space: nowrap;
  169. }
  170. .update-tooltip::before {
  171. content: "";
  172. position: absolute;
  173. bottom: 100%;
  174. left: 50%;
  175. transform: translateX(-50%);
  176. border-width: 5px;
  177. border-style: solid;
  178. border-color: transparent transparent rgba(17, 24, 39, 0.95) transparent;
  179. }
  180. .group:hover .update-tooltip,
  181. .update-btn-wrapper:hover .update-tooltip {
  182. opacity: 1;
  183. visibility: visible;
  184. transform: translateX(-50%) translateY(0);
  185. }
  186. /* Mobile version chips */
  187. .update-chip {
  188. align-items: center;
  189. gap: 4px;
  190. padding: 2px 8px;
  191. font-size: 0.65rem;
  192. font-weight: 700;
  193. border-radius: 9999px;
  194. color: #ffffff;
  195. margin-left: auto;
  196. opacity: 0;
  197. transform: scale(0.9);
  198. visibility: hidden;
  199. transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
  200. visibility 0.3s ease;
  201. }
  202. .update-chip.is-visible {
  203. display: inline-flex !important;
  204. opacity: 1;
  205. transform: scale(1);
  206. visibility: visible;
  207. }
  208. .update-chip--squid {
  209. background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  210. }
  211. .update-chip--web {
  212. background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  213. }
  214. /* Reduced motion support */
  215. @media (prefers-reduced-motion: reduce) {
  216. .update-available::before,
  217. .update-available::after,
  218. .update-icon-attention {
  219. animation: none;
  220. }
  221. .update-available::after {
  222. display: none;
  223. }
  224. }