Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 

341 строка
7.5 KiB

  1. @use '../atoms/variables' as *;
  2. @use '../atoms/mixins' as *;
  3. // ─── Nav-Button ──────────────────────────────────────────────────────────────
  4. .main-nav__stopwatch-wrap {
  5. position: relative;
  6. display: flex;
  7. align-items: center;
  8. margin: 0 $space-3;
  9. }
  10. .main-nav__stopwatch {
  11. @include icon-btn(auto, $radius-pill);
  12. color: rgba($color-white, 0.65);
  13. margin: 0 $space-1;
  14. gap: $space-1;
  15. padding: 0 $space-1;
  16. height: 32px;
  17. min-width: 32px;
  18. svg { width: 16px; height: 16px; }
  19. &:hover { color: $color-white; background: var(--header-overlay); }
  20. &--running {
  21. color: $color-success;
  22. gap: $space-2;
  23. &:hover { color: $color-success; }
  24. }
  25. }
  26. .main-nav__stopwatch-icon {
  27. position: relative;
  28. display: flex;
  29. align-items: center;
  30. justify-content: center;
  31. width: 30px;
  32. height: 30px;
  33. flex-shrink: 0;
  34. .main-nav__stopwatch--running & {
  35. &::before {
  36. content: '';
  37. position: absolute;
  38. inset: 0;
  39. border-radius: 50%;
  40. border: 2px solid transparent;
  41. border-top-color: $color-success;
  42. border-right-color: $color-success;
  43. animation: stopwatch-spin 1s linear infinite;
  44. }
  45. &::after {
  46. content: '';
  47. position: absolute;
  48. inset: 0;
  49. border-radius: 50%;
  50. border: 2px solid rgba($color-success, 0.2);
  51. }
  52. }
  53. }
  54. .main-nav__stopwatch-time {
  55. font-size: $font-size-xs;
  56. font-weight: $font-weight-bold;
  57. font-variant-numeric: tabular-nums;
  58. color: $color-success;
  59. white-space: nowrap;
  60. }
  61. @keyframes stopwatch-spin {
  62. to { transform: rotate(360deg); }
  63. }
  64. // ─── Popover ─────────────────────────────────────────────────────────────────
  65. .stopwatch-popover {
  66. position: absolute;
  67. top: 40px;
  68. left: 50%;
  69. transform: translateX(-50%);
  70. z-index: 300;
  71. @include card;
  72. padding: $space-4;
  73. width: 300px;
  74. display: flex;
  75. flex-direction: column;
  76. gap: $space-3;
  77. box-shadow: $shadow-calendar;
  78. &::before {
  79. content: '';
  80. position: absolute;
  81. top: -6px;
  82. left: 50%;
  83. transform: translateX(-50%) rotate(45deg);
  84. width: 12px;
  85. height: 12px;
  86. background: $color-card-white;
  87. border-radius: 2px 0 0 0;
  88. }
  89. }
  90. .stopwatch-popover__timer {
  91. font-size: $font-size-xl;
  92. font-weight: $font-weight-bold;
  93. color: $color-text-dark;
  94. text-align: center;
  95. font-variant-numeric: tabular-nums;
  96. letter-spacing: 0.02em;
  97. }
  98. .stopwatch-popover__form {
  99. display: flex;
  100. flex-direction: column;
  101. gap: $space-2;
  102. }
  103. .stopwatch-popover__actions {
  104. display: flex;
  105. gap: $space-2;
  106. margin-top: $space-1;
  107. .btn { flex: 1; }
  108. }
  109. // ─── Entry-Row Stopwatch-Button ──────────────────────────────────────────────
  110. .entry-row__btn--stopwatch {
  111. color: $color-text-muted;
  112. &:hover {
  113. background: rgba($color-success, 0.12);
  114. color: $color-success;
  115. }
  116. }
  117. .entry-row--timer-active {
  118. border-left: 3px solid $color-success;
  119. .entry-row__btn--stopwatch {
  120. color: $color-success;
  121. opacity: 1;
  122. position: relative;
  123. &::before {
  124. content: '';
  125. position: absolute;
  126. inset: 1px;
  127. border-radius: 50%;
  128. border: 2px solid transparent;
  129. border-top-color: $color-success;
  130. border-right-color: $color-success;
  131. animation: stopwatch-spin 1s linear infinite;
  132. }
  133. &::after {
  134. content: '';
  135. position: absolute;
  136. inset: 1px;
  137. border-radius: 50%;
  138. border: 2px solid rgba($color-success, 0.15);
  139. }
  140. }
  141. }
  142. // ─── Searchable Select ───────────────────────────────────────────────────────
  143. .searchable-select {
  144. position: relative;
  145. }
  146. .ss__trigger {
  147. display: flex;
  148. align-items: center;
  149. justify-content: space-between;
  150. width: 100%;
  151. padding: $space-2 $space-3;
  152. background: $color-input-bg;
  153. border: 1px solid $color-input-border;
  154. border-radius: $radius-sm;
  155. cursor: pointer;
  156. font-size: $font-size-sm;
  157. color: $color-text-base;
  158. text-align: left;
  159. transition: border-color $transition-fast;
  160. &:hover { border-color: var(--color-primary); }
  161. }
  162. .ss__value {
  163. @include text-truncate;
  164. flex: 1;
  165. color: $color-text-muted;
  166. &--selected { color: $color-text-dark; }
  167. }
  168. .ss__arrow {
  169. width: 10px;
  170. height: 10px;
  171. flex-shrink: 0;
  172. margin-left: $space-2;
  173. color: $color-text-muted;
  174. }
  175. .ss__dropdown {
  176. position: absolute;
  177. top: calc(100% + 4px);
  178. left: 0;
  179. right: 0;
  180. z-index: 400;
  181. background: $color-card-white;
  182. border: 1px solid $color-border;
  183. border-radius: $radius-md;
  184. box-shadow: $shadow-calendar;
  185. overflow: hidden;
  186. }
  187. .ss__search {
  188. display: block;
  189. width: 100%;
  190. padding: $space-2 $space-3;
  191. border: none;
  192. border-bottom: 1px solid $color-border;
  193. font-size: $font-size-sm;
  194. outline: none;
  195. background: $color-card;
  196. &::placeholder { color: $color-text-light; }
  197. }
  198. .ss__list {
  199. max-height: 200px;
  200. overflow-y: auto;
  201. }
  202. .ss__group {
  203. padding: $space-2 $space-3 $space-1;
  204. font-size: $font-size-xs;
  205. font-weight: $font-weight-bold;
  206. color: $color-text-dark;
  207. text-transform: uppercase;
  208. letter-spacing: 0.03em;
  209. &:not(:first-child) { border-top: 1px solid rgba($color-border, 0.5); }
  210. }
  211. .ss__item {
  212. padding: $space-1 $space-3 $space-1 $space-5;
  213. font-size: $font-size-sm;
  214. color: $color-text-base;
  215. cursor: pointer;
  216. &:hover,
  217. &--highlight { background: rgba(var(--color-primary-rgb), 0.08); }
  218. &--active { color: var(--color-primary); font-weight: $font-weight-medium; }
  219. }
  220. .ss__empty {
  221. padding: $space-3;
  222. text-align: center;
  223. color: $color-text-light;
  224. font-size: $font-size-sm;
  225. }
  226. // ─── Hamburger-Nav Stopwatch ─────────────────────────────────────────────────
  227. .hamburger-nav__stopwatch-wrap {
  228. position: relative;
  229. display: flex;
  230. align-items: center;
  231. }
  232. .hamburger-nav__stopwatch {
  233. display: flex;
  234. align-items: center;
  235. gap: $space-2;
  236. background: none;
  237. border: none;
  238. cursor: pointer;
  239. padding: $space-2;
  240. color: $color-text-muted;
  241. border-radius: $radius-lg;
  242. transition: color $transition-fast, background $transition-fast;
  243. &:hover { color: $color-text-dark; background: var(--color-bg); }
  244. &--running {
  245. color: $color-success;
  246. &:hover { color: $color-success; }
  247. }
  248. }
  249. .hamburger-nav__stopwatch-icon {
  250. position: relative;
  251. display: flex;
  252. align-items: center;
  253. justify-content: center;
  254. width: 30px;
  255. height: 30px;
  256. flex-shrink: 0;
  257. svg { width: 18px; height: 18px; }
  258. .hamburger-nav__stopwatch--running & {
  259. &::before {
  260. content: '';
  261. position: absolute;
  262. inset: 0;
  263. border-radius: 50%;
  264. border: 2px solid transparent;
  265. border-top-color: $color-success;
  266. border-right-color: $color-success;
  267. animation: stopwatch-spin 1s linear infinite;
  268. }
  269. &::after {
  270. content: '';
  271. position: absolute;
  272. inset: 0;
  273. border-radius: 50%;
  274. border: 2px solid rgba($color-success, 0.2);
  275. }
  276. }
  277. }
  278. .hamburger-nav__stopwatch-time {
  279. font-size: $font-size-sm;
  280. font-weight: $font-weight-bold;
  281. font-variant-numeric: tabular-nums;
  282. color: $color-success;
  283. white-space: nowrap;
  284. }
  285. .stopwatch-popover--hamburger {
  286. left: 0;
  287. transform: none;
  288. &::before { left: 20px; transform: rotate(45deg); }
  289. }