/* Floating Timer Widget Styles */

#floating-timer-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 280px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  transition: transform 0.2s ease;
}

#floating-timer-widget:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2), 0 3px 6px rgba(0, 0, 0, 0.15);
}

.floating-timer-header {
  background: #fc641f;
  color: white;
  padding: 12px 16px;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
}

.timer-icon {
  font-size: 18px;
  font-weight: 600;
  margin-right: 8px;
}

.timer-label {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
}

.timer-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer-minimize,
.timer-close {
  color: white !important;
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
  padding: 0 4px;
  cursor: pointer;
}

.timer-minimize:hover,
.timer-close:hover {
  opacity: 1;
  color: white !important;
  text-decoration: none;
}

.floating-timer-body {
  padding: 16px;
  border-bottom: 1px solid #e0e0e0;
}

.timer-time {
  font-size: 32px;
  font-weight: 700;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0px;
}

.timer-issue {
  font-size: 13px;
  color: #666;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 4px;
}

.timer-issue:hover {
  color: #169;
  text-decoration: underline;
}

.floating-timer-actions {
  padding: 12px 16px;
  display: flex;
  justify-content: center;
}

.timer-btn {
  padding: 8px 24px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-block;
  cursor: pointer;
}

.timer-btn-stop {
  background: #ff1100;
  color: rgb(255, 255, 255) !important;
  border: none;
}

.timer-btn-stop:hover {
  background: #ff0000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  text-decoration: none !important;
}

/* Animation for when timer updates */
@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

#floating-timer-widget.updating {
  animation: pulse 0.3s ease;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  #floating-timer-widget {
    bottom: 10px;
    right: 10px;
    width: 240px;
  }

  .timer-time {
    font-size: 28px;
  }

  .timer-issue {
    font-size: 12px;
  }
}

/* Compact mode when dragged to edge */
#floating-timer-widget.compact {
  width: 200px;
}

#floating-timer-widget.compact .timer-time {
  font-size: 24px;
}

#floating-timer-widget.compact .timer-issue {
  font-size: 11px;
}

/* Minimized state */
#floating-timer-widget.minimized {
  width: auto;
  min-width: 300px;
  max-width: 400px;
}

#floating-timer-widget.minimized .timer-controls {
  bottom: 3px;
  position: relative;
}

#floating-timer-widget.minimized .floating-timer-body,
#floating-timer-widget.minimized .floating-timer-actions {
  display: none;
}

#floating-timer-widget.minimized .floating-timer-header {
  border-radius: 8px;
  padding: 10px 14px;
}

#floating-timer-widget.minimized .timer-icon {
  font-size: 16px;
  margin-right: 6px;
}

#floating-timer-widget.minimized .timer-label {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Show timer time in minimized state */
.timer-label .minimized-time {
  display: none;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 4px;
}

#floating-timer-widget.minimized .timer-label .minimized-time {
  display: inline;
}

/* Show context (issue/project) in minimized state */
.timer-label .minimized-context {
  display: none;
  font-weight: 400;
  opacity: 0.95;
  margin-left: 4px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#floating-timer-widget.minimized .timer-label .minimized-context {
  display: inline;
}

/* Hide "Timer Running" text in minimized state */
#floating-timer-widget.minimized .timer-label .timer-text {
  display: none;
}