|
- @use '../atoms/variables' as *;
- @use '../atoms/mixins' as *;
-
- // ─── Nav-Button ──────────────────────────────────────────────────────────────
- .main-nav__stopwatch-wrap {
- position: relative;
- display: flex;
- align-items: center;
- margin: 0 $space-3;
- }
-
- .main-nav__stopwatch {
- @include icon-btn(auto, $radius-pill);
- color: rgba($color-white, 0.65);
- margin: 0 $space-1;
- gap: $space-1;
- padding: 0 $space-1;
- height: 32px;
- min-width: 32px;
-
- svg { width: 16px; height: 16px; }
-
- &:hover { color: $color-white; background: var(--header-overlay); }
-
- &--running {
- color: $color-success;
- gap: $space-2;
-
- &:hover { color: $color-success; }
- }
- }
-
- .main-nav__stopwatch-icon {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 30px;
- height: 30px;
- flex-shrink: 0;
-
- .main-nav__stopwatch--running & {
- &::before {
- content: '';
- position: absolute;
- inset: 0;
- border-radius: 50%;
- border: 2px solid transparent;
- border-top-color: $color-success;
- border-right-color: $color-success;
- animation: stopwatch-spin 1s linear infinite;
- }
-
- &::after {
- content: '';
- position: absolute;
- inset: 0;
- border-radius: 50%;
- border: 2px solid rgba($color-success, 0.2);
- }
- }
- }
-
- .main-nav__stopwatch-time {
- font-size: $font-size-xs;
- font-weight: $font-weight-bold;
- font-variant-numeric: tabular-nums;
- color: $color-success;
- white-space: nowrap;
- }
-
- @keyframes stopwatch-spin {
- to { transform: rotate(360deg); }
- }
-
- // ─── Popover ─────────────────────────────────────────────────────────────────
- .stopwatch-popover {
- position: absolute;
- top: 40px;
- left: 50%;
- transform: translateX(-50%);
- z-index: 300;
- @include card;
- padding: $space-4;
- width: 300px;
- display: flex;
- flex-direction: column;
- gap: $space-3;
- box-shadow: $shadow-calendar;
-
- @include mobile {
- width: calc(100vw - #{$space-8});
- left: 0;
- transform: none;
- }
-
- &::before {
- content: '';
- position: absolute;
- top: -6px;
- left: 50%;
- transform: translateX(-50%) rotate(45deg);
- width: 12px;
- height: 12px;
- background: $color-card-white;
- border-radius: 2px 0 0 0;
- }
- }
-
- .stopwatch-popover__timer {
- font-size: $font-size-xl;
- font-weight: $font-weight-bold;
- color: $color-text-dark;
- text-align: center;
- font-variant-numeric: tabular-nums;
- letter-spacing: 0.02em;
- }
-
- .stopwatch-popover__form {
- display: flex;
- flex-direction: column;
- gap: $space-2;
- }
-
- .stopwatch-popover__actions {
- display: flex;
- gap: $space-2;
- margin-top: $space-1;
-
- .btn { flex: 1; }
- }
-
- // ─── Entry-Row Stopwatch-Button ──────────────────────────────────────────────
- .entry-row__btn--stopwatch {
- color: $color-text-muted;
-
- &:hover {
- background: rgba($color-success, 0.12);
- color: $color-success;
- }
- }
-
- .entry-row--timer-active {
- border-left: 3px solid $color-success;
-
- .entry-row__btn--stopwatch {
- color: $color-success;
- opacity: 1;
- position: relative;
-
- &::before {
- content: '';
- position: absolute;
- inset: 1px;
- border-radius: 50%;
- border: 2px solid transparent;
- border-top-color: $color-success;
- border-right-color: $color-success;
- animation: stopwatch-spin 1s linear infinite;
- }
-
- &::after {
- content: '';
- position: absolute;
- inset: 1px;
- border-radius: 50%;
- border: 2px solid rgba($color-success, 0.15);
- }
- }
- }
-
- // ─── Searchable Select ───────────────────────────────────────────────────────
- .searchable-select {
- position: relative;
- }
-
- .ss__trigger {
- display: flex;
- align-items: center;
- justify-content: space-between;
- width: 100%;
- padding: $space-2 $space-3;
- background: $color-input-bg;
- border: 1px solid $color-input-border;
- border-radius: $radius-sm;
- cursor: pointer;
- font-size: $font-size-sm;
- color: $color-text-base;
- text-align: left;
- transition: border-color $transition-fast;
-
- &:hover { border-color: var(--color-primary); }
- }
-
- .ss__value {
- @include text-truncate;
- flex: 1;
- color: $color-text-muted;
-
- &--selected { color: $color-text-dark; }
- }
-
- .ss__arrow {
- width: 10px;
- height: 10px;
- flex-shrink: 0;
- margin-left: $space-2;
- color: $color-text-muted;
- }
-
- .ss__dropdown {
- position: absolute;
- top: calc(100% + 4px);
- left: 0;
- right: 0;
- z-index: 400;
- background: $color-card-white;
- border: 1px solid $color-border;
- border-radius: $radius-md;
- box-shadow: $shadow-calendar;
- overflow: hidden;
- }
-
- .ss__search {
- display: block;
- width: 100%;
- padding: $space-2 $space-3;
- border: none;
- border-bottom: 1px solid $color-border;
- font-size: $font-size-sm;
- outline: none;
- background: $color-card;
-
- &::placeholder { color: $color-text-light; }
- }
-
- .ss__list {
- max-height: 200px;
- overflow-y: auto;
- }
-
- .ss__group {
- padding: $space-2 $space-3 $space-1;
- font-size: $font-size-xs;
- font-weight: $font-weight-bold;
- color: $color-text-dark;
- text-transform: uppercase;
- letter-spacing: 0.03em;
-
- &:not(:first-child) { border-top: 1px solid rgba($color-border, 0.5); }
- }
-
- .ss__item {
- padding: $space-1 $space-3 $space-1 $space-5;
- font-size: $font-size-sm;
- color: $color-text-base;
- cursor: pointer;
-
- &:hover,
- &--highlight { background: rgba(var(--color-primary-rgb), 0.08); }
-
- &--active { color: var(--color-primary); font-weight: $font-weight-medium; }
- }
-
- .ss__empty {
- padding: $space-3;
- text-align: center;
- color: $color-text-light;
- font-size: $font-size-sm;
- }
-
- // ─── Hamburger-Nav Stopwatch ─────────────────────────────────────────────────
- .hamburger-nav__stopwatch-wrap {
- position: relative;
- display: flex;
- align-items: center;
- }
-
- .hamburger-nav__stopwatch {
- display: flex;
- align-items: center;
- gap: $space-2;
- background: none;
- border: none;
- cursor: pointer;
- padding: $space-2;
- color: $color-text-muted;
- border-radius: $radius-lg;
- transition: color $transition-fast, background $transition-fast;
-
- &:hover { color: $color-text-dark; background: var(--color-bg); }
-
- &--running {
- color: $color-success;
-
- &:hover { color: $color-success; }
- }
- }
-
- .hamburger-nav__stopwatch-icon {
- position: relative;
- display: flex;
- align-items: center;
- justify-content: center;
- width: 30px;
- height: 30px;
- flex-shrink: 0;
-
- svg { width: 18px; height: 18px; }
-
- .hamburger-nav__stopwatch--running & {
- &::before {
- content: '';
- position: absolute;
- inset: 0;
- border-radius: 50%;
- border: 2px solid transparent;
- border-top-color: $color-success;
- border-right-color: $color-success;
- animation: stopwatch-spin 1s linear infinite;
- }
-
- &::after {
- content: '';
- position: absolute;
- inset: 0;
- border-radius: 50%;
- border: 2px solid rgba($color-success, 0.2);
- }
- }
- }
-
- .hamburger-nav__stopwatch-time {
- font-size: $font-size-sm;
- font-weight: $font-weight-bold;
- font-variant-numeric: tabular-nums;
- color: $color-success;
- white-space: nowrap;
- }
-
- .stopwatch-popover--hamburger {
- left: 0;
- transform: none;
-
- &::before { left: 20px; transform: rotate(45deg); }
- }
|