/* Tracker (Clockify-style) */

.tracker-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-variant-numeric: tabular-nums;
}

.tracker-active-row {
  display: flex;
  align-items: center;
  gap: 0;
}

.tracker-active-row .tracker-compose-title {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}

.tracker-active-row .tracker-compose-title .tracker-title-input {
  width: 100%;
}

.tracker-active-row > .tracker-title-input {
  flex: 1 1 auto;
  min-width: 0;
}

.tracker-title-suggestions {
  position: absolute;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  z-index: 1050;
  display: block;
  max-height: 16rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  border: 1px solid var(--bs-border-color-translucent);
  border-radius: 0.5rem;
  background: var(--bs-body-bg);
  box-shadow: var(--bs-box-shadow);
}

.tracker-title-suggestion {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.875rem;
  border: 0;
  background: transparent;
  color: var(--bs-body-color);
  text-align: left;
}

.tracker-title-suggestion:hover,
.tracker-title-suggestion.active {
  background: var(--bs-tertiary-bg);
}

.tracker-title-suggestion-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tracker-title-suggestion-project {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
  max-width: 45%;
  min-width: 0;
}

.tracker-title-suggestion-project .tracker-project-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.tracker-active-row > .tracker-compose-cell {
  position: relative;
  padding-left: 0.75rem;
  margin-left: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.tracker-active-row > .tracker-compose-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1.25rem;
  border-left: 1px dotted var(--bs-border-color);
}

.tracker-compose-project {
  flex: 0 0 auto;
  min-width: 10rem;
  max-width: 18rem;
}

.tracker-compose-project .tracker-project-picker {
  width: 100%;
  min-width: 10rem;
}

.tracker-compose-project .tracker-project-btn {
  min-width: 10rem;
  max-width: 18rem;
}

.tracker-title-input {
  border: none;
  background: transparent;
  box-shadow: none;
  font-family: "Source Sans 3", var(--bs-font-sans-serif) !important;
  font-size: 1rem;
  font-weight: 400 !important;
  line-height: 1.5;
  color: var(--bs-body-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tracker-title-input:focus {
  background: var(--bs-body-bg);
  box-shadow: none;
}

.tracker-list .dropdown-menu {
  max-height: min(16rem, calc(100vh - 2rem));
  overflow-y: auto;
}

.income-tax-btn.btn.btn-sm {
  width: 2rem;
  height: 2rem;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
  border-color: var(--bs-border-color);
}

.income-tax-btn .bi {
  display: block;
  line-height: 1;
  font-size: 0.95rem;
  margin: 0;
}

.income-tax-btn:hover {
  color: var(--bs-secondary-color);
  border-color: var(--bs-border-color);
}

.income-tax-btn-active,
.income-tax-btn-active:hover {
  color: #fff;
  background-color: var(--bs-success);
  border-color: var(--bs-success);
}

.income-tax-btn-active:hover {
  filter: brightness(0.95);
}

.income-tax-btn-active .bi,
.income-tax-btn-active:hover .bi {
  color: #fff;
}

.tracker-project-picker {
  min-width: 0;
}

.tracker-project-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.tracker-project-btn .tracker-project-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1 1 auto;
  text-align: left;
}

.tracker-project-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tracker-project-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.tracker-billable-btn {
  border: 1px solid var(--bs-border-color);
  background: transparent;
  color: var(--bs-secondary-color);
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tracker-billable-btn.active {
  color: var(--bs-success);
  border-color: var(--bs-success);
  background: rgba(var(--bs-success-rgb), 0.1);
}

.tracker-start-btn {
  min-width: 4.5rem;
  font-weight: 600;
}

.tracker-day-group {
  margin-bottom: 1rem;
}

.tracker-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  background: var(--bs-secondary-bg);
  border-radius: 0.375rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.tracker-entry {
  display: flex;
  gap: 0;
  align-items: center;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.tracker-entry > .tracker-cell {
  position: relative;
  padding-left: 0.75rem;
  margin-left: 0.75rem;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.tracker-entry > .tracker-cell::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 1.25rem;
  border-left: 1px dotted var(--bs-border-color);
}

.tracker-entry.running {
  background: rgba(var(--bs-danger-rgb), 0.04);
}

.tracker-entry-title {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: none;
  background: transparent;
  padding: 0.375rem 0.75rem;
  font-family: "Source Sans 3", var(--bs-font-sans-serif) !important;
  font-size: 1rem;
  font-weight: 400 !important;
  line-height: 1.5;
  color: var(--bs-body-color);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tracker-entry-title:focus {
  background: var(--bs-body-bg);
  box-shadow: none;
}

.tracker-entry-project {
  min-width: 0;
}

.tracker-entry-project .tracker-project-btn {
  width: auto;
  max-width: 16rem;
}

.tracker-entry-amount {
  font-size: 0.9rem;
  color: var(--bs-secondary-color);
  white-space: nowrap;
  min-width: 5rem;
  text-align: right;
}

.tracker-entry-range {
  white-space: nowrap;
  min-width: 7.5rem;
}

.tracker-entry-duration {
  min-width: 5.5rem;
  text-align: right;
  white-space: nowrap;
}

.tracker-entry-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.tracker-time-compact {
  color: var(--bs-secondary-color);
  cursor: pointer;
  border-bottom: 1px dashed transparent;
}

.tracker-time-compact:hover {
  border-bottom-color: var(--bs-secondary-color);
}

.tracker-time-sep {
  color: var(--bs-secondary-color);
}

.tracker-time-input {
  width: 3.25rem;
  padding: 0.125rem 0.25rem;
  text-align: center;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.25rem;
  background: var(--bs-body-bg);
}

.tracker-live-timer {
  color: var(--bs-danger);
  font-weight: 600;
}

.tracker-pagination-nav .tracker-pagination-range {
  min-width: 8.5rem;
  pointer-events: none;
}

.tracker-per-page-select {
  width: 4.5rem;
}

@media (max-width: 992px) {
  .tracker-active-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tracker-active-row > .tracker-compose-cell::before {
    display: none;
  }

  .tracker-active-row > .tracker-compose-cell {
    padding-left: 0;
    margin-left: 0;
  }

  .tracker-compose-project {
    flex: 1 1 100%;
    max-width: none;
  }

  .tracker-entry {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tracker-entry > .tracker-cell::before {
    display: none;
  }

  .tracker-entry > .tracker-cell {
    padding-left: 0;
    margin-left: 0;
  }

  .tracker-entry-title {
    flex: 1 1 100%;
  }

  .tracker-entry-actions {
    justify-content: flex-end;
  }
}
