/* Enhanced Mobile UX - Clean & Simple */

/* Pull to Refresh */
#pull-to-refresh-indicator {
  position: fixed;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  transition: all 0.3s ease;
  pointer-events: none;
}

.pull-indicator {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
}

.pull-icon {
  font-size: 16px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

.pull-icon.spinning {
  animation: spin 1s linear infinite;
}

.pull-text {
  font-size: 12px;
  color: var(--text);
  font-weight: 500;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  backdrop-filter: blur(10px);
  transform: translate(-50%, -50%);
  animation: contextMenuAppear 0.2s ease;
}

.context-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
  min-height: 44px;
}

.context-action:hover {
  background: var(--border);
}

.action-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.action-text {
  font-weight: 500;
}

@keyframes contextMenuAppear {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Touch Optimizations */
.touch-optimized button,
.touch-optimized .btn,
.touch-optimized .primary,
.touch-optimized .secondary {
  min-height: 44px;
  min-width: 44px;
  touch-action: manipulation;
}

.touch-optimized input,
.touch-optimized textarea,
.touch-optimized select {
  min-height: 44px;
  touch-action: manipulation;
}

/* Improved touch targets for mobile */
@media (max-width: 768px) {
  .task-item,
  .note-item {
    min-height: 44px;
    touch-action: manipulation;
  }
  
  .task-checkbox {
    min-width: 44px;
    min-height: 44px;
  }
  
  .delete-btn {
    min-width: 44px;
    min-height: 44px;
  }
}

/* Smooth transitions for touch interactions */
.touch-optimized * {
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.touch-optimized button:active,
.touch-optimized .btn:active {
  transform: scale(0.98);
}

.touch-optimized .task-item:active {
  transform: scale(0.99);
}

/* Prevent text selection on touch */
.touch-optimized .task-item,
.touch-optimized .note-item {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Improved scrolling on mobile */
.touch-optimized {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}
